Commit Graph

61 Commits

Author SHA1 Message Date
mrg 8dcb3c2e33 allow -traditional-cpp to be overridden when making dependancies 2003-10-27 23:52:57 +00:00
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00
lukem 4ccb31e74a Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} "  ...  {$.TARGET}"  and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO
2003-10-19 03:00:55 +00:00
lukem 03b6213598 Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
    0	Minimal output ("quiet")
    1	Describe what is occurring
    2	Describe what is occurring and echo the actual command ("verbose")
	This is the default, and is equivalent to the previous behaviour.
2003-10-18 15:33:59 +00:00
lukem 28d70b03dc order .SUFFIXES similar to other *.mk files 2003-08-11 09:59:43 +00:00
martin 28ef1fc8fe Handle empty __DPSRCS.d, avoiding executing commands like "cat > .depend"
in directories where only non-C/C++ files are in SRCS (e.g.: the forth
code for sparc bootblocks).

Patch from Luke.
2003-08-06 13:55:11 +00:00
lukem a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
lukem 3cbb5fea48 tweak ${DEPENDSRCS.d} target so that ${SRCS} isn't there. this fixes the
"make: out of memory" problem when make dependencies in lib/libc.

XXX: this is a temporary workaround.  i'm working on cleaning up how
the DPSRCS stuff is used throughout the tree...
2003-08-01 00:55:43 +00:00
lukem a504cd2911 bsd.dep.mk: add a dependency for *.d on ${SRCS} ${DPSRCS}. this should fix
some build problems where DPSRCS contains .h files that need to exist to
build the .d file.

document that bsd.dep.mk should be included after anything that might
update SRCS or DPSRCS so that the above works correctly, and actually
ensure this is the case.
2003-07-31 13:47:32 +00:00
lukem 86173c79de Set .NOPATH for all ${DEPENDSRCS} and not just .depend.
Should fix build problem noted by Geoff Wing on current-users@
2003-07-29 07:56:23 +00:00
lukem b082f4d46d Use the more "standard" `foo.d' instead of `foo.SUFFIX.dep'; the rules
are simpler and would have helped prevent the previous fubar.
Don't bother using -a with ${MKDEP} to build the individual .d files.
2003-07-28 23:57:24 +00:00
matt ebfb9912e2 Make all the suffix rules with .c .c.dep (e.g not .cc .cc.cc.dep) 2003-07-28 21:33:57 +00:00
lukem 8f4575345b Simplify .*.dep generation by using suffix transforms.
This also fixes a problem in the previous where the .ALLSRC would contain
any other dependencies that .depend had, thus breaking the mkdep invocation.

Provide DEPENDSRCS which effectively contains ".depend *.dep", to be
used in other Makefiles that want to add dependencies for .depend.
2003-07-28 15:07:16 +00:00
lukem 696a21d88f Always use the "per source file".dep method to build the .depend file
(that was formerly only used for HOST_CYGWIN.).
Clean up implementation to minimise unnecessary variable munging.
Ensure all .dep files are deleted in cleandepend:.

This allows us to correctly support CPPFLAGS.<file> in make depend, and
whilst this method is marginally slower in the "no existing .depend file"
case, it should be faster in the "rebuilding depend for a subset of
source files" case.
2003-07-28 08:59:52 +00:00
mrg 96d9a01177 introduce a new $CPPFLAG_ISYSTEMXX that is used to reference c++ system
includes.  for GCC3, set this to -I instead of -isystem.

