History log of /freebsd-9.3-release/share/mk/bsd.dep.mk
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 252048 20-Jun-2013 sjg

share/mk: merge: r241298,243393,249057,251506 from head for bmake support.

Makefile: buildworld etc will be done with make from src tree,
make sure that bmake's -J 15,16 are not passed to it.

Reviewed by: obrien


# 240006 02-Sep-2012 dim

MFC r226216 (by das):
Pass -std= flags in CFLAGS to mkdep. Without this, preprocessor tests
for particular compiler features might be evaluated differently by
mkdep than they would be by cc.

MFC r226244 (by das):
Also pass the -ansi flag through to mkdep (requested by bde), and fix
a cut-and-paste-o (noticed by rdivacky).

MFC r239613:
Make sure bsd.dep.mk does not filter out -stdlib=xxx from CXXFLAGS,
since this determines parts of the C++ include path.


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 220863 19-Apr-2011 dim

Remove support for the Intel C Compiler from the build infrastructure.
This support has not worked for several years, and is not likely to work
again, unless Intel decides to release a native FreeBSD version of their
compiler. ;)


# 220755 17-Apr-2011 dim

Remove libobjc and other Objective-C related components, as these are
extremely outdated, and not used by anything in the base system.

Silence from: current@


# 211437 17-Aug-2010 rpaulo

For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' in
Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename
of the compiler command (excluding any arguments) is considered.

This allows you to use, for example, CC="/nondefault/path/clang -xxx",
and still have the various tests in bsd.*.mk identify your compiler as
clang correctly.

ICC if cases were also changed.

Submitted by: Dimitry Andric <dimitry at andric.com>


# 211427 17-Aug-2010 rpaulo

Make sure any -U CFLAGS are not filtered out when calling mkdep, as
gnu/usr.bin/cc/libiberty first defines the PREFIX macro, and then
undefines it again, so mkdep with clang complains.

Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: ru


# 202579 18-Jan-2010 ru

Allow the CTAGS to be set to something other than "gtags" or "ctags",
but assume it supports a ctags(1)-compatible syntax.

PR: 46676
Submitted by: Lyndon Nerenberg
MFC after: 3 days


# 202578 18-Jan-2010 ru

If CTAGS is not set or set to something other than "ctags" or "gtags",
"cleandepend" was not removing the .depend file; fixed.

PR: 126747
MFC after: 3 days


# 175980 05-Feb-2008 des

Revert CLEANDEPFILES commit per ru@'s request; it does not really solve
the problem. The correct fix will follow.


# 175937 03-Feb-2008 des

Normally, when a header file is removed from the build (as i4b headers
were recently), a simple 'make cleandepend; make depend' is sufficient
to keep the tree buildable after a cvs update when doing incremental
builds.

However, kdump and truss use a script which searches for header files
that define ioctls, and generates C code that includes them. This
script will usually not need updating when a header file is removed,
so the normal dependency mechanism will not realize that it needs to
be re-run. One is therefore left with code that references dead files
but will only be removed by a full 'make clean', which defeats the
purpose of incremental builds.

To work around this, modify the cleandepend target in bsd.dep.mk to
also remove any files listed in a new variable named CLEANDEPFILES,
and modify kdump's and truss's Makefiles accordingly.

MFC after: 2 weeks


# 139761 06-Jan-2005 krion

Remove trailing spaces.


# 139108 21-Dec-2004 ru

NOTAGS -> NO_TAGS


# 126890 12-Mar-2004 trhodes

This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.

The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.

Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.

To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.

Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.

Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by: silence on -arch
Submitted by: netchild


# 125119 27-Jan-2004 ru

Fixed bogus ${FOO:Mbar} tests where the actual intent is to check
if the result set is empty. While here, replaced non-bogus empty
string comparisons with equivalent empty() checks.


# 124637 17-Jan-2004 ru

Guess better the source for object files in case .depend file is
missing and there are multiple choices using multiple inference
(suffix transformation) rules.

This is known to fix compilation of s_log1p.o in lib/msun on i386,
as otherwise it attempted to use s_log1p.S as the source (which is
marked broken) instead of legal s_log1p.c which is in CFLAGS. The
normal case where .depend file exists is not affected.

