[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a couple more questions on (what else?) multi-arch builds
From: |
Johan Bezem |
Subject: |
Re: a couple more questions on (what else?) multi-arch builds |
Date: |
Sat, 13 May 2006 07:11:18 +0200 |
User-agent: |
Thunderbird 1.5.0.2 (Windows/20060308) |
Greg Chicares wrote:
On 2006-5-12 20:01 UTC, Robert P. J. Day wrote:
...
-I${CURDIR} \
I avoid 'make --include-dir' because I couldn't find a way to prevent
"macro" makefiles (that are included in many makefiles) from being
remade repeatedly, unless I included them by absolute pathname:
include $(SRCDIR)/configuration.make
I included the following at some point (adapted from Paul's target.mk
makefile):
# Empty *.mk/*.d rule to avoid makefiles being 'updated' using
# implicit rules
%.mk :: ;
%.d :: ;
# Since 'Makefile' would indicate a makefile in the current
# directory [where the objects are stored], here we need to
# specify YT_SRCVPATH.
$(YT_SRCVPATH)/Makefile : ;
I haven't tested it recently, but it used to do the job and prevent make
from trying to rebuild my makefiles (and dependency files, which are
also just 'makefiles').
As for
CPPFLAGS += -I${CURDIR}
(which you write outside the $(MAKE) command of course), don't you
really want '-I${CURDIR}' at the beginning of your include list?
If someone does 'make CPPFLAGS="-I/foo/bar/"' and /foo/bar/ just
happens to have a header whose name shadows one of yours, then
yours in SRCDIR won't be used.
I include flags like CFLAGS, CPPFLAGS into my effective variables
YT_CFLAGS, YT_CPPFLAGS, etc. Needless to say, I do not use any of the
built-in rules.
YT_CPPFLAGS = $(CPPFLAGS) $(SOME_MORE_CPPFLAGS) ...
In my experience, having header files with possibly identical names
means trouble, unless the project trees are completely separated (for
instance by creating libraries out of each one, and only then combining
the results).
Having source files (C/C++/...) with identical names may even trouble
you if the source trees are compiled separately. I'm often working in
embedded systems, and many debugger applications there have trouble
separating multiple source files with identical names in different
directories, not because of the fact itself anymore, but occasionally
some internal structures are given attributes or something similar using
the filename (without path).
If I have the authority in a project - which I do not always ;( - files
with identical names are forbidden, be it header or source files.
Regards,
Johan
--
JB Enterprises - Johan Bezem Tel: +49 172 5463210
Software Architect - Project Manager Fax: +49 172 50 5463210
Realtime / Embedded Consultant Email: address@hidden
Design - Development - Test - QA Web: http://www.bezem.de