Re: [AD] new dependencies |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Mon, Dec 25, 2000 at 12:09:33PM -0700, stephen.kittelson@xxxxxxxxxx wrote:
> Then could we add a target for creating 'makefile.dep' if it doesn't
> exsist?
> For example:
> $(OBJDIR)/makefile.dep:
> gcc -MM $(wildcard *.c) > _depend.tmp
> sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/\$$(OBJDIR)\/\1/" _depend.tmp >
> $(OBJDIR)/makefile.dep
> rm _depend.tmp
>
> Would that work?
Assuming `make depend' already works (with the minus sign
present), we could just write:
$(OBJDIR)/makefile.dep: depend
Then if the makefile.dep doesn't exist, Make will automatically
do a `make depend'. But it won't do the inclusion until you
rerun Make. However, I think this also means that dependencies
will be regenerated every time you run Make, which is probably
not a good idea (it takes a while).
The Unix makefile seems to handle this fairly well already; I
think I've noticed it automatically generating dependencies
in the past.
George
--
Random project update:
22/06/2000: AllegroGL alpha 8 released at http://allegrogl.sourceforge.net/
Improved Windows support. New directory structure.
Fixed OpenGL coding mistake in `tex.c'.