XXX this should really be either not required or a -isystem-cxx, but for
now this is required to build libstdc++-v3, which otherwise complains
heavily about STL headers not being C code(!)
2003-07-27 14:49:22 +00:00
lukem 87610a53a9 whitespace cleanup 2003-07-18 04:04:03 +00:00
wiz a233f087fe Add missing } for rev. 1.43. 2003-06-11 18:05:40 +00:00
wiz cdf5450a15 Also recognize cpp files as C++ files for CYGWIN case. 2003-06-11 17:32:45 +00:00
christos d30f98df35 recognize .cpp as c++ files. 2003-06-11 17:24:55 +00:00
wiz 53588c2a8b Back this out until I know why it does not work. 2003-05-27 21:43:32 +00:00
wiz f338b31357 Add .cpp dependency rules. 2003-05-27 19:30:45 +00:00
christos b024767c0c Fix _HOST_CYGWIN lossage. 2003-05-08 20:39:00 +00:00
christos e9672445c0 Hacks for limited command and environment space (John Gordon) 2003-05-08 13:34:07 +00:00
thorpej f176c534d2 The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
2002-11-26 18:42:30 +00:00
thorpej 0d842ff28e Oops, AINC actually is still used; put it back. 2002-11-10 21:26:44 +00:00
thorpej ca760b0a32 The MIPS toolchain now defines __ABICALLS__ when abicalls are in use,
and the sources now use that define, so there is no need for us to define
ABICALLS.  Since that was the only use for the AINC variable, garbage-collect
it.
2002-11-10 18:15:29 +00:00
thorpej a46ef4e6ab Don't use -traditional-cpp if HAVE_GCC3. 2002-06-04 21:14:59 +00:00
tv 4a1ad2db60 If DESTDIR is set, do a similar nostdinc dance for the standard C++ include
directory.
2001-11-28 04:38:29 +00:00
tv 1129ed4afe Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments.  The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ.  Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.
2001-11-02 05:21:47 +00:00
tv d0f9e45413 Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").
2001-08-14 07:02:13 +00:00
tv dd70bf30ad Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).
2001-06-01 17:49:32 +00:00
mycroft 3e13200b73 Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.
2000-01-22 19:31:00 +00:00
tron e6896dc7c0 Add missing "\" in two line shell command. 1999-11-16 13:15:09 +00:00
minoura 094fe1d972 Pass -traditional-cpp to mkdep for assembler files,
as in the actual compilation (${COMPILE.S} rule in sys.mk).
1999-11-16 08:18:34 +00:00
sommerfeld d5c8aa5ff2 correct previous fix:
- add CLEANDEPEND variable for stuff which should be cleaned out
in "cleandepend" phase.
- add it to the files removed during the cleandepend phase.
1999-08-11 02:00:15 +00:00
simonb 303e8a33d5 Change CFLAGS to AFLAGS for mkdep of .S/.s files. Fixes "make depend"
on pmax kernels (and doesn't break "make depend" on entire tree).
1999-02-24 22:04:15 +00:00
tv 158083e27d Use :Q to quote arguments to "echo" so that quote marks don't fall out of
the printed mkdep command.
1999-02-07 17:29:40 +00:00
tv e2e1136b79 Our make can't actually turn off implicit rules per-target, and the
"depend:" rule had no actual commands to execute, so it used the implicit
".c:" rule in gas.new (which has a depend.c).  Add a command here -- just
"true" -- that prevents use of implicit rules.  This may need a new
.-option in make(1) to be done Right.
1999-02-03 21:08:05 +00:00
tv 82561cf391 Kill spaces in the $$files check introduced by borrowing the C++ rule for
ObjC.
1998-08-18 19:12:42 +00:00
tv da32b76d1f Add dependency rule for Objective-C files. 1998-08-18 17:31:21 +00:00
lukem 24bd0530c9 add distclean as a synonym for cleandir 1998-08-09 14:46:19 +00:00
mycroft 4e5d05c9cc Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.
1997-05-09 13:25:46 +00:00
mycroft fde14a0e77 Remove cruft. 1997-05-09 07:56:00 +00:00
gwr 1f53401903 Set the .NOPATH flag for the .depend target. 1997-05-08 21:18:59 +00:00
mycroft b2a77a6aa4 Don't use _SUBDIRUSE outside of bsd.subdir.mk. 1997-05-07 17:06:16 +00:00
mycroft 78f9e94dd2 Always define cleandepend. Don't use a .depend target if SRCS is empty. 1997-05-07 16:44:04 +00:00
mycroft 1bd348b5f9 Shuffle some .PHONYs around, to work better with `-t'. 1997-05-07 08:42:18 +00:00
mycroft 5acae7b6ea Add a pile of missing .PHONYs. 1997-05-06 20:54:31 +00:00
gwr ef90c20081 Allow mkdep to exist as a different name (fixes PR#3302) 1997-03-07 23:10:18 +00:00
christos 6e591491c3 - make sure the afterdepend rule fires `after' .depend gets created.
[fixed for parallel make]
- make depend prettier printing.
1995-09-27 01:15:09 +00:00