Commit Graph

1437 Commits

Author SHA1 Message Date
lukem
6d242d8a5e sort list 2004-01-03 01:05:42 +00:00
lukem
02e913d52d Consistently test all variables that support a "yes"/"no" value with
${VAR} == "no"
or
	${VAR} != "no"
(instead of against "yes").  Variables affected:
	TOOLCHAIN_MISSING
	HAVE_GCC3
	USE_TOOLS_TOOLCHAIN
	NEED_OWN_INSTALL_TARGET
	USE_SHLIBDIR

Improve the documentation.
2004-01-02 16:12:36 +00:00
rtr
775af37840 back out hpcmips changes accidently committed in prev. noticed by lukem@ 2004-01-01 12:36:14 +00:00
rtr
27a87afc78 grr typo .manN -> .man.N 2004-01-01 09:30:31 +00:00
rtr
6e780472a5 section 4 and 5 man/cat pages do get installed 2004-01-01 07:02:27 +00:00
lukem
2eba2bbab6 correct __vendorversion__ to match xsrc/xfree 2004-01-01 01:19:36 +00:00
christos
e57d25d652 no-traditional is not a valid warning for c++ programs. 2003-12-26 17:27:01 +00:00
christos
80f77a3c2c Add libstdc++ 2003-12-26 17:22:43 +00:00
rtr
24acc15bee remove endian selection hack - from lukem 2003-12-26 08:24:33 +00:00
rtr
1967c90241 endian table for X_BYTE_ORDER= 2003-12-23 15:36:45 +00:00
rtr
6c80347d07 sparc64 defines 2003-12-23 11:12:35 +00:00
rtr
57bab08096 Need to provide alternate definitions of __archive{build,install} for x11.
approved by lukem
2003-12-23 10:30:02 +00:00
rtr
8c82867db3 Remove duplicate -DPIXPRIV from X11FLAGS.SERVER
Don't define -DXINPUT -DXFree86XDGA -DXF86VIDMODE -DDXTIME for sparc
Add X11FLAGS.LOADABLE for for module control/module flags.
2003-12-20 14:24:29 +00:00
matt
abd06d37ef Add TOOL_MACPPCFIXCOFF 2003-12-11 00:28:08 +00:00
rtr
fa397391ec No such thing as NONBINOWN, use NONBINMODE instead. 2003-12-08 10:10:46 +00:00
simonb
83f816d555 Disable native gdb for ns32k (but cross-gdb works). 2003-12-07 23:07:37 +00:00
scw
a26234a268 And the monkey flicks the switch ...
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.
2003-12-07 22:52:56 +00:00
matt
36d03f8064 Fix fumble-fingers && && -> && 2003-12-07 22:33:16 +00:00
matt
aa713b97fe Turn on NOPIC= if using GCC3 for VAX. 2003-12-07 22:23:00 +00:00
simonb
0921f67df2 No shared libraries on ns32k at the moment - set *PICFLAGS to nothing. 2003-12-07 12:56:45 +00:00
simonb
b18e40ea85 Use -O2 for ns32k now. 2003-12-07 12:53:58 +00:00
simonb
9ec0c6aa88 ns32k doesn't have a missing toolchain anymore, does support
gcc3 and always uses static libraries (for now...)
2003-12-05 12:14:42 +00:00
matt
2996b43a0a Add MKINET6/USE_INET6 support. 2003-12-05 02:35:24 +00:00
lukem
cd017885ef Ensure that ${TOOL_STAT} is executable before trying to run it;
it may not be available when performing "make obj" in tools/
when using BSDSRCDIR & BSDOBJDIR (instead of MAKEOBJDIR{,PREFIX}).
2003-12-04 12:15:20 +00:00
mrg
ce29aa2370 build lib{opcodes,bfd,iberty} back in gnu/lib instead of gnu/usr.bin/binutils
as they are needed earlier than when gnu/usr.bin/binutils is built when
"make -j" is used.
2003-12-04 09:29:31 +00:00
mrg
2aa1a44c7a switch everyone to binutils 2.14. it's confirmed to work on all the
platforms that actually build at the moment...
2003-12-03 10:26:45 +00:00
mrg
629f68a11b oops, really force 2.13 2003-11-27 13:10:00 +00:00
mrg
d16bc966af remove the GDB53 section.
change the polarity of the GCC3 section - list missing ports.
add a binutils 2.14 knob, forced to 2.13 for now.
2003-11-27 13:09:37 +00:00
jwise
a04b30960c APPDEF files should be installed with mode ${NONBINMODE}, not mode ${BINMODE}.
Picked up via /etc/security:

Checking setuid files and devices:
Setuid additions:
-r-sr-xr-x 1 root wheel 252016 Nov 26 02:27:32 2003 /home/NetBSD/build/dest/i386/usr/X11R6/bin/xterm
-r-sr-xr-x 1 root wheel 4822 Nov 25 23:36:45 2003 /home/NetBSD/build/dest/i386/usr/X11R6/lib/X11/app-defaults/XTerm
-r-sr-xr-x 1 root wheel 828 Nov 25 23:36:45 2003 /home/NetBSD/build/dest/i386/usr/X11R6/lib/X11/app-defaults/XTerm-color
2003-11-26 15:18:00 +00:00
lukem
185c65a241 In _MKTARGET_*, use ${.CURDIR:T} instead of ${.OBJDIR:T}, because that's more
useful when using actual 'obj' dirs.  Suggested by Alan Barrett, with some
tweaks by me.
2003-11-24 05:44:59 +00:00
lukem
6d246880fb In the various _MKTARGET macros, prepend "${.OBJDIR:T}/" to the ${.TARGET},
to provide more context about the operation.  Especially useful for crunched
binaries and kernel builds.  Idea suggested by David Laight <dsl@>
2003-11-22 21:53:28 +00:00
lukem
2f6833c22a Provide X11FLAGS.OS_DEFINES.
Add some comments
2003-11-17 05:14:21 +00:00
lukem
ec71eec11f .c.lo: support per-target COPTS, CPPFLAGS, CPUFLAGS 2003-11-16 16:10:50 +00:00
lukem
abdaf2f3be simplify with _MKTARGET_LINK 2003-11-16 14:09:00 +00:00
matt
ac869c13c5 Add a AWK for awk. 2003-11-14 05:22:02 +00:00
matt
9e7bfda285 Use ${HOST_LN}
Fix how hppa gets to -lgcc_pic
2003-11-13 05:56:30 +00:00
matt
707e787138 Add a HOST_LN. 2003-11-13 05:54:44 +00:00
dsl
433a97cc58 Set MKDEP_SUFFIXES to get additional targets in .depend instead of using
sed in .afterdepend.  I don't think .afterdepend is used anywhere any more.
2003-11-11 11:43:45 +00:00
dsl
cd01ecc4cd Use -- to separate mkdep options from cc ones.
Avoids problems when the cc options start with -fpic.
2003-11-11 11:36:40 +00:00
dsl
e6dd2bf0d9 Use modified mkdep(1) (not cat) to merge '*.d' into '.depend'.
Allows some of the postprocessing to be done there instead of a separate
sed script called from 'afterdepend'.
2003-11-10 18:21:55 +00:00
mrg
92ce299301 switch to GDB 5.3 on armeb & m68000. 2003-11-09 02:54:50 +00:00
lukem
1d6c9bac12 The order of items in .SUFFIXES is extremely important!
Revert part of previous and put `.s .S' before `.c' again.

(Fixes recent libkern lossage.)
2003-11-08 23:14:45 +00:00
lukem
820345f78c Remove single suffix inference rules from here; nothing in the tree
relies upon them (AFAICT).

(This fixes the build issue with src/x11, because the .cpp rule in
bsd.x11.mk was being overridden by the .cpp rule here)
2003-11-08 06:06:50 +00:00
lukem
3b34d70c1d Trim .SUFFIXES to only contain those used in this file.
Reorder some variables appropriately.

