Re: [AD] sanity checks for cvs checkouts...

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Jan 29, 2001 at 08:40:05PM +0100, Henrik Stokseth wrote:
> hi! i was wondering whether it would be worth it to add sanity checks in the
> makefiles for missing allegro.def and makefile.dep... the following would do
> it:
> 
> # -------- check that dependancy file exists --------
> #
> .PHONY: nodepwarn
> 
> nodepwarn:
> ifeq ($(wildcard $(OBJ_DIR)/makefile.dep),)
>  @echo WARNING!!! Found no dependancy file on your system.
>  @echo You might want to run 'make depend'.
> endif
...

> and then slightly modify all makefiles to define the LIB_DIR... this works
> nicely on normal 'make' but won't work if you specify a target so 'make
> depend' and 'make lib' will omit the checks. this is the way the djgpp
> sanity checks work for the moment but if anybody else has a better idea for
> implementation i'd like to hear it.

The djgpp makefile's warnings are fatal errors though, so it
puts the `ifeq' on the line before the rule, so that that rule
becomes the default rule and aborts the make.  Since these are
only warnings you've done it the right way, but as a bonus you
can also put:

    makefile[.all?]: nodepwarn nodefwarn

One thing Make does when it reads a makefile is to check whether
it contains a rule to rebuild itself, and if it does then that
rule is run first of all to update the makefile.  This way,
whatever rules you tell Make to run, it will still run the
dependency checks.  The only downside here is that you don't
want this message to appear during a `make depend'!  Still, I
can't think of a way around it and it seems a reasonable price
to pay. :)

George

-- 
Random project update:
22/06/2000: AllegroGL documentation:  http://allegrogl.sourceforge.net/
        See under `Documentation' for the AllegroGL Reference Manual in
        various formats.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/