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

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


<stephen.kittelson@xxxxxxxxxx> wrote:

> How about something similar to the following instead?
>
> # -------- check that dependancy file exists --------
> #
> ifeq ($(wildcard $(OBJ_DIR)/makefile.dep),)
> $(warning WARNING!!! Found no dependancy file on your system. You might
> want to run 'make depend'.)
> endif
>
> No need for a target at all.

looks nice. but as i told george in a private mail i suspect it would be
easiest to just copy the behaviour of the makefile.dj sanity checks. so, if
we use your method should we implement it as a macro? something like:

define DO_SANITY_CHECK
  ifndef DONE_SANITY_CHECK
    define DONE_SANITY_CHECK
      ifeq ($(wildcard $(OBJ_DIR)/makefile.dep),)
        $(warning WARNING!!! Found no dependancy file on your system. You
might want to run 'make depend'.)
      endif
    endif
endef

and then add a call to DO_SANITY_CHECK first in all the interesting
targets... (lib, default etc... but not depend of course) this will cause a
sanity check to be run before anything else, but if you do a 'make grabber
lib tools' etc... it won't run the check more than once. ps! what version of
make is required to use $(warning ...) ?

-henrik




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