Commit Graph

1304 Commits

Author SHA1 Message Date
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
thorpej
000836e000 If EXTERNAL_TOOLCHAIN is defined, allow the compiler to define the
location of crt{begin,end}{,S}.o and libgcc.a.  Encapsulate all of
this logic into the new bsd.gcc.mk, and use it in bsd.prog.mk and
bsd.lib.mk.
2003-05-31 20:33:15 +00:00
thorpej
22791b9867 Add a CPUFLAGS variable which can be set by the user's mk.conf or in
the environment:

CPUFLAGS        Additional flags to the compiler/assembler to select
                CPU instruction set options, CPU tuning options, etc.

Since CPUFLAGS is not implicitly set by any part of the make infrastructure,
it is safe to set in mk.conf, unlike COPTS or DBG.
2003-05-30 18:43:23 +00:00
wiz
53588c2a8b Back this out until I know why it does not work. 2003-05-27 21:43:32 +00:00
wiz
43075c01c6 Use && instead of ; to only overwrite a file if the corresponding sed worked (from christos).
Add .cpp rules.
2003-05-27 19:32:18 +00:00
wiz
f338b31357 Add .cpp dependency rules. 2003-05-27 19:30:45 +00:00
wiz
135b433e9c s/${ECHO}/@echo/, since we don't define ECHO in share/mk. 2003-05-26 12:38:59 +00:00
lukem
76a3147d38 Remove dependency on ${RPCGEN}:
*	Unnecessarily causes lib/librpcsvc (etc) to be rebuilt every time
	rpcgen is updated.
    *	No other "generated" file (.l, .y, ...) depends upon its tool
    	like this
    *	As <bsd.own.mk> wasn't being pulled in, the tools/ version
    	wasn't being used, so a lot of times the dependency was wrong.

Fixes [toolchain/11568] by Bernd Ernesti.
2003-05-19 07:19:10 +00:00
lukem
4ae3ede358 Only determine TARGET_ENDIANNESS if it's not already defined. 2003-05-18 08:19:03 +00:00
lukem
65e312f75f Add ${TOOL_DB}; db(1) as a (host) tool.
Note: this is the first tool using a "TOOL_" prefix in the make(1) variable;
other similar "non-standard" variable names will be converted in the future.
2003-05-18 08:09:25 +00:00
lukem
03a26b2c80 make this a no-op if HOSTPROG is defined 2003-05-18 07:36:23 +00:00
dbj
f1e0ecadf7 remove dependencies on ${LIBC} ${LIBM} and ${LIBTERMCAP} static libraries
from host tool targets.  Commits fix from PR toolchain/21495
2003-05-14 00:24:06 +00:00
christos
b024767c0c Fix _HOST_CYGWIN lossage. 2003-05-08 20:39:00 +00:00
salo
1b089357bd Whitespace. 2003-05-08 18:59:06 +00:00
christos
e9672445c0 Hacks for limited command and environment space (John Gordon) 2003-05-08 13:34:07 +00:00
christos
61987b916a Deal with CYGWIN's sh screwage. 2003-05-08 13:02:09 +00:00
fvdl
6fd55b60ac Add -mcmodel=kernel to CFLAGS for amd64. 2003-05-07 22:36:06 +00:00
yamt
7fb7b24fed make RPC_XDRFILES depend on files in right directory. 2003-05-07 13:41:22 +00:00
fvdl
cfb43ff372 Default to -O2 for x86_64. 2003-05-04 12:05:50 +00:00
scw
ee96a063f1 Build shared libraries by default on sh5. They seem stable enough now. 2003-04-29 14:59:02 +00:00
fvdl
ee5c723638 Correct previous. MACHINE is amd64. MACHINE_ARCH is x86_64. 2003-04-27 10:15:01 +00:00
tron
ef4a5d5fc9 x86_64 -> amd64 2003-04-27 10:10:28 +00:00
fvdl
e937aee3c1 another x86_64 -> amd64 2003-04-26 20:55:40 +00:00
fvdl
0945a6df17 x86_64 -> amd64 2003-04-26 19:02:50 +00:00
matt
275eeea6c9 The __wrap_* symbols need to become local symbols. If you have module
x which is dependent y but they both have __wrap_foo, if the __wrap_foo
is not localized, you will get linker truncation messages.
2003-04-23 18:34:20 +00:00
christos
2b009f6aa8 fix lossage caused by previous commit. 2003-04-22 12:55:26 +00:00
christos
6fab16d795 PR/6257: Izumi Tsutsui: bsd.lib.mk should set target only if LIB is defined. 2003-04-20 21:57:17 +00:00
thorpej
9d788d6da1 Provide the MKPICLIB value in bsd.own.mk, rather than bsd.lib.mk. It
is sometimes necessary for non-library Makefiles to determine if _pic
libraries are being built.