Add chmod a+x in .sh:, as per SUSv3.
2003-11-08 05:33:37 +00:00
lukem
4c858a92f3 Support MAKEVERBOSE more effectively. 2003-11-07 00:05:24 +00:00
lukem
f8780e2dfa Support MAKEVERBOSE when installing man symlinks.
Note; this makes symlink installation more "chatty" in the MAKEVERBOSE=2
case, but results in more consistent operation for that level.
2003-11-06 22:59:03 +00:00
lukem
03ac03264c support MAKEVERBOSE for objdir creation messages 2003-11-06 22:47:22 +00:00
skrll
ad376176f9 Switch ARM to gdb 5.3.
XXX 26bit support isn't there at the moment.
2003-11-05 07:14:31 +00:00
scw
b4816bc53a Use MACHINE_CPU instead of MACHINE_ARCH to select the appropriate
architecture directory under sys/lkm/arch. This permits a single
directory to be used for bi-endian architectures.
2003-11-04 14:52:22 +00:00
mrg
79281abf48 switch sun2 to GCC3 2003-11-04 07:14:24 +00:00
sekiya
f17c77ee73 Use XFree86 4.x on sgimips. 2003-11-03 00:30:34 +00:00
lukem
443c980dcd use ${.PREFIX} instead of ${.TARGET:R} 2003-10-29 02:10:57 +00:00
mrg
76dbb1d8cc GCC3:
- move m68000 into "mostly working" section
GDB53:
- move m68000 & armeb into "in progress" section
- enable sh3eb
2003-10-28 07:22:55 +00:00
simonb
c78d65c886 Sort MACHINE_ARCH's in the GDB section. 2003-10-28 07:09:03 +00:00
mrg
45e224e8d4 fix a typo in previous pointed out by lukem 2003-10-28 01:25:33 +00:00
mrg
8dcb3c2e33 allow -traditional-cpp to be overridden when making dependancies 2003-10-27 23:52:57 +00:00
mrg
3b4ce5498c turn on GCC3 for armeb 2003-10-27 01:45:20 +00:00
uwe
1312264774 Mark GCC3 for sh3el as "mostly working". Remaining issues are
toolchain/22452 and toolchain/22489 (gcc's optimization/11937).
2003-10-27 01:35:12 +00:00
uwe
0f1f83b0cc Switch sh3el to GDB 5.3. 2003-10-27 01:29:58 +00:00
mycroft
08c9a64727 I have no idea how this built, given that there seems to be a syntax error... 2003-10-26 06:26:26 +00:00
mycroft
07ea22b5b8 Note that armeb needs GCC 3, and hppa and m68000 need GDB 5.3. 2003-10-26 05:45:05 +00:00
lukem
7f41288379 use ${HOST_SH} instead of sh 2003-10-26 03:29:44 +00:00
lukem
5daa33014e Improve how build.sh -N and MAKEVERBOSE interoperate;
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
2003-10-26 02:17:46 +00:00
simonb
8652f3d5d3 Switch MIPS to GDB 5.3 2003-10-26 01:29:34 +00:00
mycroft
b1f62a47b0 Throw the switch for mipseb and mipsel -- GCC 3 works. 2003-10-25 22:25:55 +00:00
matt
da19615924 Switch VAX to GDB 5.3 2003-10-25 19:02:55 +00:00
mycroft
68fd22e460 68k works with GCC 3 on next68k and amiga. Throw the switch. 2003-10-24 17:44:36 +00:00
skrll
6cbe1f3d8f gdb 5.3 for arm is in progress 2003-10-22 07:43:59 +00:00
lukem
7675cc90f4 Move the MAKEVERBOSE setup from <bsd.sys.mk> to <bsd.own.mk>, and
change all the variable assignments from = to ?=
2003-10-21 16:36:58 +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
chs
7e53301bb7 fix parallel-make race. 2003-10-20 01:53:02 +00:00
lukem
0e3525fabb Add MAKEVERBOSE pretty versions for .cc .cpp .cxx .C
Fix typo in .l.o and .y.o rule
2003-10-20 00:24:22 +00:00
lukem
094017b449 add _MKMSGCREATE.m 2003-10-19 14:23:02 +00:00
lukem
b606e4ebf0 support MAKEVERBOSE 2003-10-19 06:10:41 +00:00
lukem
d931e2e741 support MAKEVERBOSE 2003-10-19 05:24:53 +00:00
lukem
4afe0be65c support MAKEVERBOSE for .txi.info .texi.info .texinfo.info 2003-10-19 04:54:53 +00:00
lukem
bef75a2e23 add _MKMSGINSTALL.m 2003-10-19 03:53:33 +00:00
lukem
d2142fb492 fix _MKSHECHO for MAKEVERBOSE=1 2003-10-19 03:21:18 +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
e14dfde075 Add rules for .s .s.o .S .S.o to support per-source COPTS,CPUFLAGS,CPPFLAGS
and MAKEVERBOSE
2003-10-19 02:11:29 +00:00
matt
7cca41f35a Default MK{BINUTILS,CVS,GCCCMDS,POSTFIX,SENDMAIL,UUCP} to yes 2003-10-18 23:40:36 +00:00
lukem
f1e290c260 implement MAKEVERBOSE for rules which are of the form:
@cmp -s ${.ALLSRC} ${.TARGET} || ( echo cmd && cmd )
2003-10-18 16:41:19 +00:00
lukem
52a5f69154 implement MAKEVERBOSE for filesinstall 2003-10-18 16:40:47 +00:00
lukem
d1ac0f085b implement MAKEVERBOSE 2003-10-18 15:37:29 +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
fvdl
95641fb068 Enable gdb 5.3 for MACHINE_ARCH == x86_64 2003-10-14 02:08:02 +00:00
lukem
7b256958f1 Only try to KERNOBJDIR!= if the required directory exists. 2003-10-11 08:05:57 +00:00
jdolecek
5951c8215b if S is not already defined, use ${NETBSDSRCDIR}/sys or ${BSDSRCDIR}/sys to set
top of kernel source tree
2003-10-11 07:15:59 +00:00
matt
7744cd370c HPPA toolchain is now in-tree. 2003-10-06 05:19:32 +00:00
fvdl
852a11e722 Enable gcc3 for x86_64. 2003-10-05 02:22:30 +00:00
lukem
58d2d9a196 Set _LIBLDOPTS to set -Wl,-rpath-link -R -L appropriately based
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>
2003-09-30 07:24:23 +00:00
lukem
0f9e6cf359 Add LIBSTDCXX (for usr/lib/libstdc++.a).
Sync LIB* documentation with reality.
2003-09-29 01:06:37 +00:00
mycroft
b9556aa82f List VAX as non-GCC3. 2003-09-27 04:27:32 +00:00
christos
d1ec79f82d back out previous, suggested by gimpy. 2003-09-26 20:51:55 +00:00
christos
a28207daf8 entry for amd64->x86_64 map in gnu arch. 2003-09-26 20:40:29 +00:00
matt
c6d135e9c5 Switch Alpha to GDB5.3 2003-09-24 06:19:12 +00:00
matt
53ea4f5070 Switch PowerPC to GCC 3.3.1 and GDB 5.3. 2003-09-24 04:58:33 +00:00
christos
17a5344584 Turn on the switch for gdb53/m68k. Thanks Christian Limpach! 2003-09-23 13:45:27 +00:00
christos
802390c474 Add more comments for gdb-5.3 2003-09-22 14:50:51 +00:00
matt
f75f4d1a47 Add missing continuator. 2003-09-22 01:25:06 +00:00
matt
e99025e911 Switch MACHINE_ARCH arm to GCC 3.3.1 2003-09-21 20:16:47 +00:00
lukem
9c437ec754 Change LNFILES' to BUILDSYMLINKS', to more accurately describe its purpose.
Per discussion with Simon Gerraty.
2003-09-20 06:20:41 +00:00
martin
57b44eed3f Drop explicit medlow model and default to -O2 for sparc64. 2003-09-19 16:32:10 +00:00
mrg
ee467f4816 switch i386, sparc, sparc64 & alpha to GCC 3.3.1. 2003-09-19 08:15:46 +00:00
mrg
f9975d193b add a HAVE_GDB53 switch. defaults to no one yet. 2003-09-18 23:17:55 +00:00
lukem
e71fc1cc14 Check ${SHLIBDIR} against "/usr/lib" instead of ${LIBDIR} when determining
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)
2003-09-14 22:36:55 +00:00
lukem
6ede1ad4a2 in cleanx11man, support "MAN defaults to ${PROG}.1" 2003-09-13 20:39:45 +00:00
lukem
ee09f184e5 explicitly set BINDIR LIBDIR MANDIR here 2003-09-13 20:10:44 +00:00
lukem
403d124c72 implement MKSTATICLIB, which defaults to "yes". if "no" (which NOSTATICLIB
also sets, a la the other variables), prevents build and installation
of the "normal" static *.a libraries.
2003-09-13 19:08:26 +00:00
simonb
1cc7226c95 Fix a tyop, wrap some long lines. 2003-09-13 11:16:28 +00:00
erh
552531a249 Also support per-program LDFLAGS and LDSTATIC. 2003-09-13 03:44:20 +00:00
erh
056a75c41e Create a way to add additional flags to COPTS, CPPFLAGS, CXXFLAGS and LDADD
for particular libraries or programs by specifying the additions in mk.conf
instead of needing to go edit individual Makefiles.
2003-09-13 02:52:05 +00:00
lukem
ee20b1b408 sanitise ${DESTDIR}${SOMEOTHERVAR} 2003-09-13 00:16:10 +00:00
lukem
7be275a0ed add infrastructure to support reach-over builds of xsrc 2003-09-12 07:44:10 +00:00
lukem
5ec73d3c6d <bsd.x11.mk>: infrastructure to support reach-over builds of xsrc 2003-09-12 07:40:34 +00:00
lukem
959cbfd166 revert previous; there's too much hairy crap in sys/lkm/compat involving
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 ...
2003-09-04 08:27:08 +00:00
lukem
f212488840 simplify include symlink creation with LNFILES 2003-09-04 07:15:43 +00:00
lukem
d4ea794325 .PHONY cleanlnfiles 2003-09-03 07:09:39 +00:00
lukem
518360ab1a pull in <bsd.files.mk> incase LNFILES is used by <bsd.man.mk> user. 2003-09-03 05:40:12 +00:00
lukem
d18c364585 Implement LNFILES: a list of two word items:
lnsrc lntgt
For each lnsrc item, create a symlink named lntgt.
The lntgt symlinks are removed by the cleandir target.
2003-09-03 05:38:09 +00:00
uwe
ce52f77fb0 Now that HAVE_GCC3 is always defined, adjust the logic that selects if
NOPIC for sh3 should be set to check the value of HAVE_GCC3.
2003-09-01 09:38:42 +00:00
martin
a79495d23b Default sparc64 to XFree 4. 2003-08-29 10:51:21 +00:00
tron
1fc6b8eac2 Fix logic error in last change which caused GCC 3.x to be the default for
several platforms unintentionally.
2003-08-28 12:28:34 +00:00
mrg
1a086c6b25 introduce an additional switch to enable building GCC3 instead of GCC2:
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.
2003-08-27 16:03:17 +00:00
lukem
40a8a5734e Support ${LDFLAGS} when linking libraries 2003-08-24 09:35:49 +00:00
dsl
a33723f245 Add a ${PROG}.ro target that does an 'ld -r' of the program object files.
Allows a much simplified build of 'crunched' binaries since crunchgen can
build prog.ro instead of having to deretmine the names of all the .o files.
2003-08-22 19:17:00 +00:00
christos
4ef8a70c82 Disable -Wtraditional and explain why. 2003-08-22 18:07:21 +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
64b5a0fe7b Add INCSYMLINKS to <bsd.inc.mk> and <bsd.kinc.mk>, and use that instead of
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.
2003-08-03 09:23:14 +00:00
lukem
d65b74da7c 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".

