[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Targets which dont check for includes...
From: |
Der Herr Hofrat |
Subject: |
Re: Targets which dont check for includes... |
Date: |
Wed, 28 May 2003 14:42:43 +0200 (CEST) |
>
> I have a makefile which keeps dependancies for the library source files in
> an output directory, and I include them as a makefile dependancy:
>
> -include $$($(1)_depfiles)
>
> all the depfiles are in a seperate directory which is created when any
> target is run.
>
> I then have a target which removes those dependancies,
>
> scour::
> $(RM) $$($(1)_depfiles) $(dep_dir)
>
> but then when i run make scour, if those files, or directory ISNT there, i
> dont want them to be built only to be removed...
>
>
> Is there a way to check what target was specified? something like...
>
> if target != scour
> -include $$(1)_depfiles
> endif
>
maby not very elegant but you can simply put the scour:: target befor the
include statement and use rm -f - this way rm will not fuss if the files
are not present and the target will not build them just to remove them.
hofrat