Problem pointed out by Havard Eidnes.
2003-04-11 22:40:31 +00:00
thorpej
44d9add676 If MACHINE_ARCH is powerpc and we HAVE_GCC3, add crtsaveres.o to the
endfile spec.
2003-03-30 00:35:07 +00:00
fvdl
bb218b78eb gcc for x86_64 should be safe enough these days to enable -O by default. 2003-03-29 22:12:06 +00:00
christos
9453ca1e91 add x86 to the cleanfiles for i386 and x86_64 (Hi Frank!) 2003-03-27 17:05:14 +00:00
pooka
d223236902 add file as a host tool 2003-03-25 23:35:48 +00:00
thorpej
b48666e01a Add a HEXDUMP host tool. 2003-03-07 01:21:56 +00:00
fvdl
9f9a0457aa Add more special cases to create include directory symlinks, for archs
that take include files from a subdir != ${MACHINE_ARCH} (ew).
2003-02-27 11:09:59 +00:00
uwe
c18a5386dc Typo in comment. 2003-02-22 04:46:08 +00:00
matt
f65e1190f5 When making a LKM for powerpc, add function trampolines to undefined
functions.  This makes LKMs functional for powerpc.
2003-02-19 19:03:41 +00:00
thorpej
14dfb2cab0 Add LIBPTHREAD, LIBPTHREAD_DB, and LIBRT. 2003-01-24 02:06:37 +00:00
scw
3402e518ba The sh5 toolchain works fine with -O2 now. 2003-01-21 09:19:01 +00:00
lukem
4bb41ae2f2 Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile.  Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
2003-01-06 17:40:18 +00:00
sommerfeld
24d16bebd2 Add bsd.rpc.mk to FILES 2003-01-05 23:37:02 +00:00
sommerfeld
d4b8f1f9fe Common makefile fragment for invoking rpcgen. See bsd.README for
documentation on the parameters which control this fragment's behavior.
2003-01-05 19:18:52 +00:00
lukem
144b55005f Rework METALOG manipulation:
- add '-D ${DESTDIR}' to INSTPRIV, so install(8) removes the leading
  ${DESTDIR} from the metalogged path
- provide ${METADB.add} variable (for "${CAT} -l >> ${METALOG}"), to make
  it easier to replace manual metalog manipulation in the future.
- with manual metalog additions, don't add the leading ${DESTDIR} in the path
- in maketars, use "mtree -C ..." instead of
  "mtree -D ... | sed -e 's,\(.*\) \(\..*\),\2 \1,";

Benefits:
- maketars "Parsing METALOG" step speeds up from 29 seconds to 1.2 seconds
  on a P3-600.
  (This also benefits "make installworld" at the top level.)
- ${DESTDIR}/METALOG is easier to read without the leading "${DESTDIR}"
  on all the pathnames, and it's smaller as well.
2002-12-23 06:52:48 +00:00
lukem
1bf2d8180e Only set INSTPRIV?= if "inside" a NetBSD src tree (i.e, ${_SRC_TOP_} != "").
Fixes a problem found by Andrew Brown where programs outside of the NetBSD
src that use the /usr/share/mk framework (such as pkgsrc/pkgtools/digest)
couldn't be installed if /usr/src/etc wasn't present.
2002-12-23 02:23:57 +00:00
lukem
4234e2eefe correct a comment 2002-12-23 02:01:29 +00:00
lukem
787757666a add SUNLABEL 2002-12-21 12:58:13 +00:00
jwise
a3a041633d Add a brief description of DPSRCS, whose discovery recently shortened two
Makefiles of mine by a few lines. :-)
2002-12-20 16:05:16 +00:00
lukem
7805822da2 Add "-N ${NETBSDSRCDIR}/etc" to ${INSTPRIV}, so that non-host ${INSTALL_*}
rules use that directory to lookup users & groups as opposed to the
host system's passwd(5) and group(5) databases.

This is a change of behaviour which should make the build system more
robust when new users & groups are added to the NetBSD source.

The only users who may be adversely affected are those (small number,
if any) that renumber the uids & gids away from the "standard" NetBSD
ones; in this case said users should maintain local mods to
${NETBSDSRCDIR}/etc/{master.passwd,group} ...
2002-12-19 12:44:03 +00:00
thorpej
c4a72b6436 Centralize the definition of the tool name prefix (i.e. "nb") into
bsd.own.mk, as the _TOOL_PREFIX variable.
2002-12-08 20:19:56 +00:00
lukem
9145235642 Deprecate SYS_INCLUDE and the optional SYS_INCLUDE=symlinks functionality,
and only support the "copies" default.
Per discussion on tech-userlevel@.
2002-11-26 23:15:53 +00:00
thorpej
16f21f8705 * If EXTERNAL_TOOLCHAIN is defined, consider it to be the root of
where the GNU tools are found, e.g. ${EXTERNAL_TOOLCHAIN}/bin/...
* Allow MACHINE_GNU_PLATFORM to be set in mk.conf.
2002-11-26 19:51:16 +00:00
thorpej
e4637c735b sh64 -> sh5, which matches the names that the NetBSD-targeted GNU
toolchain uses for 32-bit SH5.  OK'd by steve.
2002-11-26 19:30:13 +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
841722bb50 Add -Wno-sign-compare to CFLAGS. 2002-11-25 03:03:13 +00:00
thorpej
6dba3a7439 Split crtbegin/crtend into crti/crtbegin/crtend/crtn. NetBSD-specific
things like the .note.netbsd.ident section are provided by crti/crtn.
crti/crtn also provide the _init() and _fini() routines.

