:M-[IDU]*
with
:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.
Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...
(This needs :C///W support in make(1) that Simon Gerraty added for me :)
Enable the in-tree toolchain on sh5, at least for the time being so I
can evaluate the situation.
There are still numerous problems with gcc3's sh5 support, not least
of which is the fact that a native gcc3 doesn't work at all. As a
cross-compiler, it works reasonably well. Certainly enough to build
userland and kernel code.
Binutils also has problems dealing with shared libraries on sh5, so
we're back to static userland for now.
rather than adding '-s' to make's command line in the makewrapper,
use the .SILENT target based on MAKEVERBOSE's value.
This means that you can do:
./build.sh -N 1 makewrapper
$TOOLDIR/bin/nbmake-$MACHINE
# runs at MAKEVERBOSE==1, with command lines suppressed
$TOOLDIR/bin/nbmake-$MACHINE MAKEVERBOSE=2
# runs at MAKEVERBOSE==2 for this invocation, with command lines shown
* 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.
${_MKMSG} " ... {$.TARGET}" and use appropriately.
Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})
Replace _MKSHCMD with _MKSHECHO
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.
on the setting of ${SHLIBDIR} and ${SHLIBINSTALLDIR} (_not_ ${_LIBSODIR}).
Fixes cruel and unusual ^W^W^W obscure native-build and not-so-obscure
cross-builds problems I was having with shared libraries with a
non-base LIBDIR (e.g, /usr/X11R6/lib) that use LDADD to pull in other
libraries from /usr/lib (such as libm) which are really in /lib and the
symlink from ${DESTDIR}/usr/lib/libm.so to /lib/libm.so.N.M was confusing
the linker. Stuffing -rpath-link ${DESTDIR}/lib in solves the problem.
This should mean that shared libraries that depend upon other shared
libraries in other directories should DTRT in a DESTDIR (cross-)build...
Inspired by _PROGLDOPTS in <bsd.prog.mk>
if we need to add stuff (usually "/lib") to the rpath-link path before
"/usr/lib". Otherwise, this barfs if LIBDIR != /usr/lib or /lib, and
we're cross-building (e.g., in src/x11)
the order that Makefile.inc is pulled in to get this to work.
this stuff needs a rototill (for another day). for example, having every
sys/lkm/** directory make their own machine ${MACHINE_CPU} and possibly
${SHARED_MACHINE_CPU} (e.g, x86 for i386/x86_64) is not the most optimal
situation ...
HAVE_GCC3. if this is set, we also set USE_TOOLS_TOOLCHAIN=no. change
the definition of the former to be restricted to whether tools/toolchain
is used or not.
SYMLINKS to install symlinked header files. INCSYMLINKS are installed with
'make includes'. This avoids using SYMLINKS and hacks with the 'linkinstall'
target in <bsd.links.mk>, as linksinstall occurs in 'make install' and hacks
to get it to occur in 'make includes' weren't robust, as seen in lib/libdes.
Yet more improvements to bsd.README.
* 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".
Update documentation for some other make variables
* 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".
"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...
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.
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.
(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.
Clarify that command-line overrides of the MKxxx variables should be
done via the environment rather than make(1) command-line variable
assignment, since the latter doesn't actually work as intended.
only list the (often complicated) ${COMPILE.*} rules once always building
to ${.TARGET}.tmp. Then, depending on whether *OPTS has -g, either
"mv ${.TARGET}.tmp ${.TARGET}" or "${LD} -[xX] -r ${TARGET}.tmp -o ${.TARGET}"
as appropriate.
This can prevent inconsistency that could occur between "echo ${COMPILE.*:Q}"
and "${COMPILE.*}", such as the problem in rev 1.226. (There were still
examples of this in .cc.so and .m.so !!!)
Remove `@' from most non-echo rules, so that we can actually see what's
happening. This helps debugging problems, such as that fixed by rev 1.226.
Always remove all possible temp files that might occur because of the above.
Be consistent about ${CC} instead of $(CC)
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(!)
to determine TARGET_ENDIANNESS.
This should fix problem reported privately by Matt Green <mrg@>.
This uses exists(${CC:ts::C/:.*$//}) as we don't expect the command name to
contain `:'. (The ":ts" trick is from a discussion with Simon Gerraty <sjg@>.)
COPTS.<fn> Additional flags to the compiler when creating the C objects
for <fn>.
CPUFLAGS.<fn> Additional flags to the compiler/assembler for <fn>.
CPPFLAGS.<fn> Additional flags to the C pre-processor for <fn>.
(For <fn>.[ly], "<fn>.c" must be used.)
a non-zero exit value to indicate a missing file or non-symlink),
instead of test -h $l && ltarg=`ls -ld $l | awk '{print $NF}'`
since the former is quicker and more concise.
and target (and rely upon a non-zero exit value to indicate a missing file),
instead instead of unconditionally installing the link.
SYMLINKS: use stat -qf '%Y' $l to read a symlink's target (and rely upon
a non-zero exit value to indicate a missing file or non-symlink),
instead of test -h $l && ls -ld $l | awk '{print $NF}' , since
the former is quicker and more concise.
This resolves PR toolchain/16885 from David Laight.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"
Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"
Improve documentation for these and other make flags.
This replaces the previous .if defined (MANZ) behaviour, although the latter
will set MKMANZ=yes for compatibility purposes.
Don't bother with -P-bou in TOOL_ROFF_HTML; it doesn't appear to be
necessary with groff 1.19.
Fix NOHTML implementation to be consistent with other NOxxx / MKxxx
variables, and expose the user-tweakable MKHTML.
top-of-obj/tools/tools.OS-VERSION-STRING
to
top-of-obj/tooldir.OS-VERSION-STRING
It's more consistent with the build.sh defaults for DESTDIR and
RELEASEDIR, and it's easier on "mr lazy completion fingers".