Reviewed by: bde


# 124490 13-Jan-2004 ru

Introduce DPSRCS, that holds the list of source files which are
needed for generating dependencies. SRCS are always part of it,
and normally only they.

This can be useful in some random cases where it's necessary to
have something in .depend that isn't part of SRCS. This will be
used to replace a hack in lib/libpam/libpam/Makefile.


# 124435 12-Jan-2004 ru

- Replaced several := ops with their += equivalents; the old
form became unnecessary with the bsd.prog.mk,v 1.69 change.

- Eliminated duplicate y.tab.h in SRCS.

Reviewed by: bde

- Complementary to the said bsd.prog.mk change, use the fact
that inner .for loops are not real loops but a tricky form
of a local macro for the outer loop's variable, and switch
to using faster variable modifiers to replace extensions.


# 117195 03-Jul-2003 bde

Use make(1) instead of a shell script to implement the checkdpadd target.
This is simpler, and is easy to do now that make(1) supports substituting
regexps. Fixed missing '$' anchor in the regexp. Use less cryptic names
for temporary variables.

Submitted by: ru (early version)
Reviewed by: ru


# 117171 02-Jul-2003 ru

The .s files do not have to be preprocessed with cpp(1).


# 117122 01-Jul-2003 ru

There's no reason to keep separate AINC knob anymore.
The only real use of it (lib/libc/Makefile) has been
fixed, and if necessary, the contents of AINC should
be added to CFLAGS.

Explained by: bde


# 105327 17-Oct-2002 ru

Added the new variable CTAGS which, if set to "ctags", reverts
to creating the tags file using ctags(1). Defaults to "gtags".
Made GTAGSFLAGS and HTAGSFLAGS overrideable, added CTAGSFLAGS.
Folded bsd.prog.mk version of `tags' into bsd.dep.mk.

PR: bin/42852


# 103436 16-Sep-2002 peter

Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha


# 99344 03-Jul-2002 ru

Moved checkdpadd target to where it logically belongs.


# 96132 06-May-2002 bde

Fixed missing quotes in the default for MKDEPCMD in the CC != cc case.
"CC='cc -Dfoo' make depend" was very broken.


# 95306 23-Apr-2002 ru

Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.

Ensure all standard targets honor SUBDIR. Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents). Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk. Nothing depended on the wrong
order anyway.

Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.

De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)


# 95255 22-Apr-2002 ru

Prohibit the direct inclusion of bsd.dep.mk.


# 94922 17-Apr-2002 ru

Doh, previous revision made .depend to be almost always out of date.

Spotted by: bde

Fortunately, we have a powerful make(1). Apply some black magic to
make it DTRT. (Better viewed as diff to revision 1.30.)


# 94841 16-Apr-2002 ru

Don't spawn extra make(1) process to execute _EXTRADEPEND.


# 94768 15-Apr-2002 ru

Only pass our idea of `CC' down to mkdep(1) if it's non-default.


# 92648 19-Mar-2002 bde

Removed bogus env(1) commands. make(1) uses a real shell, so
"env name=value ... cmd ..." was just a pessimized way of doing
"name=value ... cmd ...". Note that make(1) can't optimize
either of these to an exec of env(1) or "cmd" even if the second
"..." is simple, since it can't tell that the shell metacharacter
in "name=value" is actually handled by env(1).


# 92361 15-Mar-2002 obrien

Pass our idea of `CC' down to mkdep.

Tested on: sparc64


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 42793 18-Jan-1999 simokawa

Clean new index file(GPATH) of global.

Submitted by: Shigio Yamaguchi <shigio@wafu.netgate.net>


# 36673 05-Jun-1998 dt

Recognize ".cpp" as a C++ suffix.

PR: 3476


# 36055 15-May-1998 bde

Oops, forgot references in previous commit.

Submitted by: Brian Cully <shmit@erols.com>
PR: 6178


# 36054 15-May-1998 bde

Support Objective C almost as well as C++.

Notes:
- We no longer use -fgnu-runtime in bsd.lib.mk, since it is the default
and bsd.lib.mk is the wrong place to override it.
- Gnu C doesn't have a special compiler driver for Objective C like it
does for C++. The defaults are suitable for Gnu C. Use `OBJCLIBS='
in /etc/make.conf for POC.