crtbegin/crtend now only provide support for ctors/dtors.  This paves
the way to using the "crtstuff" provided with GCC (when we upgrade to
GCC 3.3), which provides, among other things, much better C++/Java
exception handling.
2002-11-22 06:44:56 +00:00
itohy
cbb1f0fb0f MKDYNAMICROOT for a.out 2002-11-12 14:33:48 +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
5d2465f251 Now that the compiler does the right thing with -KPIC, we no longer
need to add it (or -fpic, for that matter) explicitly when building
shared libraries on MIPS.
2002-11-09 08:22:04 +00:00
perry
8885724457 Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.
2002-10-22 18:48:27 +00:00
thorpej
09a0767aa9 Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located.  Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only.  SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-27 21:37:50 +00:00
thorpej
0f181e084a Back out previous; it was incomplete. 2002-09-27 17:03:08 +00:00
thorpej
6a244932ed Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
2002-09-27 15:56:39 +00:00
itojun
d24389cf67 MDC2 is a patented algorithm; don't ship it in default libcrypto.
MKCRYPTO_MDC2 will build a separate library, libcrypto_mdc2.
2002-09-26 13:05:54 +00:00
lukem
2f7d49d929 Enable MKDYNAMICROOT=yes by default.
This means that:
    +	/bin and /sbin (and the few programs in /usr/* which were statically
	linked) are now dynamically linked.
    +	The shared libraries that are needed by the /bin and /sbin programs
	are now installed into /lib (with compatability symlinks from
	/usr/lib).  These are:
		c crypt edit ipsec kvm m m387 termcap termlib util z
    +	The shared linker is now in /libexec/ld.elf_so, and
	/usr/libexec/ld.elf_so is a symlink to the former.

If you want the prior behaviour of "some applications statically linked,
the rest dynamically linked", set MKDYNAMICROOT=no in your mk.conf(5).

If you have a philosophical objection to dynamic libraries, continue
to set LDSTATIC=-static in your mk.conf(5), and please don't waste any
more time in trying to convince us why dynamic libraries are 3v1l.
2002-09-22 15:08:17 +00:00
thorpej
3b08abd277 * Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:

  TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
  no working in-tree toolchain (hppa, ns32k, sh5, x86_64).

  EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
  an external toolchain (e.g. /usr/local/gnu).  This enables the cross-build
  framework even for TOOLCHAIN_MISSING platforms.

  If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
  unconditionally set to "no", since the bits are not there to build.

  If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
  since the external toolchain's compiler is not in-sync with the
  in-tree compiler support components (e.g. libgcc).

* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
  that file can use it.
2002-09-17 23:18:25 +00:00
thorpej
2f50b4a3fb No longer have to invoke lorder with the shell explicitly; the host
tool is patched to use the working shell as the interpreter.
2002-09-15 17:07:14 +00:00
thorpej
4c81eb7f69 If DESTDIR is set, add ${DESTDIR}/usr/libdata to the lint library
search path.  This works around the problem of lint using the
wrong lint libraries until a "lint -d ..." equivalent is implemented
for libraries.
2002-09-14 16:56:10 +00:00
thorpej
5d0c1f4d8b * Add MKTEMP as a host tool.
* Pass MKTEMP to lorder, and invoke lorder with sh.
2002-09-14 05:01:45 +00:00
thorpej
3e19f8e1f0 Build a .gdbinit in the objdir when building a program. The .gdbinit
file sets the shared library prefix to ${DESTDIR}, and adds "sources"
directives for each file listed in the GDBINIT Makefile variable.
2002-09-08 03:59:02 +00:00
lukem
08e7e88032 In the MKDYNAMICROOT==yes case, move the shared linker from /lib/ld.elf_so to
/libexec/ld.elf_so.  Per discussion with a few other developers.
2002-08-28 09:57:10 +00:00
lukem
ed401558f2 Implement MKDYNAMICROOT, which currently defaults to "no", but will
be changed in the future to "yes".

If MKDYNAMICROOT == "no", there is no change from existing behaviour
of a static /bin and /sbin (and a few programs in elsewhere).

If MKDYNAMICROOT == "yes", the following changes occur:
    in <bsd.own.mk>:
	SHLIBDIR?=     /lib
	SHLINKDIR?=	/lib
    in various Makefiles, the following entry is DISABLED.
	LDSTATIC?=-static
This results in all programs (except those "standalone" programs built
in sys/arch/*/stand) are linked dynamically, the shared linker is moved
from /usr/libexec to /lib (with a compat symlink), and the shared
libraries used by /bin and /sbin programs are moved from /usr/lib to
/lib (with compat symlinks).
2002-08-27 14:46:11 +00:00
lukem
9aa0322535 don't bother with "rm -f $$t" before ${INSTALL_LINK} or ${INSTALL_SYMLINK},
as they default to using install(1) -r.
the rm can cause problems in certain situations, such as moving a library or
shared linker that install(1) depends upon to another location and replacing
it with a (sym)link.
2002-08-24 13:12:38 +00:00
lukem
811a3185a3 Explicitly note that if NOxxx and USE_SHLIBDIR are set by a Makefile,
it must be before <bsd.own.mk> is included.
2002-08-19 14:51:58 +00:00
thorpej
364a2bbe9c Add LIBPMC. 2002-08-09 00:21:22 +00:00
chris
07bc5d7a16 Default cats to using X 4.
Also correct macppc entry while here.
2002-08-03 22:10:07 +00:00
jdolecek
6dbfb914a2 add 'sun68k' to CLEANFILES for sun2/sun3
add 'sparc' to CLEANFILES for sparc64
2002-07-29 07:42:52 +00:00
mrg
eca4d02c51 be sure to link "sparc" dir as well, for sparc64 2002-07-20 11:44:31 +00:00
mrg
83a8e86ca3 add -Wa,-Av8plus to CFLAGS if we are building for 32bit sparc 2002-07-20 11:43:34 +00:00
yamt
4f420b3122 - add CSHLIBFLAGS.
- fix typos in comment.
2002-07-20 08:50:10 +00:00
mycroft
6b3df890c5 USE_XF86_4 on macppc. 2002-07-17 20:02:15 +00:00
fredette
f53ba8285a Now build profiled libraries on m68000. 2002-07-17 18:46:12 +00:00
scw
cad6d3b034 Add MKBFD=no for SH5. 2002-07-11 15:30:03 +00:00
scw
8debe49965 SH5 Makefile Magic. 2002-07-11 15:00:57 +00:00
tron
2bd3a8cf3c Use XFree86 4.x by default on i386 and x86_64.
This change was approved by Frank van der Linden.
2002-07-03 11:51:34 +00:00
fredette
fbd75fdec9 Enabled building PIC on hppa. Also don't use a --netbsdelf GNU target name. 2002-07-01 19:31:12 +00:00
fredette
cb3f47b13c Like on x86_64, don't use -O at all with the hppa compiler. 2002-07-01 19:30:36 +00:00
fredette
9c5d82c38e Added a temporary workaround when building libraries for hppa:
link in libgcc to get the millicode routines.
2002-07-01 19:29:31 +00:00
lukem
cbc959037f add CAT here too 2002-06-11 16:25:11 +00:00
mason
7e7e806c7e Add cat(1) as a host tool. 2002-06-10 18:32:28 +00:00
fredette
964be1b6b3 Add cases for hppa. 2002-06-10 14:14:47 +00:00
itojun
608d40cf27 sync LIBxx with bsd.prog.mk
XXX bsd.prog.mk and bsd.hostprog.mk defines very similar thing
- can we unify them? at least the definition?
2002-06-09 04:04:32 +00:00
thorpej
fc4bb28e9c Don't -I${DESTDIR}/usr/include without -nostdinc'ing, first. Some
versions of GCC are unhappy with that.
2002-06-05 02:47:56 +00:00
thorpej
055791361b Some changes to facilitate fixing the toolchain issue on ns32k:
* Don't make OBJECT_FMT dependent on USE_NEW_TOOLCHAIN.  All ports
  except ns32k are ELF, so set it appropriately.  Allow it to be
  overridden in the ns32k case.