Update documentation for some other make variables
2003-08-02 00:34:25 +00:00
mrg
e128feab59 use -isystem-cxx for now. update the "mostly ready to switch to gcc3" list 2003-08-01 22:51:34 +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
e1ba5f323e simplify the ${PROG}: target to reduce duplication between the DESTDIR
and !DESTDIR cases...
2003-08-01 13:08:35 +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
6874712934 Don't need -R/usr/lib; it will be searched at the end by ld.elf_so anyway.
Noted by matt green <mrg@>
2003-07-31 06:31:38 +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
c6fbe6d8e0 just add various files to ${DPSRCS} instead of trying to get
a ${DEPENDSRCS} target to DTRT
2003-07-29 02:42:49 +00:00
lukem
a0df1980db add bsd.dep.mk 2003-07-29 01:26:15 +00:00
lukem
bd166fb2bd * move .includes added in rev 1.5 to outside of .if defined(RPC_SVCFILES (oops)
* move ${DEPENDSRCS}: ...  to the end of the file
2003-07-29 01:12:46 +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
lukem
5aab21f43a be consistent when adding *.y and *.l to DPSRCS 2003-07-28 23:54: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
eb51573bd7 Use ${DEPENDSRCS} as a target instead of .depend, now that
<bsd.dep.mk> builds .depend from .dep files.
2003-07-28 15:25:02 +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
lukem
cc73d5607b replace MKCXXSUPCXX(!=no) with USE_LIBSTDCXX(==no) 2003-07-28 08:53:53 +00:00
lukem
0b96e890ae Change defined(CXX_SUPCXX) to MKCXXSUPCXX != "no".
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.
2003-07-28 07:03:43 +00:00
matt
1072487f05 Back last commit and just allow USE_TOOLS_TOOLCHAIN be overridden in the
environment.
2003-07-28 05:54:18 +00:00
matt
66430c1aa7 Let the if define USE_TOOLS_TOOLCHAIN. 2003-07-28 05:52:29 +00:00
lukem
e71812aa94 Overhaul how the .{c,cc,cpp,cxx,C,f,m.S}.{o,po,so} rules are implemented:
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)
2003-07-28 04:08:47 +00:00
lukem
5e2ad4afcc Be consistent how "multiple include protection" is implemented. I.e,
.if !defined(_BSD_foo_MK_)
	_BSD_foo_MK_=1

	# ...

	.endif	# !defined(_BSD_foo_MK_)