# 35951 11-May-1998 bde

Oops, the lex and yacc sources must be added to SRCS before ${SRCS}
is used in the dependency list for ${DEPENDFILE}. `make depend' was
broken for a few days. `make world' only uses `make depend' when
NOCLEAN is defined, so only a few people noticed the bug.

Submitted by: mostly by jmg


# 35838 08-May-1998 bde

Moved lex and yacc source handling from bsd.prog.mk to bsd.dep.mk
so that it applies to libraries (and lkms) as well as programs.


# 35789 06-May-1998 bde

Only include bsd.dep.mk in `mk'files that handle C sources. Abuse
bsd.obj.mk instead of bsd.dep.mk for defining the _SUBDIR target
and a default tags target. Abuse bsd.obj.mk for defining default
cleandepend and depend targets.


# 34829 23-Mar-1998 eivind

Support new version of global.

Submitted by: Shigio Yamaguchi <shigio@wafu.netgate.net>
Tested by: make buildworld


# 34181 07-Mar-1998 bde

Pass -nostdinc to mkdep for assembler and C files (it was already
passed for C++ files).

Don't pass -nostdlib to mkdep for C++ files.

Don't use temporary variables to obfuscate the main rule.


# 33681 20-Feb-1998 bde

Fixed cleaning of tags files. GSYMS was forgotten.


# 31717 14-Dec-1997 wosch

Optimize rm(1) usage.


# 30113 05-Oct-1997 jkh

Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by: <many different folks>
Submitted by: Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>


# 28806 26-Aug-1997 bde

Fixed cleandepend target. Subdirectories weren't handled unless SRCS
was defined.


# 26715 18-Jun-1997 asami

Add `B' to list of flags to pass through from C*FLAGS when using mkdep
(bsd.dep.mk) and compiling assembly language sources (bsd.lib.mk).
This doesn't change anything for our current source tree, but if you
want to use the -B switch in C*FLAGS to specify the location of
compiler subprograms, now you can do it.

Reviewed by: bde (implicitly)


# 24861 13-Apr-1997 jkh

Support GLOBAL style tags.


# 24750 09-Apr-1997 bde

Use `ld -f' (actually `cc -Wl,-f') at `make depend' time to generate
almost perfect dependencies on crt0's and libraries. DPADD and
bsd.libnames.mk should go away soon. Use a new _EXTRADEPEND target
to implement this and to avoid editing of .depend when .depend isn;t
being rebuilt. The afterdepend target doesn't seem to be good for
anything and is now unused.

Fixed LDDESTDIR for the DESTDIR case when ${SHLIBDIR} != /usr/lib.

Added commented-out -nostdlib to LDDESTDIR for the DESTDIR case.
The wrong libraries may be used without this; however it breaks
linkage to crt0 and libc.


# 22988 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 17819 25-Aug-1996 jkh

Back out the recent DEPEND changes - as Bruce points out, it's bogus.

I'll leave any future Makefile hackery to him since he's clearly thought
about this a great deal more than I have.


# 17800 23-Aug-1996 jkh

Make it possible to turn the depend pass off entirely with a NO_DEPEND
variable.
Requested-By: wollman


# 17310 27-Jul-1996 jkh

The clean rule in here was bogus.


# 16663 24-Jun-1996 jkh

Bring in my changes for removing the pestilent obj links (unless you
really want them) from /usr/src. This is the final version of the
patches, incorporating the feedback I've received from -current.


# 15903 25-May-1996 wosch

Add some comments for variables and targets.


# 14986 01-Apr-1996 wosch

add MKDEPCMD?= and DEPENDFILE?=
replace sh(1) commands with make(1) builtins


# 6252 08-Feb-1995 bde

More complete implementation of SUBDIR for programs, libraries and kmods.
`depend' wasn't supported. This seems to have only broken `make depend'
in gnu/usr.bin/ld.

bsd.prog.mk:
Build the man pages in ${MANDEPEND} at build time.


# 1845 04-Aug-1994 wollman

Add a couple of files we created in 1.x.