* If ns32k && USE_NEW_TOOLCHAIN, don't build shared libraries, because
  external toolchains don't support them for our a.out.
* If ns32k && OBJECT_FMT == ELF, the GNU platform is "netbsdelf".
* If ns32k && USE_NEW_TOOLCHAIN, don't attempt to build the in-tree
  binutils 2.11.2, gdb 5.0, or gcc 2.95.3.

This allows us to do USE_NEW_TOOLCHAIN cross-builds to ns32k using
an external toolchain.
2002-06-05 02:42:09 +00:00
thorpej
a46ef4e6ab Don't use -traditional-cpp if HAVE_GCC3. 2002-06-04 21:14:59 +00:00
thorpej
f7e9eefade Add case for armeb. 2002-06-04 21:13:21 +00:00
itojun
8dea09ecf9 comment 2002-05-30 21:55:14 +00:00
msaitoh
0a2fcbab95 remove duplicated -Wpointer-arith when WARNS=2 2002-05-30 21:44:07 +00:00
itojun
dbbcec2c04 have bsd.endian.mk, which detects target endian.
generate *.db in target endian.  (see tech-userlevel for discussions)
2002-05-30 21:40:47 +00:00
bjh21
bf9ec67e38 Add fgen as a host tool, used for sys/arch/sparc/bootblk. 2002-05-28 21:56:05 +00:00
thorpej
0ee3170e4d Add cases for "armeb" (big-endian ARM). 2002-05-20 14:34:07 +00:00
lukem
2ba24b706f remove now-unnecessary SPARCINSTALLBOOT 2002-05-07 12:13:54 +00:00
eeh
25dfe267a1 Don't add -DBIGPIC to APICFLAGS. 2002-05-07 02:06:32 +00:00
eeh
90c1726789 Turn on 32-bit relocations for sparc64 PIC code. 2002-05-07 01:45:45 +00:00
kleink
98807c1129 Add PREPMKBOOTIMAGE. 2002-05-03 20:38:42 +00:00
lukem
d918d8f74f Move the METALOG from ${_SRC_TOP_OBJ_} to ${DESTDIR}.
There were too many synchronisation problems with using the former;
including situations such as a "make clean" performed between two
installs to the same DESTDIR would result in a truncated METALOG and
the resultant sets would be missing stuff such as include files that
don't get reinstalled if they haven't changed, even with !UPDATE.
2002-05-03 08:58:45 +00:00
simonb
e8fbd2c7f5 Make the ELF2ECOFF assignment an "?=" assignment so it won't override the
setting in bsd.own.mk.
2002-05-02 13:13:53 +00:00
sommerfeld
36dc09c47d make(1) specifies, regarding :: targets:
Sources for a target do not accumulate over dependency lines
	when this operator is used.

An unstated implication of this is that when parallel builds are done,
each separate instance of the target can be scheduled independantly.
As a result, the linksinstall target with commands could be executed
too early during a parallel build since they didn't actually have a
dependancy on "realinstall".

To fix this, correct the linksinstall:: realinstall dependancy by
eliminating the command-less linksinstall target, and moving the
dependancy to the other linksinstall target.
2002-04-30 14:29:01 +00:00
wiz
61f5aedc2a sh3e[bl] uses new toolchain, so remove an .elsif that doesn't make sense
anymore.
2002-04-29 19:27:07 +00:00
groo
d11fdcc492 Complete the switch to NEW_TOOLCHAIN for sh3e[lb]. 2002-04-26 19:16:04 +00:00
lukem
82172c42f6 Implement NETBSDSRCDIR, which is the top level of the NetBSD source tree.
Defaults to the directory determined by the _SRC_TOP_ logic (if != ""),
and the BSDSRCDIR.

