help-make
[Top][All Lists]
Advanced

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

MAKEFLAGS and auto-including another makefile


From: Robert P. J. Day
Subject: MAKEFLAGS and auto-including another makefile
Date: Fri, 7 Jan 2005 08:33:01 -0500 (EST)

  a couple of questions.  first, in messing with the MAKEFLAGS
variable and printing it out in a rule, i noticed that the leading "-"
is dropped.  that is, if i run:

  $ make -I/a/b/c

and print the value of ${MAKEFLAGS}, what i get is "I /a/b/c".  but if
i have multiple options, all subsequent options will have the leading
hyphen.  not a big deal, but i'm just curious as to why the leading
hyphen goes missing.  and the docs don't seem to make any mention of
that.

  and second (and more importantly), i'd like to initialize my make
execution environment to automatically add some entries to the
"include" directive search path.  that is, i want to create a single
.mk file that contains universally-useful defines, and be able to just
include that file with

  -include usefuldefines.mk

now, i know i can use the make "-I" option to extend the include
search path, but that gets to be a pain after a while -- i just want
my users to type "make".  i can see several solutions.

  one, alias "make" to "make -I<dirname>" for everyone.  barf.

  two, set MAKEFLAGS in the shell environment to "I <dirname>".  barf
as well.

  is there a standard way to do this?  i went looking for a
MAKEINCLUDES env variable or something like that, but didn't find one.
and i'm not sure i want to use MAKEFILES for something like that.  or
do i?

  thanks.

rday




reply via email to

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