2003-07-28 02:38:33 +00:00
lukem
719829bd45 Pull in <bsd.sys.mk> before supplying our own .c.o (et al) rules.
Otherwise, <bsd.sys.mk>'s implementations will be used instead.  (oops!)
2003-07-28 02:29:35 +00:00
lukem
7cacdc7670 pull in <bsd.sys.mk> for TOOL_* incase this is used with USETOOLS=never 2003-07-28 01:00:52 +00:00
lukem
24da731a9c Pull in <bsd.sys.mk> as well, for the TOOL_ variables in the
USETOOLS=never case.
Found & fixed by Anders Hjalmarsson in PR misc/22283.
2003-07-28 00:57:25 +00:00
lukem
7a4d405e11 fix typo (insert botch? :) in previous, which broke .cxx.po 2003-07-28 00:51:47 +00:00
uwe
a82a596a31 Conditions for sh5 when setting DBG to be empty were deleted (moved)
in 1.72, but brought back accidentally in 1.73.  That was harmless,
anyway, as sh5 conditions in their new place get matched earlier.
2003-07-27 19:08:03 +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
422b438b9f Ensure the first word of ${CC} exists before attempting to invoke ${CC}
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@>.)
2003-07-27 11:16:30 +00:00
lukem
b7ebff3038 be consistent: use ${.TARGET} for $@ and ${.PREFIX} for $* 2003-07-27 09:35:47 +00:00
lukem
30872ad6e0 be consistent about using ${.TARGET} for $@ and ${.IMPSRC} for $< 2003-07-27 09:27:18 +00:00
mrg
badf45a38b add a new bsd.own.mk variable: CXX_SUPCXX. from bsd.README:
+ CXX_SUPCXX    If defined, the support libraries needed for this C++ program
+               are set to `-lsupc++ -lm', rather than `-lstdc++ -lm'.
2003-07-26 14:58:10 +00:00
mrg
9b2531b3d6 add a new variable USE_TOOLS_TOOLCHAIN that is set to "yes" currently, but
will be set to "no" when GCC3 is used in tree.
2003-07-25 16:24:08 +00:00
lukem
2c36cee56b update MKCRYPTO comment 2003-07-23 14:53:57 +00:00
itojun
e63468d8cc split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)
2003-07-23 08:01:24 +00:00
mrg
ad4196a2ab switch sparc port to xfree 4 tree. 2003-07-22 11:48:59 +00:00
lukem
29c0479a2a Add source-file-specific variables in <bsd.lib.mk> and <bsd.prog.mk>:
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.)
2003-07-22 06:53:21 +00:00
lukem
e87b2970a6 improve documentation for bsd.files.mk and bsd.kernobj.mk 2003-07-22 04:23:28 +00:00
lukem
b6bdfc6774 Consistently support the different C++ file extensions: .cc .cpp .cxx .C
Noted by Andrew White in PR toolchain/18246
2003-07-20 17:01:58 +00:00
lukem
0f7d7b4fad Use ltarg=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 && ltarg=`ls -ld $l | awk '{print $NF}'`
since the former is quicker and more concise.
2003-07-20 15:02:10 +00:00
lukem
14fc1c5b77 <bsd.init.mk> is a good idea 2003-07-20 14:53:10 +00:00
lukem
a36d55e898 LINKS: use stat -qf '%d %i' $l to read the device & inode # of the source
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.
2003-07-20 14:49:44 +00:00
lukem
65668567d3 add TOOL_STAT for stat(1) 2003-07-20 14:36:12 +00:00
lukem
758ffcd440 more reordering 2003-07-20 14:27:57 +00:00
lukem
e928ba19c8 move MKCATPAGES info. add MKHOSTOBJ info 2003-07-18 15:44:07 +00:00
lukem
f134f3dc38 Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
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.
2003-07-18 08:26:01 +00:00
lukem
87610a53a9 whitespace cleanup 2003-07-18 04:04:03 +00:00
lukem
4d63406463 Add MKMANZ; if not set to "no", compress the manual pages at installation time.
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.
2003-07-18 02:52:51 +00:00
lukem
e8de180da8 reorder to be a bit more useable (imho) 2003-07-18 00:33:18 +00:00
lukem
7b7ea97741 Change the default TOOLDIR from
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".
2003-07-16 13:19:49 +00:00
itojun
e26b0e0cf5 stop installing install libtelnet. build under lib/libtelnet and reference
it from usr.bin/telnet and libexec/telnetd.
(reason for separate build: compiler flags)
2003-07-16 05:42:01 +00:00
lukem
8e7657a643 Be consistent with other bsd.*.mk, and pull in <bsd.init.mk> at the
start (which pulls in <bsd.own.mk>), and <bsd.obj.mk> and <bsd.sys.mk>
at the end.  These provide the appropriate settings for TOOL_* .
2003-07-14 00:52:12 +00:00
lukem
d72803be72 Pull in <bsd.sys.mk> to provide the defaults for TOOL_* when USETOOLS=never 2003-07-14 00:50:04 +00:00
lukem
f0dafe0c0e use full path in default TOOL_MAKEWHATIS 2003-07-14 00:41:17 +00:00
lukem
001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
marcus
36874b6c58 With gcc3, PIC code can be created for sh3. 2003-07-02 15:37:21 +00:00
wiz
61ddcbc141 Adapt CATDEPS/HTMLDEPS for groff-1.19. 2003-06-30 18:49:05 +00:00
wiz
ee660f962d Add NROFF. 2003-06-30 18:48:52 +00:00
drochner
03caf45b83 For consistency, use "-R" instead of "-Wl,-rpath" to pass
a runtime search path to the linker.
2003-06-27 17:30:16 +00:00
drochner
a915fb6b1e Use ${CC} instead of ${LD} to build shared objects.
(g)cc has all the knowledge which startfiles/libgcc to
use, so we don't need to duplicate all that here.

Externally visible change:
Shared objects are linked against libgcc_pic.a now
(if the in-tree gcc2 is used). This fixes problems with
dlopen()'ed objects referencing libgcc functions not used
(thus not linked in) by the main program.
2003-06-27 17:27:11 +00:00
drochner
672eca1975 provide a variable pointing to the directory where
the gcc provided crt*.o are located
2003-06-27 17:13:27 +00:00
tshiozak
e376aa8308 Citrus iconv support(3)
add host tools : mkcsmapper and mkesdb
  mkcsmapper - coded character set mapping table compiler
  mkesdb - encoding scheme database compiler
2003-06-26 06:30:07 +00:00
tron
085b2ab641 Fix "clean" rule to honor "CLEANFILES" variable. 2003-06-24 09:49:07 +00:00
itojun
ded3919389 define LIBEVENT 2003-06-13 04:04:18 +00:00
provos
5522c1a3bb add LIBEVENT 2003-06-12 23:26:19 +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
msaitoh
535480c5be catch signal 1,2,3,13 and 15 to clean /tmp/_dependXXX 2003-06-11 04:56:58 +00:00