help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: non-mandatory makefile include


From: Rahul Jain
Subject: RE: non-mandatory makefile include
Date: Wed, 15 Oct 2003 19:10:40 -0400

Aha! I didn't realize that the -include was an actual Makefile directive,
not just a commandline option. Sorry for the confusion and thanks for
(unintentionally, I guess) clearing it up. :)

I don't have any rules to make this file: it's just a build environment
configuration file, but thanks for the suggestion.

-----Original Message-----
From: Dan Kegel [mailto:address@hidden
Sent: Wednesday, October 15, 2003 6:55 PM
To: Paul D. Smith
Cc: Rahul Jain; 'address@hidden'
Subject: Re: non-mandatory makefile include


Paul D. Smith wrote:
> %% Rahul Jain <address@hidden> writes:
> 
>   rj> I'd like to add an include line to a makefile that doesn't cause the
>   rj> process to fail if the file does not exist. I'd like to not create a
>   rj> blank file, if possible. Any sugggestions for acheiving this goal
are
>   rj> appreciated.
> 
> Try "-include".
> 
> See the GNU make manual.

And furthermore, you might want to make an optional non-mandatory include
to keep from building those include files if not really needed for the
current target, e.g.

  ifneq ($(MAKECMDGOALS),clean)
  -include $(deps)
  endif

- Dan "I learned it just this week so everyone must want to know it" Kegel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]