NETBSDSRCDIR has been provided for use by the various NetBSD source
Makefiles to find the top of the NetBSD source tree, and isn't
affected by the inheritance properties of _SRC_TOP_, nor does it
have the magic BSDOBJDIR baggage that BSDSRCDIR is stuck with.
2002-04-26 15:02:02 +00:00
lukem
46569c985e Revert part of previous; don't set _SRC_TOP_ to BSDSRCDIR if it can't be
determined, since BSDSRCDIR's default of /usr/src might not exist and the
calculation of _SRC_TOP_OBJ_ would then generate a warning :-(.
_SRC_TOP_ can now == "" if make(1) (or a parent make(1)) was started
outside of the NetBSD source tree.

Now, if _SRC_TOP_ != "",  BSDSRCDIR defaults to ${_SRC_TOP_} and
BSDOBJDIR defaults to the objdir of ${BSDSRCDIR}.

Failsafe defaults for BSDSRCDIR (/usr/src) and BSDOBJDIR (/usr/obj)
are provided later in the file.

This should result in a usable BSDSRCDIR default (i.e, _SRC_TOP_ if
running from within the source tree), with safe fallbacks as appropriate
(/usr/src, as always), meaning that BSDSRCDIR should be able to be used
instead of _SRC_TOP_ in the source tree, although I need to carefully
test this.  *aaaiiiieeee!!!*.  (Now I understand some of Todd's pain :)
2002-04-26 14:27:23 +00:00
lukem
2c1cfc8e8c - in <bsd.files.mk>, don't clear FILES after using it, as that prevents
make -V FILES
  from being useful (and given that every other variable can be
  extracted using make -V, the behaviour was unusually inconsistent
  given that the original reason for clearing it doesn't seem to be
  relevant anymore)
- use <bsd.prog.mk> instead of directly including <bsd.files.mk>
  (and possibly <bsd.man.mk> or <bsd.own.mk>)
- remove obsolete NOPROG
2002-04-24 08:18:45 +00:00
lukem
756722c3c1 Overhaul how _SRC_TOP_ is determined, ensuring that it will be set to
${BSDSRCDIR} if make(1) is running outside of the NetBSD source tree.
This should solve various issues, including building xsrc which uses
${BSDSRCDIR}/distrib/sets/maketars.
2002-04-23 07:20:22 +00:00
bjh21
93fb47689e Sun Workshop C 5.0 objects to generating object files with suffixes other than
.o.  Work around this by generating host object files with a .lo.o suffix and
then renaming to .lo.
2002-04-23 00:15:45 +00:00
itojun
49d6a0d5af document MKxxx/NOxxx naming rule. 2002-04-19 03:08:05 +00:00
itojun
9b96df2ed3 NOCRYPTO is no longer used and has no effect, so remove documentation 2002-04-16 03:47:32 +00:00
lukem
987817d952 add ELF2ECOFF 2002-04-12 05:08:53 +00:00
lukem
0476c683f0 replace BSDSRCDIR with _SRC_TOP_, since the latter is more likely to
be "accurate".  document _SRC_TOP_.
2002-04-10 15:05:41 +00:00
jdolecek
a4fee01be9 Only attempt to make the machine links for targets 'depend', 'all',
'dependall'.
This fixes misc/16227 by Stoned Elipot.

XXX this solution is not ideal
2002-04-09 17:14:38 +00:00
wiz
8237994500 No more arm32. 2002-04-08 12:25:22 +00:00
jdolecek
a5abace5e2 Do what rev. 1.50 intented using .BEGIN, g/c target 'machine-links'.
Making ${OBJS} and ${DPSRC} depend on target which is always out of date is
_really_ bad idea.
2002-04-06 17:49:02 +00:00
lukem
266f41b284 add INSTALLBOOT. sort some entries in bsd.sys.mk 2002-04-03 05:32:58 +00:00
bjh21
15b0cb61a9 Add a default for CAP_MKDB. 2002-04-01 13:30:24 +00:00
bjh21
c3e2abe891 Add CKSUM. 2002-03-31 15:01:39 +00:00
bjh21
c18727ccec MACHINE_ARCH can't be "arm26", so don't bother checking for that. 2002-03-31 14:59:04 +00:00
bjh21
407daa978b Provide a default for PWD_MKDB. 2002-03-31 11:48:45 +00:00
matt
6c83577293 Change VAX to default to new toolchain. 2002-03-30 21:53:27 +00:00
tv
75032d5369 COPTS is for target objects, not host objects. 2002-03-29 18:58:19 +00:00
matt
c670c2a754 Don't complain if vax && ELF. 2002-03-28 06:59:39 +00:00
eeh
f0a7e18ff6 Use the medium low model for sparc64 programs that don't 2GB of data segment. 2002-03-27 05:40:54 +00:00
eeh
72feb11b6e Reserve %g4 for backwards compatibility with the old ABI. 2002-03-27 05:39:00 +00:00
fredette
ba0d9b105c In the machine-links target, the sun2 also needs a sun68k symlink.
Plan ahead and make it on the sun3 also.
2002-03-26 23:13:08 +00:00
shiba
a3b10f5127 Switch mac68k to ELF. Now the default executable binaries are ELF.
Approved by Scott,briggs,fredb,wormey
2002-03-25 14:03:05 +00:00
bjh21
2d53252971 MACHINE_ARCH == "arm26" hasn't been valid for some time, so don't check
for it.
2002-03-24 22:32:00 +00:00
thorpej
9c33b55e7c Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

	* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
	  of the infratsructure (libraries, support programs, etc.)

	* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
	  building of support for using the corresponding API
	  in various libraries/programs that can use it.

As discussed on tech-toolchain.
2002-03-22 18:10:19 +00:00
pk
ad92811bb5 `linksinstall' cannot be issued in parallel with other realinstall sources. 2002-03-21 12:59:56 +00:00
pk
2918ae233f Target dependencies again: `machine-links' must be made before $DPSRCS.
We now have
	all => $PROG => $OBJS => $DPSRCS (if present) => machine-links
2002-03-21 12:54:21 +00:00
lukem
328fa6b19f use ${VAR:D:U...} if we only want a value in the undefined case 2002-03-19 22:17:23 +00:00
lukem
1995e199a3 Change library installation.
Instead of:
	install -m 600 [...]
	ranlib -t [...]
	chmod 444 [...]
use the newly added "-a" flag to install(1) to invoke ranlib ifndef UPDATE.
Should prevent unnecessary ranlib-ing of installed libraries with UPDATE
defined.

Per discussion with simonb.
2002-03-19 14:39:22 +00:00
lukem
1e73b16611 - ensure that check_DESTDIR and check_RELEASEDIR are always available,
even if USETOOLS==no.
- wrap setting of DESTDIR?= with own USETOOLS==yes check.

should fix a problem noted on current-users with USETOOLS=no
2002-03-19 11:03:05 +00:00
bjh21
6ee155e761 We never set MACHINE_ARCH to "arm26" so remove the MACHINE_GNU_ARCH mapping
for it.
2002-03-18 18:42:52 +00:00
thorpej
43c6552a49 Add a BUILDID variable, which further qualifies object directories. 2002-03-14 18:26:32 +00:00
tv
cb25cef027 Remove the ability to set "USE_NEW_TOOLCHAIN=no" explicitly. This is a
one-way transition, so once it's defined by default for a port, it can't
be turned off.
2002-03-09 15:17:45 +00:00
lukem
1142a4b638 oops; should define check_DESTDIR before setting default for DESTDIR... 2002-03-05 03:53:58 +00:00
lukem
4b99ad4ad4 provide check_DESTDIR and check_RELEASEDIR targets in <bsd.own.mk>
and use those rather than local versions
2002-03-05 03:51:21 +00:00
pk
c26b4a92e2 Serialize access to $INFODIR/dir; multiple instances of `install-info'
would trash that file.
2002-03-01 15:42:10 +00:00
pk
721880b0bc Fix target order: the machine links must be present before compiling object
files.
2002-02-28 15:55:50 +00:00
is
92a181b637 Move Amiga PORT to ELF and new toolchain. Still missing:
support in UPGRADE to move old shared libs to /emul/aout
2002-02-15 21:28:03 +00:00
matthias
dd580ad301 ".else if" doesn't work, thus everything was "COFF". Changed to ".elif". 2002-02-15 10:20:24 +00:00
mycroft
09819b05ef Don't use .PHONY for targets that are actually installed. Instead use force
dependencies.  (Among other things, `make -t install' does something vaguely
sensible now.)
2002-02-11 21:14:58 +00:00
pk
9d602b9ca3 Mark installed system libraries as .MADE only if we're actually establishing
their default variable values here.
2002-02-07 07:43:24 +00:00
ross
a3f340931b Honor MANSUBDIR when installing md html pages. 2002-02-07 01:56:02 +00:00
ross
8a40adb0ab if NOMAN is defined, also define NOHTML 2002-02-07 00:53:34 +00:00
ross
57170e8ef5 fix html sources, they were depending on -mdoc, not -mdoc2html 2002-02-07 00:52:23 +00:00
christos
e7f0a97835 s/.NOSUFF/.MADE/ 2002-02-04 17:25:44 +00:00
thorpej
300e827b31 * Turn lint and profiling on for SuperH.
* Turn lint on for m68000.
2002-02-04 08:49:04 +00:00
thorpej
085ea65576 Allow PIC on SuperH if HAVE_GCC3 is defined. 2002-02-03 23:52:23 +00:00
christos
944602ca01 Apply a .NOSUFF: directive to targets we don't want to have processed by
the suffix rules engine.
2002-02-03 21:40:14 +00:00
veego
e2e1706f05 Ups, it is LIBUSBHID and not LIBUSBHIB. 2002-02-02 16:54:26 +00:00
veego
3de557e57f Change LIBUSB to LIBUSBHIB, reflecting the library name change. 2002-02-02 16:49:52 +00:00
tv
9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
thorpej
f8e5e3f153 Simplify OBJECT_FMT assignment:
* All new-toolchain platforms are ELF.
* Else, if SuperH, old toolchain is COFF.
* Else, a.out.
2002-01-29 19:17:49 +00:00
tv
aaa9568b4c rpcgen now accepts CPP from the environment; set it here for TOOLDIR builds. 2002-01-29 10:21:35 +00:00
enami
d85411d9e1 Mark the targets clean{extra,objs} as PHONY. 2002-01-29 03:09:54 +00:00
thorpej
186e6c6ef1 Make sun2 use the new toolchain. 2002-01-28 21:46:49 +00:00
thorpej
546bb05742 GNU_ARCH.m68000=m68010 2002-01-28 19:22:52 +00:00
thorpej
fbf7ff9f0c m68000 also gets "-netbsdelf", for consistency with m68k. 2002-01-28 01:44:19 +00:00
thorpej
82405f125e Reverse the sense of the check for new-toolchain platforms. Instead,
list the MACHINE_ARCHs and MACHINEs that have NOT yet converted to
the new-toolchain.
2002-01-28 00:37:25 +00:00
ross
de50fe2e64 Drink ALL the Kool-Aid.
(Move -mieee from lib/ to bsd.*.mk; new var MKIEEEFP defaults to yes.)
2002-01-27 23:33:51 +00:00
reinoud
7eeda2c9b1 Some targets were obmitted in the .PHONY declaration in the bsd.own.mk file
resulting in (number of suffix rules) times stat() calls to be made to the
kernel.

Also fixing typo cheanhtml to cleanhtml.
2002-01-26 23:53:00 +00:00
lukem
47737da33b add $PAX to both, and $MAKEFS to bsd.sys.mk 2002-01-25 05:21:40 +00:00
mrg
e00fc7b09f add SUNLABEL & SPARCINSTALLBOOT. 2002-01-19 13:32:52 +00:00
tv
1e3d9d1775 Remove parentheticals from _HOST_OSREL, to avoid them showing up in
directory names (which would confuse shells).
2002-01-15 19:13:59 +00:00
lukem
328430b633 revert previous, and reenable tools/makefs now that it works on
netbsd-current and netbsd-1-5
2002-01-10 05:17:20 +00:00
tv
bc23e55bd1 Disable makefs in src/tools for the moment; it's very dependent on -current
NetBSD headers and sources right now.  (Temporary workaround for PR 15175.)
2002-01-09 16:58:35 +00:00
mrg
e5a41e331a generate man pages into a temporary file and rename it if groff succeeds.
this avoids a problem where groff was dumping core and leaving empty
manpage.catN files, that would later not be rebuilt.
2002-01-06 01:27:25 +00:00
mrg
ed3bd49a81 add ${ZIC} 2002-01-05 07:34:08 +00:00
mrg
b193186a84 add ${MAKEFS} 2002-01-05 07:29:31 +00:00
thorpej
5da850da23 For PROG_CXX DESTDIR builds, pull in -lstdc++ and -lm regardless
of GCC version.
2002-01-04 19:07:18 +00:00
thorpej
4a756ca168 Switch the MIPS ports to the new-toolchain. 2002-01-04 06:23:41 +00:00
tv
06f06e280f Add more tolerant script-based implementation of mkdep for host tool
compiles.  Based loosely on mkdep.old.compiler (so CSRG license copied),
but now uses just one rewrite (awk) process per cpp invocation and
determines the proper way to run cpp and awk via a "configure" script.

Use HOST_MKDEP in bsd.hostlib/hostprog.mk (defaulting to the old override
value of MKDEP), and give it a TOOLDIR equivalent in bsd.own.mk.
2002-01-03 22:45:23 +00:00
tv
f5a9d4e145 Don't end up with a "rm -f" statement with no args. Fixes toolchain/15074. 2002-01-03 19:11:17 +00:00
thorpej
3797a3f56f Remove x86-64 "nolint" hack. 2002-01-02 23:58:18 +00:00
thorpej
6e1a67a44b Remove the "MKLINT=no if HAVE_GCC3" hack; a patch to support lint
comments has been submitted to the GCC maintainers, so if you're
using a GCC 3.x that doesn't support lint, set MKLINT=no in mk.conf.
2002-01-02 23:48:19 +00:00
thorpej
4c0be6ef79 If HAVE_GCC3 is set, force MKLINT to "no", since GCC 3.x's C pre-processor
does not yet support our lint(1).
2002-01-01 01:44:29 +00:00
thorpej
d68ee9d8e3 Per a suggestion from matthew green, PROG_CXX takes the place of
PROG for C++ programs.
2002-01-01 01:38:25 +00:00
thorpej
c32d4e9692 Don't set NOPROFILE for x86-64. 2002-01-01 01:17:32 +00:00
thorpej
48a03ed537 Document PROG_CXX and HAVE_GCC3. 2002-01-01 00:34:26 +00:00
thorpej
04520355fe * If PROG_CXX is set by the program's Makefile, use ${CXX} to link
the program rather than ${CC}.
* If HAVE_GCC3 is defined, pull in "-lstdc++ -lm" as additional C++
  support libraries for DESTDIR builds.
2002-01-01 00:27:06 +00:00
thorpej
3b7fb63d99 Document MKBFD, MKGDB, MKGCC. 2001-12-31 23:11:05 +00:00
thorpej
1c95f6c025 * Remove -Wno-format -fno-builtin from CFLAGS in the x86-64 case.
* Default MKBFD, MKGDB, and MKGCC to "yes".  Set them to "no" for
  x86-64.
2001-12-31 23:06:34 +00:00
thorpej
73b83787ee Don't put CPP flags in CFLAGS. 2001-12-28 07:49:26 +00:00
thorpej
5e53e8bb6a Add -ffreestanding to CFLAGS. 2001-12-28 07:48:39 +00:00
thorpej
20f59a49c7 x86_64 doesn't use the "new toolchain" but it doesn't really use the
old one either.  The "new toolchain" environment is closer to what we
want, however, for using the external toolchain currently required for
x86_64, so set USE_NEW_TOOLCHAIN for x86_64.
2001-12-28 06:57:41 +00:00
lukem
56640963f5 cosmetic tweak on an older comment 2001-12-28 01:40:50 +00:00
lukem
efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00
minoura
ebfadba677 ELF!! 2001-12-24 11:38:04 +00:00
chs
450ff86b66 convert luna68k to ELF. ok'd by nisimura. 2001-12-22 23:38:20 +00:00
thorpej
ab25dcd90e Switch alpha to the new toolchain. 2001-12-20 18:29:47 +00:00
tv
26375a1710 Remove -Wa,-Av9a hack from <sys.mk> and relegate it to the places that need
it (kernel and libc).

The current version of the gas assembler in the tree (2.11.2) already
defaults to generating object files for "-Av9 -64", supporting V9
instructions in ELF64 object format.  "-Av9a" is only needed for specific
parts of the NetBSD base sources, and not for all third-party code.
2001-12-19 21:17:59 +00:00
tv
35bea081fe Always depend on ${MANPAGES}, so deliberately pre-generated files are
built automatically (even without a ${MANSUFFIX}).
2001-12-17 21:27:45 +00:00
scw
18449b952b Switch all OBJECT_FMT=elf m68k ports to new-toolchain. 2001-12-16 20:31:09 +00:00
thorpej
a676fd1679 Err, after consulting FSF's config.sub, shl -> shle. 2001-12-15 01:50:33 +00:00
thorpej
a78b7669d7 MACHINE_GNU_ARCH for sh3el is "shl". sh3eb and sh3el ELF targets
are also named "netbsdelf".
2001-12-15 00:39:08 +00:00
explorer
1411757e4a install bsd.hostlib.mk, since bsd.hostprog.mk is and things in /usr/src/tools wants it. 2001-12-14 05:46:47 +00:00
lukem
b0b0a32ad7 Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
2001-12-12 12:24:19 +00:00
thorpej
3ff7b8a100 Per suggestion from Todd:
Wrap assignments of various tools within USETOOLS_BINUTILS and
USETOOLS_GCC (names reflect the FSF packages the tools are provided
by), which default to "yes", for easy testing of different versions
of these packages.
2001-12-12 05:50:09 +00:00
tv
f845c9ab5f Revert rev. 1.228. If USE_NEW_TOOLCHAIN is set to "yes" explicitly by the
user on a platform that is not *OFFICIALLY* switched to the new toolchain,
WE REALLY, REALLY DO WANT A LOUD WARNING AT THE START OF THE BUILD!
2001-12-12 03:39:27 +00:00
tv
ae87b37058 Revert previous. This breaks many things, since such variables as LD and AS
are defined in <sys.mk>!

A better way needs to be devised for this.
2001-12-12 03:28:37 +00:00
tv
8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
thorpej
ebb6a06799 Set the following vars with FOO?= so that alternative versions
can be specified in mk.conf: AR, AS, LD, NM, OBJCOPY, OBJDUMP,
RANLIB, SIZE, and STRIP.

This, along with some symlinks in TOOLDIR, makes it much easier to
test different versions of the GNU toolchain (e.g. binutils-current).
2001-12-12 00:50:27 +00:00
tv
e690fbabcd Major readability cleanups. 2001-12-11 23:25:23 +00:00
jmc
0ce9aa8e6c Add pwd_mkdb as a toolchain bit for builds 2001-12-07 02:28:53 +00:00
jmc
92a08ecf01 If USE_NEW_TOOLCHAIN is defined and set to yes treat that as a match (and then
reset it to nowarn so it lines up with ported platforms).
2001-12-04 04:25:21 +00:00
thorpej
89c7818994 Ah, don't actually need MAKEWHATIS here. 2001-11-29 23:55:33 +00:00
thorpej
79b30cbdeb Provide ${MAKEWHATIS}. 2001-11-29 23:53:23 +00:00
wiz
d245a498c0 Remove spurious '.' in line 42, as reported by Naoto Shimazaki on
current-users on Thu, 29 Nov 2001 09:17:16.
2001-11-29 11:57:21 +00:00
jmc
9083f42414 There's no need for TMACDIR here after all. Anything using it is using it for
FILES installs so it can't have DESTDIR in front of it (and those Makefiles
all explicitly set it).
2001-11-28 23:32:16 +00:00
tv
8f2c8e583f Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.
2001-11-28 20:19:08 +00:00
tv
43453698f5 Use :U successfully this time. In an expression such as ${FOO:D:Ubar}, you
end up with empty string if FOO is defined, and `bar' if it is undefined.
2001-11-28 20:12:47 +00:00
jmc
df5817fef0 Make sure the tools built roff tools are first in the path before calling groff
as it calls troff/etc without any leading pathnames. Otherwise the tools
version is fairly useless as the installed system version will be used to
build all manpages
2001-11-28 05:03:18 +00:00
jmc
20bb75f3c3 Separate out TMACDIR's use for install's from it's dependency function.
The dependency should be against the TOOLDIR files (is USETOOLS=yes) but
installs will always use ${DESTDIR}/usr/share/tmac.

Without this if people do not have /usr/share/tmac/tmac.andoc on their
systems while building the build will break in the groff areas due to
the dependency rules.
2001-11-28 05:01:28 +00:00
tv
632cac0d3c Add <bsd.hostlib.mk>, for use when building a host-specific library
(to be used with src/tools/compat).
2001-11-28 04:42:49 +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
jmc
2e1248a6d9 If using MAKEOBJDIRPREFIX use the same checks as the symlink logic does below.
i.e. if the root of the object tree doesn't exist then complain and exit.

This makes both sections consistant to each other (MAKEOBJDIR specifies an
exact directory so there's no root per se to check so nothing can really be
done there).
2001-11-27 05:42:24 +00:00
jmc
423e88b943 Ok, take 2 on redoing KERNOBJDIR logic.
Use the old setup for MAKEOBJDIRPREFIX but also add a new check for
_SRC_TOP_OBJ_ and use that if it's set. This allows a make release using
build.sh (which uses MAKEOBJDIR patterns) to function correctly on r/o
source tree's.
2001-11-27 05:39:03 +00:00
jmc
6c76413f2f Back out last. Typo'd some things I need to test again 2001-11-27 05:17:31 +00:00
jmc
917bc8ae24 Change logic around for kernel objdir handling.
Use MAKEOBJDIRPREFIX as before if it's set

otherwise if _SRC_TOP_OBJ_ is set and isn't "" use it as the base for the
obj dir
2001-11-27 05:11:41 +00:00
jmc
60ec3c749b Revert check for NOGCCERROR back to a .if \!defined as the :U check will break
anyone with NOGCCERROR=1 in their mk.conf
2001-11-26 06:11:20 +00:00
jmc
900d713ff9 Back out last change until some more testing is done. Should account for folks
not using objdirs and also force this to cd to $_SRC_TOP_ before doing the
make obj
2001-11-25 23:40:08 +00:00
jmc
d271a36466 Before checking the value from PRINTOBJDIR force a make obj at $_SRC_TOP_. 2001-11-25 09:06:00 +00:00
perry
8382183dca 1) Use the -r flag for INSTALL_SYMLINK and INSTALL_LINK, just like
INSTALL_FILE does.
2) Patch around a bug that has been biting people in which bsd.own.mk
   attempts to cd into space when building outside of the tree. I may
   have a better solution for the whole thing later.
2001-11-24 21:26:34 +00:00
perry
6385e197e2 Now that install has been fixed to deal with -r in the symlink case,
make bsd.lib.mk use INSTALL_SYMLINK instead of mv and ln -s.
Note: There is still one weird case I left alone, in which symlinks
get built in the objdir. I didn't want to log metadata for those links
so I left the old machinery in for them.
XXX do we even need that elaborate dance for the ln's in the objdir?
2001-11-24 21:23:38 +00:00
tv
d00721de07 :U can't be used to test for existence, as the variable may contain an
arbitrary value; change back to .if !defined().  Problem noted by
bernd@arresum.inka.de in PR toolchain/14629.
2001-11-20 17:12:22 +00:00