From: Matthew Dillon Date: Mon, 22 Mar 2004 20:58:27 +0000 (+0000) Subject: This represents a major update to the buildworld subsystem. X-Git-Tag: v2.0.1~11709 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/1397f94aa1ea2d43221112b01475edd90c2b1be4 This represents a major update to the buildworld subsystem. Compartmentalize the bootstrap/buildtools, the cross-build setup, and the world stage. /usr/obj/usr/src is now far more readable (e.g. /usr/obj/usr/src/{btools_i386,ctools_i386_i386,world_i386}). Use a completely private command path for the world stage of the build. The bootstrap/buildtools stage compiles all required system programs (like rm, ln, chmod, etc). At the moment the build compiles everything it needs, but this can be augmented later to 'cp' the required binaries into btools_ instead of building them, including potentially copying the compiler binaries so the ctools_ build could use a private path too). The 'buildworld' target now properly removes all object modules for all major stages. Several new targets have been added to reduce build times, the most useful of which is 'quickworld', which skips the btools and ctools stages (they must have already been built). sys.mk has been augmented to support .nx binaries and .no object modules, which are built using ${NXCC} and friends, which always uses the system's native compiler rather then potentially using the cross-build compiler, for generating helper programs during the build. This way we do not have to special-case building the helper programs in an earlier stage as FreeBSD does. Fix a bug in 'wmake', which simulates the buildworld environment for piecemeal compilation/testing. It was not using /usr/src/share/mk. Add additional .ORDER: constraints to better support make -j N (incomplete). Note that recent changes to the DragonFly scheduler make it more likely for buildworld to trip over parallel make races. TOOLS_PREFIX was used to generate cross-compiler directory targets for exec'd utility binaries and access to libraries and include files. However, in the new compartmentalized breakdown the cross compiler's utility binaries will reside in ctools_* while the include files and libraries are expected to be installed and accessed in world_*. Add a USRDATA_PREFIX which defaults to TOOLS_PREFIX to allow the cross compilation stage to separate the two entities. --- diff --git a/Makefile b/Makefile index 0a0158f436..b9793f2342 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ # # $FreeBSD: src/Makefile,v 1.234.2.19 2003/04/16 09:59:40 ru Exp $ -# $DragonFly: src/Makefile,v 1.4 2004/03/20 16:27:39 drhodus Exp $ +# $DragonFly: src/Makefile,v 1.5 2004/03/22 20:57:17 dillon Exp $ # # The user-driven targets are: # # buildworld - Rebuild *everything*, including glue to help do # upgrades. +# quickworld - Skip bootstrap, build and cross-build tool steps +# realquickworld - Skip above steps, plus depend +# crossworld - Just do the bootstrap, build, and cross-build steps # installworld - Install everything built by "buildworld". # world - buildworld + installworld. # buildkernel - Rebuild the kernel and the kernel-modules. @@ -87,7 +90,8 @@ # Define the user-driven targets. These are listed here in alphabetical # order, but that's not important. # -TGTS= all all-man buildkernel buildworld checkdpadd clean \ +TGTS= all all-man buildkernel buildworld crossworld quickworld \ + realquickworld checkdpadd clean \ cleandepend cleandir depend distribute distributeworld everything \ hierarchy install installcheck installkernel \ reinstallkernel installmost installworld libraries lint maninstall \ diff --git a/Makefile.inc1 b/Makefile.inc1 index ef1155b60a..8e727a7599 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1,6 +1,6 @@ # # $FreeBSD: src/Makefile.inc1,v 1.141.2.62 2003/04/06 19:54:00 dwmalone Exp $ -# $DragonFly: src/Makefile.inc1,v 1.22 2004/03/21 03:48:38 dillon Exp $ +# $DragonFly: src/Makefile.inc1,v 1.23 2004/03/22 20:57:17 dillon Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -21,10 +21,13 @@ # -DNO_DOCUPDATE do not update doc in ${MAKE} update # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # TARGET_ARCH="arch" to crossbuild world to a different arch - # # The intended user-driven targets are: +# # buildworld - rebuild *everything*, including glue to help do upgrades +# quickworld - skip the glue and do a depend+build on the meat +# realquickworld - skip the glue and depend stages and just build the meat +# crossworld - only build the glue (particularly the cross-build environment) # installworld- install everything built by "buildworld" # update - convenient way to update your source tree (eg: sup/cvs) # most - build user commands, no libraries or include files @@ -126,7 +129,18 @@ SUPFLAGS?= -g -L 2 -P - SUPFLAGS+= -h ${SUPHOST} .endif +# Object directory base in primary make. Note that when we rerun make +# from inside this file we change MAKEOBJDIRPREFIX to the appropriate +# subdirectory because the rest of the build system needs it that way. +# The original object directory base is saved in OBJTREE. +# MAKEOBJDIRPREFIX?= /usr/obj +OBJTREE?= ${MAKEOBJDIRPREFIX} + +# Used for stage installs and pathing +# +DESTDIRBASE?= ${OBJTREE}${.CURDIR} + TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} TARGET?= ${MACHINE} @@ -139,19 +153,32 @@ BUILD_ARCH!= sysctl -n hw.machine_arch .error To cross-build, set TARGET_ARCH. .endif .endif -.if ${MACHINE} == ${TARGET} -OBJTREE= ${MAKEOBJDIRPREFIX} -.else -OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET} -.endif -WORLDTMP= ${OBJTREE}${.CURDIR}/${MACHINE_ARCH} -# /usr/games added for fortune which depend on strfile -STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games -TMPPATH= ${STRICTTMPPATH}:${PATH} + +# BTOOLS (Natively built) All non-cross-development tools that the +# main build needs. This includes things like 'mkdir' and 'rm'. +# We will not use the native system's exec path once we start +# on WORLD. (bootstrap-tools and build-tools or BTOOLS) +# +# CTOOLS (Natively built) Cross development tools which are specific +# to the target architecture. +# +# WORLD (Cross built) Our ultimate buildworld, using only BTOOLS and +# CTOOLS. +# +# MACHINE_ARCH Architecture we are building on +# TARGET_ARCH Architecture we are building for +# +BTOOLSDEST= ${DESTDIRBASE}/btools_${MACHINE_ARCH} +CTOOLSDEST= ${DESTDIRBASE}/ctools_${MACHINE_ARCH}_${TARGET_ARCH} +WORLDDEST= ${DESTDIRBASE}/world_${TARGET_ARCH} + +# The strict temporary command path contains all binaries required +# by the buildworld system after the cross-tools stage. +# +STRICTTMPPATH= ${CTOOLSDEST}/usr/sbin:${CTOOLSDEST}/usr/bin:${CTOOLSDEST}/bin:${CTOOLSDEST}/usr/games:${BTOOLSDEST}/usr/sbin:${BTOOLSDEST}/usr/bin:${BTOOLSDEST}/bin:${BTOOLSDEST}/usr/games TMPDIR?= /tmp TMPPID!= echo $$$$ -INSTALLTMP= ${TMPDIR}/install.${TMPPID} # # Building a world goes through the following stages @@ -174,90 +201,76 @@ INSTALLTMP= ${TMPDIR}/install.${TMPPID} # This stage installs a previously built world. # -# Common environment for world related stages -CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ - MACHINE_ARCH=${TARGET_ARCH} \ - MACHINE=${TARGET} \ - OBJFORMAT_PATH=${WORLDTMP} \ - PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 \ - GROFF_BIN_PATH=${WORLDTMP}/usr/bin \ - GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \ - GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac - # bootstrap-tool stage -BMAKEENV= MAKEOBJDIRPREFIX=${WORLDTMP} \ +# +BMAKEENV= MAKEOBJDIRPREFIX=${BTOOLSDEST} \ + OBJTREE=${OBJTREE} \ DESTDIR= \ INSTALL="sh ${.CURDIR}/tools/install.sh" + BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \ -DNO_WERROR # build-tool stage -TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \ +# +TMAKEENV= MAKEOBJDIRPREFIX=${BTOOLSDEST} \ + OBJTREE=${OBJTREE} \ DESTDIR= \ INSTALL="sh ${.CURDIR}/tools/install.sh" -TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING + +TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ + -DNO_FORTRAN # cross-tool stage -XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB +# +# note: TOOLS_PREFIX points to the obj root holding the cross +# compiler binaries, while INCS_PREFIX points to the obj root holding +# the target environment (and also determines where cross-built +# libraries and crt*.o are installed). +# +XMAKEENV= MAKEOBJDIRPREFIX=${CTOOLSDEST} \ + OBJTREE=${OBJTREE} \ + DESTDIR=${CTOOLSDEST} \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + TOOLS_PREFIX=${CTOOLSDEST} \ + USRDATA_PREFIX=${WORLDDEST} + +XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNO_FORTRAN -DNO_GDB + +# world stage, note the strict path and note that TOOLS_PREFIX is left +# unset and USRDATA_PREFIX (which defaults to TOOLS_PREFIX) is set to empty, +# which is primarily for the compiler so it targets / (e.g. /usr/) +# for both binary and library paths, even though it is being compiled to +# WORLDDEST. None of the programs in the world stage are ever actually +# executed during the buildworld/installworld. +# +CROSSENV= MAKEOBJDIRPREFIX=${WORLDDEST} \ + OBJTREE=${OBJTREE} \ + MACHINE_ARCH=${TARGET_ARCH} \ + MACHINE=${TARGET} \ + OBJFORMAT_PATH=${CTOOLSDEST} \ + PERL5LIB=${WORLDDEST}/usr/libdata/perl/5.00503 \ + GROFF_BIN_PATH=${WORLDDEST}/usr/bin \ + GROFF_FONT_PATH=${WORLDDEST}/usr/share/groff_font \ + GROFF_TMAC_PATH=${WORLDDEST}/usr/share/tmac -# world stage WMAKEENV= ${CROSSENV} \ - DESTDIR=${WORLDTMP} \ + DESTDIR=${WORLDDEST} \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ - PATH=${TMPPATH} + PATH=${STRICTTMPPATH} + WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 # install stage IMAKEENV= ${CROSSENV} \ - PATH=${STRICTTMPPATH}:${INSTALLTMP} + PATH=${STRICTTMPPATH} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 # kernel stage KMAKEENV= ${WMAKEENV} \ - OBJFORMAT_PATH=${WORLDTMP}:${OBJFORMAT_PATH} - -# /usr/bin/gccX version-specific gcc binaries -# /usr/lib/gccX version-specific gcc libraries -# /usr/libexec/gccX version-specific gcc helper binaries -# /usr/libexec/binutilsXXX version-specific binutils - -USRDIRS= usr/bin \ - usr/lib/gcc2 usr/lib/gcc3 \ - usr/libexec/gcc2 usr/libexec/gcc3 \ - usr/lib/compat/aout usr/games \ - usr/libdata \ - usr/libexec/binutils212 \ - usr/libexec/binutils212/elf \ - usr/libexec/binutils212/aout \ - usr/libexec/binutils212/ldscripts \ - usr/libexec/binutils214 \ - usr/libexec/binutils214/elf \ - usr/libexec/binutils214/ldscripts \ - usr/sbin usr/share/misc \ - usr/share/dict \ - usr/share/groff_font/devX100 \ - usr/share/groff_font/devX100-12 \ - usr/share/groff_font/devX75 \ - usr/share/groff_font/devX75-12 \ - usr/share/groff_font/devascii \ - usr/share/groff_font/devcp1047 \ - usr/share/groff_font/devdvi \ - usr/share/groff_font/devhtml \ - usr/share/groff_font/devkoi8-r \ - usr/share/groff_font/devlatin1 \ - usr/share/groff_font/devlbp \ - usr/share/groff_font/devlj4 \ - usr/share/groff_font/devps \ - usr/share/groff_font/devutf8 \ - usr/share/tmac/mdoc usr/share/tmac/mm - -# XXX remove in favor of the BSD.include.dist mtree that we already have. -# -INCDIRS= arpa dev c++/2.95 isc libmilter objc openssl \ - protocols readline rpc rpcsvc security + OBJFORMAT_PATH=${CTOOLSDEST}:${OBJFORMAT_PATH} -# # buildworld # # Attempt to rebuild the entire system, with reasonable chance of @@ -269,19 +282,23 @@ _worldtmp: @echo ">>> Rebuilding the temporary build tree" @echo "--------------------------------------------------------------" .if !defined(NOCLEAN) - rm -rf ${WORLDTMP} + rm -rf ${BTOOLSDEST} ${CTOOLSDEST} ${WORLDDEST} .else # XXX - These two can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif -.for _dir in ${USRDIRS} - mkdir -p ${WORLDTMP}/${_dir} + mkdir -p ${DESTDIRBASE} ${BTOOLSDEST} ${CTOOLSDEST} ${WORLDDEST} +.for _dir in ${WORLDDEST} ${BTOOLSDEST} ${CTOOLSDEST} + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ + -p ${_dir}/ > /dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${_dir}/usr > /dev/null .endfor -.for _dir in ${INCDIRS} - mkdir -p ${WORLDTMP}/usr/include/${_dir} -.endfor - ln -sf ${.CURDIR}/sys ${WORLDTMP} + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${WORLDDEST}/usr/include > /dev/null + ln -sf ${.CURDIR}/sys ${WORLDDEST} + _bootstrap-tools: @echo @echo "--------------------------------------------------------------" @@ -289,23 +306,21 @@ _bootstrap-tools: @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${BMAKE} bootstrap-tools _cleanobj: -.if !defined(NOCLEAN) @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 2: cleaning up the object tree" + @echo ">>> stage 2a: cleaning up the object tree" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} -.endif _obj: @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 2: rebuilding the object tree" + @echo ">>> stage 2b: rebuilding the object tree" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} par-obj _build-tools: @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 2: build tools" + @echo ">>> stage 2c: build tools" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${TMAKE} build-tools _cross-tools: @@ -317,40 +332,56 @@ _cross-tools: _includes: @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 4: populating ${WORLDTMP}/usr/include" + @echo ">>> stage 4a: populating ${WORLDDEST}/usr/include" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes _libraries: @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 4: building libraries" + @echo ">>> stage 4b: building libraries" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG libraries _depend: @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 4: make dependencies" + @echo ">>> stage 4c: make dependencies" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} par-depend everything: @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 4: building everything.." + @echo ">>> stage 4d: building everything.." @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} all +# note: buildworld no longer depends on _cleanobj because we rm -rf the +# entire object tree and built the bootstrap tools in a different location. +# +# buildworld - build everything from scratch +# quickworld - skip the bootstrap, build, and cross-build steps +# realquickworld - skip the bootstrap, build, crossbuild, and depend step. +# +# note: we include _obj in realquickworld to prevent accidental creation +# of files in /usr/src. WMAKE_TGTS= .if !defined(SUBDIR_OVERRIDE) WMAKE_TGTS+= _worldtmp _bootstrap-tools .endif -WMAKE_TGTS+= _cleanobj _obj _build-tools +WMAKE_TGTS+= _obj _build-tools .if !defined(SUBDIR_OVERRIDE) WMAKE_TGTS+= _cross-tools .endif WMAKE_TGTS+= _includes _libraries _depend everything buildworld: ${WMAKE_TGTS} + +quickworld: _obj _includes _libraries _depend everything + +realquickworld: _obj _includes _libraries everything + +crossworld: _worldtmp _bootstrap-tools _obj _build-tools _cross-tools + .ORDER: ${WMAKE_TGTS} # @@ -380,15 +411,7 @@ installcheck: # Installs everything compiled by a 'buildworld'. # distributeworld installworld: installcheck - mkdir -p ${INSTALLTMP} - for prog in [ awk cap_mkdb cat chflags chmod chown \ - date echo egrep find grep \ - ln make makewhatis mkdir mtree mv perl pwd_mkdb rm sed sh sysctl \ - test true uname wc zic; do \ - cp `which $$prog` ${INSTALLTMP}; \ - done cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//} - rm -rf ${INSTALLTMP} # # reinstall @@ -484,7 +507,7 @@ buildkernel: mkdir -p ${KRNLOBJDIR} .if !defined(NO_KERNELCONFIG) cd ${KRNLCONFDIR}; \ - PATH=${TMPPATH} \ + PATH=${STRICTTMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ ${KERNCONFDIR}/${_kernel} .endif @@ -591,7 +614,7 @@ installmost: # to attempt to manually finish it. If in doubt, 'make world' again. # -# bootstrap-tools: Build tools needed for compatibility +# bootstrap-tools: Build all tools required to build all tools. # # [x]install: dependancies on various new install features # rpcgen: old rpcgen used a hardwired cpp path, newer OBJFORMAT_PATH @@ -602,22 +625,40 @@ _strfile= games/fortune/strfile .endif bootstrap-tools: -.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef \ - usr.bin/uudecode usr.bin/xinstall usr.bin/rpcgen \ - usr.sbin/config \ - gnu/usr.bin/gperf gnu/usr.bin/groff gnu/usr.bin/texinfo - ${ECHODIR} "===> ${_tool}"; \ +.for _tool in ${_strfile} \ + bin/chmod bin/cp bin/dd bin/mkdir bin/rm bin/echo bin/test \ + bin/cat bin/date bin/ln bin/mv bin/csh bin/expr bin/sh bin/ls \ + bin/hostname \ + sbin/sysctl \ + usr.bin/yacc usr.bin/colldef usr.bin/uudecode usr.bin/xinstall \ + usr.bin/m4 usr.bin/rpcgen usr.bin/make gnu/usr.bin/awk usr.bin/file \ + usr.bin/find usr.bin/lex usr.bin/sed usr.bin/uname usr.bin/touch \ + usr.bin/mkdep usr.bin/mktemp usr.bin/lorder usr.bin/file2c \ + usr.bin/tsort usr.bin/tr usr.bin/join usr.bin/wc usr.bin/basename \ + usr.bin/gencat usr.bin/chflags usr.bin/expand usr.bin/paste \ + usr.bin/mklocale usr.bin/uuencode usr.bin/compile_et \ + usr.bin/vi usr.bin/cap_mkdb usr.bin/vgrind usr.bin/true usr.bin/false \ + usr.bin/cmp usr.bin/xargs usr.bin/id \ + usr.sbin/chown usr.sbin/mtree usr.sbin/config \ + usr.sbin/btxld usr.sbin/pwd_mkdb usr.sbin/zic \ + gnu/usr.bin/gperf gnu/usr.bin/groff gnu/usr.bin/texinfo \ + gnu/usr.bin/grep gnu/usr.bin/sort gnu/usr.bin/patch \ + gnu/usr.bin/gzip gnu/usr.bin/perl gnu/usr.bin/man/makewhatis + ${ECHODIR} "===> ${_tool} (bootstrap-tools)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all; \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${BTOOLSDEST} install .endfor # build-tools: Build special purpose build tools. gcc2 related tools are # only built under the i386 architecture. Other architectures are # gcc3-only. # +# XXX we may be able to remove or consolidate this into bootstrap-tools +# now that we have the native helper (.nx/.no) infrastructure. +# .if exists(${.CURDIR}/games) && !defined(NOGAMES) _games= games/adventure games/hack games/phantasia .endif @@ -658,17 +699,16 @@ _libkrb5= kerberos5/lib/libroken kerberos5/lib/libvers \ _sysinstall= release/sysinstall .endif -# build-tools: tools we need -# build-tools: -.for _tool in bin/csh bin/sh ${_games} ${_gcc2_tools} ${_gcc3_tools} \ +.for _tool in ${_gcc2_tools} ${_gcc3_tools} \ ${_fortran} ${_perl} ${_libroken4} ${_libkrb5} \ - lib/libncurses ${_share} usr.bin/awk usr.bin/file \ - ${_sysinstall} - ${ECHODIR} "===> ${_tool}"; \ + ${_share} ${_sysinstall} + ${ECHODIR} "===> ${_tool} (build-tools)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ - ${MAKE} DIRPRFX=${_tool}/ build-tools + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${BTOOLSDEST} install .endfor # @@ -686,12 +726,12 @@ cross-tools: .for _tool in ${_btxld} ${_elf2exe} ${_binutils} \ usr.bin/objformat usr.sbin/crunch/crunchide \ ${_gcc2_cross} ${_gcc3_cross} - ${ECHODIR} "===> ${_tool}"; \ + ${ECHODIR} "===> ${_tool} (cross-tools)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all; \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${CTOOLSDEST} install .endfor # @@ -731,6 +771,7 @@ _startup_libs= lib/csu/${MACHINE_ARCH}-elf .else _startup_libs= lib/csu/${MACHINE_ARCH} .endif +_startup_libs+= lib/libc _prebuild_libs= @@ -799,7 +840,16 @@ _startup_libs3: ${_startup_libs3:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} _generic_libs: ${_generic_libs:S/$/__L/} -.for __target in clean cleandepend cleandir depend includes obj +# library targets must be ordered because there are inter-library +# races (e.g. generation of tconfig.h) +# +.ORDER: ${_startup_libs2:S/$/__L/} +.ORDER: ${_startup_libs3:S/$/__L/} +.ORDER: ${_startup_libs:S/$/__L/} +.ORDER: ${_prebuild_libs:S/$/__L/} +.ORDER: ${_generic_libs:S/$/__L/} + +.for __target in clean cleandepend cleandir obj depend includes .for entry in ${SUBDIR} ${entry}.${__target}__D: .PHONY @if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ @@ -814,20 +864,28 @@ ${entry}.${__target}__D: .PHONY ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ .endfor par-${__target}: ${SUBDIR:S/$/.${__target}__D/} +.ORDER: ${SUBDIR:S/$/.${__target}__D/} .endfor +.ORDER: par-clean par-cleandepend par-cleandir par-obj par-depend par-includes # The wmake target is used by /usr/bin/wmake to run make in a # world build environment. # wmake: - @echo '${WMAKEENV} ${MAKE} ${WMAKE_ARGS}' + @echo '${WMAKEENV} ${MAKE} -m ${.CURDIR}/share/mk ${WMAKE_ARGS}' wmakeenv: @echo '${WMAKEENV} /bin/sh' +bmake: + @echo '${BMAKEENV} ${MAKE} -m ${.CURDIR}/share/mk ${BMAKE_ARGS}' + bmakeenv: @echo '${BMAKEENV} /bin/sh' +tmake: + @echo '${TMAKEENV} ${MAKE} -m ${.CURDIR}/share/mk ${TMAKE_ARGS}' + tmakeenv: @echo '${TMAKEENV} /bin/sh' diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 79b35a06eb..27e04f5ef6 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/bin/csh/Makefile,v 1.11.2.8 2002/02/19 00:36:40 mp Exp $ -# $DragonFly: src/bin/csh/Makefile,v 1.2 2003/06/17 04:22:49 dillon Exp $ +# $DragonFly: src/bin/csh/Makefile,v 1.3 2004/03/22 20:57:23 dillon Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # # C Shell with process control; VM/UNIX VAX Makefile @@ -40,7 +40,7 @@ LDADD= -ltermcap -lcrypt LINKS= ${BINDIR}/csh ${BINDIR}/tcsh -CLEANFILES= ${GENHDRS} gethost csh.1 +CLEANFILES= ${GENHDRS} gethost.nx csh.1 FILESDIR= ${SHAREDIR}/examples/tcsh FILES= complete.tcsh csh-mode.el @@ -48,16 +48,14 @@ FILES= complete.tcsh csh-mode.el csh.1: tcsh.man ln -sf ${.ALLSRC} ${.TARGET} -build-tools: gethost +build-tools: gethost.nx -gethost: gethost.c sh.err.h tc.const.h sh.h - @rm -f ${.TARGET} - ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c +gethost.nx: gethost.c sh.err.h tc.const.h sh.h -tc.defs.c: gethost ${.CURDIR}/host.defs +tc.defs.c: gethost.nx ${.CURDIR}/host.defs @rm -f ${.TARGET} @echo "/* Do not edit this file, make creates it */" > ${.TARGET} - ./gethost ${.CURDIR}/host.defs >> ${.TARGET} + ./gethost.nx ${.CURDIR}/host.defs >> ${.TARGET} ed.defns.h: ed.defns.c @rm -f ${.TARGET} diff --git a/bin/sh/Makefile b/bin/sh/Makefile index e796390526..a789a67d8f 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 8.4 (Berkeley) 5/5/95 # $FreeBSD: src/bin/sh/Makefile,v 1.30.2.1 2001/12/15 10:05:18 knu Exp $ -# $DragonFly: src/bin/sh/Makefile,v 1.2 2003/06/17 04:22:50 dillon Exp $ +# $DragonFly: src/bin/sh/Makefile,v 1.3 2004/03/22 20:57:25 dillon Exp $ PROG= sh SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ @@ -27,36 +27,36 @@ CFLAGS+=-DSHELL -I. -I${.CURDIR} ${.CURDIR}/../../usr.bin/printf \ ${.CURDIR}/../../bin/test -CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ - mksyntax mksyntax.o +CLEANFILES+= mkinit.nx mkinit.no mknodes.nx mknodes.no \ + mksyntax.nx mksyntax.no CLEANFILES+= ${GENSRCS} ${GENHDRS} -build-tools: mkinit mknodes mksyntax +build-tools: mkinit.nx mknodes.nx mksyntax.nx .ORDER: builtins.c builtins.h builtins.c builtins.h: mkbuiltins builtins.def cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR} -init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \ +init.c: mkinit.nx alias.c eval.c exec.c input.c jobs.c options.c parser.c \ redir.c trap.c var.c - ./mkinit ${.ALLSRC:S/^mkinit$//} + ./mkinit.nx ${.ALLSRC:S/^mkinit.nx$//} # XXX this is just to stop the default .c rule being used, so that the # intermediate object has a fixed name. # XXX we have a default .c rule, but no default .o rule. .o: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -mkinit: mkinit.o -mknodes: mknodes.o -mksyntax: mksyntax.o +mkinit.nx: mkinit.no +mknodes.nx: mknodes.no +mksyntax.nx: mksyntax.no .ORDER: nodes.c nodes.h -nodes.c nodes.h: mknodes nodetypes nodes.c.pat - ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat +nodes.c nodes.h: mknodes.nx nodetypes nodes.c.pat + ./mknodes.nx ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat .ORDER: syntax.c syntax.h -syntax.c syntax.h: mksyntax - ./mksyntax +syntax.c syntax.h: mksyntax.nx + ./mksyntax.nx token.h: mktokens sh ${.CURDIR}/mktokens diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 3e2a30872e..e7f7c6e01d 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -1,5 +1,5 @@ # $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.188.2.40 2003/02/14 22:38:14 nectar Exp $ -# $DragonFly: src/etc/mtree/BSD.usr.dist,v 1.10 2004/02/02 07:32:30 dillon Exp $ +# $DragonFly: src/etc/mtree/BSD.usr.dist,v 1.11 2004/03/22 20:57:28 dillon Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -884,6 +884,8 @@ .. ja_JP.eucJP .. + ja_JP.EUC + .. ko_KR.eucKR .. la_LN.ISO8859-1 diff --git a/games/adventure/Makefile b/games/adventure/Makefile index c68f775059..adf5256bf1 100644 --- a/games/adventure/Makefile +++ b/games/adventure/Makefile @@ -1,20 +1,17 @@ # @(#)Makefile 8.1 (Berkeley) 6/12/93 # $FreeBSD: src/games/adventure/Makefile,v 1.7.6.1 2001/04/25 09:28:42 ru Exp $ -# $DragonFly: src/games/adventure/Makefile,v 1.2 2003/06/17 04:25:22 dillon Exp $ +# $DragonFly: src/games/adventure/Makefile,v 1.3 2004/03/22 20:57:30 dillon Exp $ PROG= adventure SRCS= main.c init.c done.c save.c subr.c vocab.c wizard.c io.c data.c crc.c MAN= adventure.6 CFLAGS+=-traditional-cpp HIDEGAME=hidegame -CLEANFILES=data.c setup setup.o +CLEANFILES=data.c setup.nx setup.no -build-tools: setup +build-tools: setup.nx -data.c: glorkz setup - ./setup ${.CURDIR}/glorkz > data.c - -setup: setup.o - ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +data.c: glorkz setup.nx + ./setup.nx ${.CURDIR}/glorkz > data.c .include diff --git a/games/hack/Makefile b/games/hack/Makefile index b40bf34867..e6a7ce9bd6 100644 --- a/games/hack/Makefile +++ b/games/hack/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD: src/games/hack/Makefile,v 1.20.2.4 2002/08/07 16:31:41 ru Exp $ -# $DragonFly: src/games/hack/Makefile,v 1.2 2003/06/17 04:25:24 dillon Exp $ +# $DragonFly: src/games/hack/Makefile,v 1.3 2004/03/22 20:57:31 dillon Exp $ PROG= hack SRCS= alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \ @@ -24,15 +24,12 @@ FILESMODE_rumors= 440 FILESGRP= ${BINGRP} FILESDIR= /var/games/hackdir HIDEGAME=hidegame -CLEANFILES=hack.onames.h makedefs makedefs.o +CLEANFILES=hack.onames.h makedefs.nx makedefs.no -build-tools: makedefs +build-tools: makedefs.nx -hack.onames.h: makedefs def.objects.h - ./makedefs ${.CURDIR}/def.objects.h > hack.onames.h - -makedefs: makedefs.o - ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +hack.onames.h: makedefs.nx def.objects.h + ./makedefs.nx ${.CURDIR}/def.objects.h > hack.onames.h beforeinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} /dev/null \ diff --git a/games/phantasia/Makefile b/games/phantasia/Makefile index 6a97cef9a1..16f9c83bc5 100644 --- a/games/phantasia/Makefile +++ b/games/phantasia/Makefile @@ -1,29 +1,30 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD: src/games/phantasia/Makefile,v 1.16.2.2 2002/08/07 16:31:42 ru Exp $ -# $DragonFly: src/games/phantasia/Makefile,v 1.2 2003/06/17 04:25:24 dillon Exp $ +# $DragonFly: src/games/phantasia/Makefile,v 1.3 2004/03/22 20:57:32 dillon Exp $ PROG= phantasia SRCS= main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c DPADD= ${LIBM} ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -lm -lcurses -ltermcap -lcompat +NXLDLIBS= -lm DATAFILES=characs gold lastdead mess monsters motd scoreboard void HIDEGAME=hidegame MAN= phantasia.6 -CLEANFILES=${DATAFILES} cross-phantglobs.o map setup setup.o stamp.setuprun +CLEANFILES=${DATAFILES} cross-phantglobs.no map setup.nx setup.no stamp.setuprun all: stamp.setuprun -build-tools: setup +build-tools: setup.nx -cross-phantglobs.o: phantglobs.c - ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC} +cross-phantglobs.no: phantglobs.c + ${NXCC} ${NXCFLAGS} -c ${.ALLSRC} -o ${.TARGET} -stamp.setuprun: monsters.asc setup - ./setup -m ${.CURDIR}/monsters.asc +stamp.setuprun: monsters.asc setup.nx + ./setup.nx -m ${.CURDIR}/monsters.asc touch ${.TARGET} -setup: cross-phantglobs.o setup.o ${LIBM} - ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:M*.o} -lm +setup.nx: cross-phantglobs.no setup.no ${LIBM} + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC} ${NXLDLIBS} -o ${.TARGET} beforeinstall: .for file in ${DATAFILES} diff --git a/gnu/lib/gcc2/Makefile b/gnu/lib/gcc2/Makefile index 110c9459b3..6078964f00 100644 --- a/gnu/lib/gcc2/Makefile +++ b/gnu/lib/gcc2/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/lib/Makefile,v 1.25.2.4 2001/01/06 23:16:53 obrien Exp $ -# $DragonFly: src/gnu/lib/gcc2/Attic/Makefile,v 1.3 2004/03/20 16:27:39 drhodus Exp $ +# $DragonFly: src/gnu/lib/gcc2/Attic/Makefile,v 1.4 2004/03/22 20:57:33 dillon Exp $ # # GCC2 libraries must be built with GCC2. If make does not support .makeenv # we have to hack it by changing ${MAKE} @@ -18,4 +18,7 @@ SUBDIR+= libobjc MAKE := CCVER=gcc2 ${MAKE} .endif +# inter-directory dependancies on tconfig.h +.ORDER: ${SUBDIR} + .include diff --git a/gnu/lib/gcc3/Makefile b/gnu/lib/gcc3/Makefile index c342908d66..2a7c96343a 100644 --- a/gnu/lib/gcc3/Makefile +++ b/gnu/lib/gcc3/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/lib/gcc3/Attic/Makefile,v 1.4 2004/01/30 02:35:01 dillon Exp $ +# $DragonFly: src/gnu/lib/gcc3/Attic/Makefile,v 1.5 2004/03/22 20:57:35 dillon Exp $ # # gcc3 libraries must be built with gcc3. When bootstraping from 4.x # or from an older DFly without the .makeenv directive, we have to export @@ -10,4 +10,7 @@ SUBDIR= csu libgcc libgcc_r libstdc++ libsupc++ MAKE := CCVER=gcc3 ${MAKE} .endif +# inter-directory dependancies on tconfig.h +.ORDER: ${SUBDIR} + .include diff --git a/gnu/lib/gcc3/libgcc/Makefile b/gnu/lib/gcc3/libgcc/Makefile index 0be70fc6ec..5a452940cb 100644 --- a/gnu/lib/gcc3/libgcc/Makefile +++ b/gnu/lib/gcc3/libgcc/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.50 2003/07/11 05:29:11 kan Exp $ -# $DragonFly: src/gnu/lib/gcc3/libgcc/Attic/Makefile,v 1.3 2004/03/05 21:38:44 joerg Exp $ +# $DragonFly: src/gnu/lib/gcc3/libgcc/Attic/Makefile,v 1.4 2004/03/22 20:57:36 dillon Exp $ .include "../Makefile.inc" .include "${.CURDIR}/../../../usr.bin/cc3/Makefile.tgt" @@ -170,7 +170,8 @@ ASM_S= ${LIB1ASMFUNCS:S/$/.So/} SYMS= ${LIB2FUNCS_1} \ ${LIB2FUNCS_2} \ - ${LIB2_DIVMOD_FUNCS} + ${LIB2_DIVMOD_FUNCS} \ + ${LIB2ADDEH} .if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" SYMS+= ${FPBIT_FUNCS} ${DPBIT_FUNCS} .endif diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index 255f265fcc..4cfbc87140 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/Makefile,v 1.51 2000/01/16 00:11:34 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/Makefile,v 1.6 2004/02/02 05:43:10 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/Makefile,v 1.7 2004/03/22 20:57:37 dillon Exp $ # # Note that gcc2 is only built under the i386 architecture. Other # architectures require gcc3. @@ -12,9 +12,11 @@ SUBDIR+=cvs .endif SUBDIR+= binutils214 cc3 +.ORDER: binutils214 cc3 .if ${MACHINE_ARCH} == "i386" SUBDIR+=binutils cc as ld +.ORDER: binutils cc as ld .endif .if !defined(NOPERL) && exists(${.CURDIR}/perl) diff --git a/gnu/usr.bin/binutils/Makefile b/gnu/usr.bin/binutils/Makefile index 92a1854e25..b8f2d3e2ae 100644 --- a/gnu/usr.bin/binutils/Makefile +++ b/gnu/usr.bin/binutils/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/binutils/Makefile,v 1.11.2.5 2002/09/01 23:39:12 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/binutils/Attic/Makefile,v 1.3 2004/01/31 06:56:36 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/binutils/Attic/Makefile,v 1.4 2004/03/22 20:57:38 dillon Exp $ SUBDIR= libiberty libbfd libopcodes libbinutils \ addr2line ar as gasp ld nm objcopy objdump ranlib readelf \ @@ -11,4 +11,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} SUBDIR+= gdb gdbreplay .endif +# interdependant header files +.ORDER: ${SUBDIR} + .include diff --git a/gnu/usr.bin/binutils/ld/Makefile.alpha b/gnu/usr.bin/binutils/ld/Makefile.alpha index cdbeb50616..0cc3a8c100 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.alpha +++ b/gnu/usr.bin/binutils/ld/Makefile.alpha @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.alpha,v 1.7.2.5 2002/09/01 23:39:14 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/binutils/ld/Attic/Makefile.alpha,v 1.3 2003/11/19 00:51:37 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/binutils/ld/Attic/Makefile.alpha,v 1.4 2004/03/22 20:57:39 dillon Exp $ TARGET_TUPLE?= alpha-unknown-dragonfly @@ -8,7 +8,7 @@ NATIVE_EMULATION= elf64alpha HOST= ${TARGET_TUPLE} CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_alpha_path= \"${TOOLS_PREFIX}/usr/lib\" +_alpha_path= \"${USRDATA_PREFIX}/usr/lib\" .else _alpha_path= \"/usr/cross/alpha-dragonfly/usr/lib\" .endif diff --git a/gnu/usr.bin/binutils/ld/Makefile.i386 b/gnu/usr.bin/binutils/ld/Makefile.i386 index f7978ac6aa..545aad9155 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.i386 +++ b/gnu/usr.bin/binutils/ld/Makefile.i386 @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.i386,v 1.8.2.5 2002/09/01 23:39:14 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/binutils/ld/Attic/Makefile.i386,v 1.3 2003/11/19 00:51:37 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/binutils/ld/Attic/Makefile.i386,v 1.4 2004/03/22 20:57:39 dillon Exp $ TARGET_TUPLE?= i386-unknown-dragonfly @@ -8,7 +8,7 @@ NATIVE_EMULATION= elf_i386 HOST= ${TARGET_TUPLE} CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_i386_path= \"${TOOLS_PREFIX}/usr/lib\" +_i386_path= \"${USRDATA_PREFIX}/usr/lib\" .else _i386_path= \"/usr/cross/i386-dragonfly/usr/lib\" .endif diff --git a/gnu/usr.bin/binutils214/Makefile b/gnu/usr.bin/binutils214/Makefile index b53467552b..1162f07a3a 100644 --- a/gnu/usr.bin/binutils214/Makefile +++ b/gnu/usr.bin/binutils214/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/binutils/Makefile,v 1.11.2.5 2002/09/01 23:39:12 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/binutils214/Attic/Makefile,v 1.1 2004/02/01 08:53:00 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/binutils214/Attic/Makefile,v 1.2 2004/03/22 20:57:41 dillon Exp $ # XXX gasp removed. gasp does not exist as a separate entity # in binutils-2.14 @@ -13,4 +13,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} #SUBDIR+= gdb gdbreplay .endif +# interdependant header files +.ORDER: ${SUBDIR} + .include diff --git a/gnu/usr.bin/binutils214/ld/Makefile.amd64 b/gnu/usr.bin/binutils214/ld/Makefile.amd64 index d4d2739cfe..1f660ae759 100644 --- a/gnu/usr.bin/binutils214/ld/Makefile.amd64 +++ b/gnu/usr.bin/binutils214/ld/Makefile.amd64 @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.i386,v 1.8.2.5 2002/09/01 23:39:14 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/binutils214/ld/Attic/Makefile.amd64,v 1.1 2004/02/02 05:43:11 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/binutils214/ld/Attic/Makefile.amd64,v 1.2 2004/03/22 20:57:42 dillon Exp $ TARGET_TUPLE?= x86_64-unknown-dragonfly @@ -7,7 +7,7 @@ NATIVE_EMULATION= elf_x86_64 HOST= ${TARGET_TUPLE} CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_amd64_path= ${TOOLS_PREFIX}/usr/lib +_amd64_path= ${USRDATA_PREFIX}/usr/lib EMS+= ${NATIVE_EMULATION} LDSCRIPTS+= ${NATIVE_EMULATION}.x ${NATIVE_EMULATION}.xbn \ ${NATIVE_EMULATION}.xn ${NATIVE_EMULATION}.xr \ diff --git a/gnu/usr.bin/binutils214/ld/Makefile.i386 b/gnu/usr.bin/binutils214/ld/Makefile.i386 index c8bf7ce5b5..01b65d670d 100644 --- a/gnu/usr.bin/binutils214/ld/Makefile.i386 +++ b/gnu/usr.bin/binutils214/ld/Makefile.i386 @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.i386,v 1.8.2.5 2002/09/01 23:39:14 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/binutils214/ld/Attic/Makefile.i386,v 1.1 2004/02/01 08:53:04 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/binutils214/ld/Attic/Makefile.i386,v 1.2 2004/03/22 20:57:42 dillon Exp $ TARGET_TUPLE?= i386-unknown-dragonfly @@ -8,7 +8,7 @@ NATIVE_EMULATION= elf_i386 HOST= ${TARGET_TUPLE} CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_i386_path= ${TOOLS_PREFIX}/usr/lib +_i386_path= ${USRDATA_PREFIX}/usr/lib .else _i386_path= /usr/cross/i386-dragonfly/usr/lib .endif diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile index 75fdeb4e00..8924382bcd 100644 --- a/gnu/usr.bin/cc/Makefile +++ b/gnu/usr.bin/cc/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/Makefile,v 1.21.2.3 2002/11/15 18:18:38 ru Exp $ -# $DragonFly: src/gnu/usr.bin/cc/Attic/Makefile,v 1.2 2003/06/17 04:25:45 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/cc/Attic/Makefile,v 1.3 2004/03/22 20:57:44 dillon Exp $ # The order of some of these are rather important. Some depend on previous # subdirs. @@ -26,4 +26,7 @@ SUBDIR+= f77 f771 f77doc SUBDIR+= gcov .endif +# interdependant header files +.ORDER: ${SUBDIR} + .include diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 5f99bca57f..0c17bb064f 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/Makefile.inc,v 1.49.2.6 2002/11/15 18:18:38 ru Exp $ -# $DragonFly: src/gnu/usr.bin/cc/Attic/Makefile.inc,v 1.7 2004/02/02 05:43:11 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/cc/Attic/Makefile.inc,v 1.8 2004/03/22 20:57:44 dillon Exp $ MY_CCVER=gcc2 MY_BINUTILS=binutils212 @@ -28,6 +28,8 @@ version!= grep version_string ${GCCDIR}/version.c \ CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" +CFLAGS+= -DPREFIX1=\"${TOOLS_PREFIX}/usr\" +CFLAGS+= -DPREFIX2=\"${USRDATA_PREFIX}/usr\" # If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined # to get the proper sizes in limits.h diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile index 9b2874bb89..509ac9b456 100644 --- a/gnu/usr.bin/cc/cc1plus/Makefile +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/cc1plus/Makefile,v 1.22.2.1 2002/06/20 23:13:31 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/cc/cc1plus/Attic/Makefile,v 1.6 2004/02/02 05:43:11 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/cc/cc1plus/Attic/Makefile,v 1.7 2004/03/22 20:57:46 dillon Exp $ .include "../Makefile.inc" @@ -29,6 +29,6 @@ CPPHDRS= exception new new.h typeinfo beforeinstall: ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ ${CPPHDRS:S;^;${GCCDIR}/cp/inc/;} \ - ${DESTDIR}/usr/include/c++/2.95 + ${USRDATA_PREFIX}/usr/include/c++/2.95 .include diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index b769f333f6..ad4ad0ad5f 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.48.2.6 2002/06/20 23:13:31 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/cc/cc_tools/Attic/Makefile,v 1.3 2003/11/19 01:37:27 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/cc/cc_tools/Attic/Makefile,v 1.4 2004/03/22 20:57:48 dillon Exp $ # # This could probably be merged with ../cc_int/Makefile, but bsd.lib.mk @@ -35,33 +35,34 @@ gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrec .for F in attr codes config emit extract flags opinit output peep recog build-tools: gen$F -gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gen$F: gen$F.no rtl.no print-rtl.no obstack.no bitmap.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c -CLEANFILES+= gen$F +CLEANFILES+= gen$F gen$F.no .endfor .for F in attrtab build-tools: gen$F -gen$F: gen$F.o rtl.o rtlanal.o print-rtl.o obstack.o bitmap.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gen$F: gen$F.no rtl.no rtlanal.no print-rtl.no obstack.no bitmap.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c -CLEANFILES+= gen$F +CLEANFILES+= gen$F gen$F.no .endfor SRCS+= bitmap.c obstack.c print-rtl.c rtl.c rtlanal.c +CLEANFILES+= bitmap.no obstack.no print-rtl.no rtl.no rtlanal.no .for F in check genrtl build-tools: gen$F -gen$F: gen$F.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gen$F: gen$F.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c -CLEANFILES+= gen$F +CLEANFILES+= gen$F gen$F.no .endfor .ORDER: genrtl.c genrtl.h @@ -169,21 +170,13 @@ build-tools: depend # OBJS+= ${SRCS:N*.h:R:S/$/.o/g} -.if !exists(${DEPENDFILE}) -# Fudge pre-dependfile dependencies of objects in much the same way as -# bsd.prog.mk would do if we defined PROG. There are complications to -# avoid circular dependencies. First, only make most objects depend on -# all headers. Filter out the objects that would cause problems (i.e., -# objects that will be used to create programs that will generate headers). +# Setup dependancies so helper programs will compile -jn # -${OBJS:Nbitmap.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Nobstack.o:Nprint-rtl.o:Nrtl.o}: ${SRCS:M*.h} +${CLEANFILES:M*.no:Ngencheck.no:Ngengenrtl.no}: ${SRCS:M*.h:Ninsn-*.h} + +genextract.no genattrtab.no: insn-config.h + +gencheck.no: gencheck.h ${SRCS:M*.h:Ngenrtl.h:Ntree-check.h:Ninsn-*.h} + +gengenrtl.no: ${SRCS:M*.h:Ngenrtl.h:Ninsn-*.h} -# Next, make each of the problematic objects depend on only most headers. -# Filter out the headers that would cause problems (and a few more when it -# is inconvenient to filter precisely). -# -bitmap.o genattr.o gencodes.o genconfig.o genflags.o obstack.o print-rtl.o \ - rtl.o: ${SRCS:M*.h:Ninsn-*.h} -gencheck.o: gencheck.h ${SRCS:M*.h:Ngenrtl.h:Ntree-check.h:Ninsn-*.h} -gengenrtl.o: ${SRCS:M*.h:Ngenrtl.h:Ninsn-*.h} -.endif diff --git a/gnu/usr.bin/cc/cc_tools/dragonfly-native.h b/gnu/usr.bin/cc/cc_tools/dragonfly-native.h index 2f8628750d..1c63b2b9e3 100644 --- a/gnu/usr.bin/cc/cc_tools/dragonfly-native.h +++ b/gnu/usr.bin/cc/cc_tools/dragonfly-native.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/gnu/usr.bin/cc/cc_tools/freebsd-native.h,v 1.5.2.9 2002/05/01 20:04:37 obrien Exp $ */ -/* $DragonFly: src/gnu/usr.bin/cc/cc_tools/Attic/dragonfly-native.h,v 1.3 2004/01/28 16:41:17 joerg Exp $ */ +/* $DragonFly: src/gnu/usr.bin/cc/cc_tools/Attic/dragonfly-native.h,v 1.4 2004/03/22 20:57:48 dillon Exp $ */ /* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD source tree so it can be configured appropriately without using @@ -13,12 +13,12 @@ #undef LOCAL_INCLUDE_DIR /* We don't wish to support one. */ /* Look for the include files in the system-defined places. */ -#define GPLUSPLUS_INCLUDE_DIR PREFIX"/include/c++/2.95" -#define GCC_INCLUDE_DIR PREFIX"/include" +#define GPLUSPLUS_INCLUDE_DIR PREFIX2"/include/c++/2.95" +#define GCC_INCLUDE_DIR PREFIX2"/include" #ifdef CROSS_COMPILE -#define CROSS_INCLUDE_DIR PREFIX"/include" +#define CROSS_INCLUDE_DIR PREFIX2"/include" #else -#define STANDARD_INCLUDE_DIR PREFIX"/include" +#define STANDARD_INCLUDE_DIR PREFIX2"/include" #endif /* Under FreeBSD, the normal location of the compiler back ends is the @@ -31,17 +31,17 @@ */ #undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ -#define STANDARD_EXEC_PREFIX PREFIX"/libexec/gcc2/" +#define STANDARD_EXEC_PREFIX PREFIX1"/libexec/gcc2/" #undef MD_EXEC_PREFIX /* We don't want one. */ /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ -#define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" +#define STANDARD_STARTFILE_PREFIX PREFIX2"/lib/" #ifdef CROSS_COMPILE -#define CROSS_STARTFILE_PREFIX PREFIX"/lib/gcc2/" +#define CROSS_STARTFILE_PREFIX PREFIX2"/lib/gcc2/" #endif -#define MD_STARTFILE_PREFIX PREFIX"/lib/gcc2/" +#define MD_STARTFILE_PREFIX PREFIX2"/lib/gcc2/" /* For the native system compiler, we actually build libgcc in a profiled version. So we should use it with -pg. */ diff --git a/gnu/usr.bin/cc/f771/Makefile b/gnu/usr.bin/cc/f771/Makefile index e48c80d9cd..2a80dbea67 100644 --- a/gnu/usr.bin/cc/f771/Makefile +++ b/gnu/usr.bin/cc/f771/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/f771/Makefile,v 1.5.2.1 2000/07/04 05:39:50 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/cc/f771/Attic/Makefile,v 1.5 2004/02/02 05:43:12 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/cc/f771/Attic/Makefile,v 1.6 2004/03/22 20:57:49 dillon Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -21,11 +21,11 @@ build-tools: fini # The use of ``proj+%BT.o'' is to get around bogus dependacy information # created for build-tools sources. -fini: fini.o proj+%BT.o - ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +fini: fini.no proj+%BT.no + ${NXCC} -static ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} -proj+%BT.o: proj.c - ${CC} ${CFLAGS} -o ${.TARGET} -c ${.ALLSRC} +proj+%BT.no: proj.c + ${NXCC} ${NXCFLAGS} -o ${.TARGET} -c ${.ALLSRC} CLEANFILES+= fini fini.o proj+%BT.o diff --git a/gnu/usr.bin/cc3/Makefile b/gnu/usr.bin/cc3/Makefile index c4a867ac47..2783a2aade 100644 --- a/gnu/usr.bin/cc3/Makefile +++ b/gnu/usr.bin/cc3/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/Makefile,v 1.35 2003/07/11 05:37:23 kan Exp $ -# $DragonFly: src/gnu/usr.bin/cc3/Attic/Makefile,v 1.3 2004/01/20 19:31:18 drhodus Exp $ +# $DragonFly: src/gnu/usr.bin/cc3/Attic/Makefile,v 1.4 2004/03/22 20:57:50 dillon Exp $ # The order of some of these are rather important. Some depend on previous # subdirs. @@ -29,4 +29,7 @@ SUBDIR+= f77 f771 f77doc SUBDIR+= gcov .endif +# interdependant header files +.ORDER: ${SUBDIR} + .include diff --git a/gnu/usr.bin/cc3/Makefile.inc b/gnu/usr.bin/cc3/Makefile.inc index 4c920fd32f..a86d34cd8b 100644 --- a/gnu/usr.bin/cc3/Makefile.inc +++ b/gnu/usr.bin/cc3/Makefile.inc @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/Makefile.inc,v 1.63 2002/06/04 19:45:08 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/cc3/Attic/Makefile.inc,v 1.7 2004/03/05 21:38:44 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/cc3/Attic/Makefile.inc,v 1.8 2004/03/22 20:57:50 dillon Exp $ BINDIR?=/usr/libexec/gcc3 MY_CCVER=gcc3 @@ -21,6 +21,8 @@ target= ${TARGET_ARCH}-undermydesk-freebsd CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" +CFLAGS+= -DPREFIX1=\"${TOOLS_PREFIX}/usr\" +CFLAGS+= -DPREFIX2=\"${USRDATA_PREFIX}/usr\" #CFLAGS+= -DWANT_COMPILER_INVARIANTS # If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined diff --git a/gnu/usr.bin/cc3/cc_tools/Makefile b/gnu/usr.bin/cc3/cc_tools/Makefile index 0b451e5aae..27963870ba 100644 --- a/gnu/usr.bin/cc3/cc_tools/Makefile +++ b/gnu/usr.bin/cc3/cc_tools/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.73 2004/01/15 10:07:59 ru Exp $ -# $DragonFly: src/gnu/usr.bin/cc3/cc_tools/Attic/Makefile,v 1.5 2004/02/03 03:47:11 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/cc3/cc_tools/Attic/Makefile,v 1.6 2004/03/22 20:57:54 dillon Exp $ # # This could probably be merged with ../cc_int/Makefile, but bsd.lib.mk @@ -42,12 +42,13 @@ gen-time-stamp: genattr genattrtab genconditions genconstants genemit \ .for F in attr codes config emit extract flags opinit output peep recog build-tools: gen$F -gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport.o \ - ggc-none.o hashtab.o read-rtl.o concat.o insn-conditions.o \ - xmalloc.o xexit.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gen$F: gen$F.no rtl.no obstack.no print-rtl.no bitmap.no errors.no \ + gensupport.no ggc-none.no hashtab.no read-rtl.no concat.no \ + insn-conditions.no xmalloc.no xexit.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c +NXOBJS+= gen$F.no CLEANFILES+= gen$F .endfor @@ -56,13 +57,14 @@ CLEANFILES+= gen$F # build-tools: genattrtab -genattrtab : genattrtab.o rtl.o obstack.o print-rtl.o bitmap.o errors.o \ - gensupport.o ggc-none.o hashtab.o read-rtl.o concat.o \ - insn-conditions.o genautomata.o varray.o getruntime.o \ - xmalloc.o xexit.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm +genattrtab : genattrtab.no rtl.no obstack.no print-rtl.no bitmap.no \ + errors.no gensupport.no ggc-none.no hashtab.no read-rtl.no concat.no \ + insn-conditions.no genautomata.no varray.no getruntime.no \ + xmalloc.no xexit.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm GENSRCS+= genattrtab.c +NXOBJS+= genattrtab.no CLEANFILES+= genattrtab # @@ -72,22 +74,24 @@ CLEANFILES+= genattrtab .for F in constants conditions build-tools: gen$F -gen$F: gen$F.o rtl.o obstack.o bitmap.o errors.o gensupport.o \ - ggc-none.o hashtab.o read-rtl.o concat.o dummy-conditions.o \ - xmalloc.o xexit.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gen$F: gen$F.no rtl.no obstack.no bitmap.no errors.no gensupport.no \ + ggc-none.no hashtab.no read-rtl.no concat.no dummy-conditions.no \ + xmalloc.no xexit.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c +NXOBJS+= gen$F.no CLEANFILES+= gen$F .endfor .for F in check genrtl preds build-tools: gen$F -gen$F: gen$F.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gen$F: gen$F.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c +NXOBJS+= gen$F.no CLEANFILES+= gen$F .endfor @@ -102,6 +106,10 @@ SRCS+= bitmap.c concat.c dummy-conditions.c errors.c genautomata.c \ gensupport.c getruntime.c ggc-none.c hashtab.c \ obstack.c physmem.c print-rtl.c read-rtl.c rtl.c varray.c xmemdup.c \ xmalloc.c xexit.c +NXOBJS+= bitmap.no concat.no dummy-conditions.no errors.no \ + genautomata.no gensupport.no getruntime.no ggc-none.no hashtab.no \ + obstack.no physmem.no print-rtl.no read-rtl.no rtl.no varray.no \ + xmemdup.no xmalloc.no xexit.no #----------------------------------------------------------------------- # Common parser stuff. @@ -139,13 +147,14 @@ gengtype-yacc+%DIKED.c: gengtype-yacc.c -e "s/realloc/xrealloc/g" \ ${.ALLSRC} > ${.TARGET} -gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o xmemdup.o xmalloc.o xexit.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gengtype: gengtype.no gengtype-yacc+%DIKED.no gengtype-lex.no xmemdup.no xmalloc.no xexit.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gengtype.c -CLEANFILES+= gengtype +NXOBJS+= gengtype.no +CLEANFILES+= gengtype gengtype-yacc+%DIKED.no gengtype-lex.no -gengtype-lex.o: gengtype-yacc.h +gengtype-lex.no: gengtype-yacc.h .ORDER: gtype-desc.c gtype-desc.h gtype-desc.c gtype-desc.h: gtype-time-stamp @@ -419,22 +428,18 @@ all: ${SRCS} # OBJS+= ${SRCS:N*.h:R:S/$/.o/g} CLEANFILES+= ${OBJS} +CLEANFILES+= ${NXOBJS} -.if !exists(${DEPENDFILE}) -# Fudge pre-dependfile dependencies of objects in much the same way as -# bsd.prog.mk would do if we defined PROG. There are complications to -# avoid circular dependencies. First, only make most objects depend on -# all headers. Filter out the objects that would cause problems (i.e., -# objects that will be used to create programs that will generate headers). -# -${OBJS}: ${SRCS:M*.h:Ngtype-desc.h:Ngenrtl.h:Ntree-check.h:Ntm-preds.h:Ninsn-*.h} +${NXOBJS:M*.no:Ngenextract.no:Ninsn-conditions.no}: ${SRCS:M*.h:Ngtype-desc.h:Ngenrtl.h:Ntree-check.h:Ntm-preds.h:Ninsn-*.h} -${OBJS:Ngencheck.o:Ngengenrtl.o:Ngenpreds.o}: tree-check.h tm-preds.h genrtl.h +${NXOBJS:Ngencheck.no:Ngengenrtl.no:Ngenpreds.no}: tree-check.h tm-preds.h genrtl.h -${OBJS:Ngengtype*.o:Nxmemdup.o:Ngengenrtl.o:Ngencheck.o:Ngenpreds.o:Nxmalloc.o:Nxexit.o}: gtype-desc.h +${NXOBJS:Ngengtype*.no:Nxmemdup.no:Ngengenrtl.no:Ngencheck.no:Ngenpreds.no:Nxmalloc.no:Nxexit.no}: gtype-desc.h -genextract.o: insn-config.h +genextract.no: insn-config.h -insn-conditions.o: insn-constants.h +insn-conditions.no: insn-constants.h +.if !exists(${DEPENDFILE}) +${OBJS}: ${SRCS:M*.h} .endif diff --git a/gnu/usr.bin/cc3/cc_tools/dragonfly-native.h b/gnu/usr.bin/cc3/cc_tools/dragonfly-native.h index 7412a5e7dc..8d82b08191 100644 --- a/gnu/usr.bin/cc3/cc_tools/dragonfly-native.h +++ b/gnu/usr.bin/cc3/cc_tools/dragonfly-native.h @@ -1,6 +1,6 @@ /* * $FreeBSD: src/gnu/usr.bin/cc/cc_tools/freebsd-native.h,v 1.23 2003/07/11 05:33:24 kan Exp $ - * $DragonFly: src/gnu/usr.bin/cc3/cc_tools/Attic/dragonfly-native.h,v 1.4 2004/02/03 03:47:11 dillon Exp $ + * $DragonFly: src/gnu/usr.bin/cc3/cc_tools/Attic/dragonfly-native.h,v 1.5 2004/03/22 20:57:54 dillon Exp $ */ /* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD @@ -17,13 +17,13 @@ #undef LOCAL_INCLUDE_DIR /* We don't wish to support one. */ /* Look for the include files in the system-defined places. */ -#define GPLUSPLUS_INCLUDE_DIR PREFIX"/include/c++/3.3" -#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX"/include/c++/3.3/backward" -#define GCC_INCLUDE_DIR PREFIX"/include" +#define GPLUSPLUS_INCLUDE_DIR PREFIX2"/include/c++/3.3" +#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX2"/include/c++/3.3/backward" +#define GCC_INCLUDE_DIR PREFIX2"/include" #ifdef CROSS_COMPILE -#define CROSS_INCLUDE_DIR PREFIX"/include" +#define CROSS_INCLUDE_DIR PREFIX2"/include" #else -#define STANDARD_INCLUDE_DIR PREFIX"/include" +#define STANDARD_INCLUDE_DIR PREFIX2"/include" #endif /* Under FreeBSD, the normal location of the compiler back ends is the @@ -36,9 +36,9 @@ */ #undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ #undef STANDARD_BINDIR_PREFIX /* We don't need one for now. */ -#define STANDARD_EXEC_PREFIX PREFIX"/libexec/gcc3/" -#define MD_EXEC_PREFIX PREFIX"/libexec/gcc3/" -#define FBSD_DATA_PREFIX PREFIX"/libdata/gcc/" +#define STANDARD_EXEC_PREFIX PREFIX1"/libexec/gcc3/" +#define MD_EXEC_PREFIX PREFIX1"/libexec/gcc3/" +#define FBSD_DATA_PREFIX PREFIX1"/libdata/gcc/" /* * XXX at the moment crt1.o, crti.o, and crtn.o are generated from @@ -49,8 +49,8 @@ /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ -#define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" -#define STANDARD_STARTFILE_PREFIX_1 PREFIX"/lib/gcc3/" +#define STANDARD_STARTFILE_PREFIX PREFIX2"/lib/" +#define STANDARD_STARTFILE_PREFIX_1 PREFIX2"/lib/gcc3/" #undef MD_STARTFILE_PREFIX /* For the native system compiler, we actually build libgcc in a profiled diff --git a/gnu/usr.bin/cc3/f771/Makefile b/gnu/usr.bin/cc3/f771/Makefile index 6e5623df38..f1c16ac30f 100644 --- a/gnu/usr.bin/cc3/f771/Makefile +++ b/gnu/usr.bin/cc3/f771/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/f771/Makefile,v 1.10 2004/01/11 20:45:46 ru Exp $ -# $DragonFly: src/gnu/usr.bin/cc3/f771/Attic/Makefile,v 1.8 2004/02/04 15:39:54 rob Exp $ +# $DragonFly: src/gnu/usr.bin/cc3/f771/Attic/Makefile,v 1.9 2004/03/22 20:57:55 dillon Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -26,16 +26,10 @@ LDADD= ${LIBCC_INT} # files not in SRCS # build-tools: fini -fini: fini.o xmalloc_local.o xexit_local.o - ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +fini: fini.no xmalloc.no xexit.no + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -o ${.TARGET} ${.ALLSRC} -xmalloc_local.o : xmalloc.c - ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC} - -xexit_local.o : xexit.c - ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC} - -CLEANFILES= fini fini.o +CLEANFILES= fini fini.no xmalloc.no xexit.no #----------------------------------------------------------------------- # str-* gunk diff --git a/kerberos5/Makefile.inc b/kerberos5/Makefile.inc index eca91e20d1..ce64d82e62 100644 --- a/kerberos5/Makefile.inc +++ b/kerberos5/Makefile.inc @@ -1,5 +1,5 @@ # $FreeBSD: src/kerberos5/Makefile.inc,v 1.5.2.5 2002/07/25 09:33:14 ru Exp $ -# $DragonFly: src/kerberos5/Makefile.inc,v 1.3 2003/08/05 07:45:39 asmodai Exp $ +# $DragonFly: src/kerberos5/Makefile.inc,v 1.4 2004/03/22 20:57:57 dillon Exp $ DISTRIBUTION?= krb5 @@ -137,15 +137,18 @@ k524_err.c k524_err.h: \ CLEANFILES+=k524_err.h k524_err.c k524_err.et -roken.h: make-roken - ./make-roken > tmp.h ;\ +roken.h: make-roken.nx + ./make-roken.nx > tmp.h ;\ if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \ else rm -f roken.h; mv tmp.h roken.h; fi make-roken.c: ${KRB5DIR}/lib/roken/roken.awk ${KRB5DIR}/lib/roken/roken.h.in awk -f ${.ALLSRC} > ${.TARGET} -CLEANFILES+= make-roken.c make-roken roken.h +make-roken.nx: make-roken.c + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC} ${NXLDLIBS} -o ${.TARGET} + +CLEANFILES+= make-roken.c make-roken.nx roken.h .else diff --git a/kerberos5/lib/libasn1/Makefile b/kerberos5/lib/libasn1/Makefile index 10c2a833ae..5412b99578 100644 --- a/kerberos5/lib/libasn1/Makefile +++ b/kerberos5/lib/libasn1/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/kerberos5/lib/libasn1/Makefile,v 1.3.2.8 2002/08/19 16:10:21 ru Exp $ -# $DragonFly: src/kerberos5/lib/libasn1/Makefile,v 1.2 2003/06/17 04:26:17 dillon Exp $ +# $DragonFly: src/kerberos5/lib/libasn1/Makefile,v 1.3 2004/03/22 20:57:58 dillon Exp $ LIB= asn1 CFLAGS+=-I${KRB5DIR}/include \ @@ -81,12 +81,12 @@ ${I:S/.x/.c/}: ${I} CLEANFILES+= ${GEN:S/.x/.c/g} krb5_asn1.h asn1_files -${GEN} krb5_asn1.h: asn1_compile k5.asn1 - ./asn1_compile ${KRB5DIR}/lib/asn1/k5.asn1 krb5_asn1 +${GEN} krb5_asn1.h: asn1_compile.nx k5.asn1 + ./asn1_compile.nx ${KRB5DIR}/lib/asn1/k5.asn1 krb5_asn1 -build-tools: make-print-version make-roken asn1_compile +build-tools: make-print-version.nx make-roken.nx asn1_compile.nx -asn1_compile: \ +asn1_compile.nx: \ gen.c \ gen_copy.c \ gen_decode.c \ @@ -96,19 +96,19 @@ asn1_compile: \ gen_length.c \ hash.c \ emalloc.c \ - lex.o \ + lex.no \ main.c \ - parse.o \ + parse.no \ symbol.c \ getarg.c \ warnerr.c \ - print_version.o \ + print_version.no \ get_window_size.c \ strupr.c - ${CC} ${CFLAGS} ${.OODATE} -o ${.TARGET} + ${NXCC} ${NXCFLAGS} ${.ALLSRC} -o ${.TARGET} .if defined(BOOTSTRAPPING) -asn1_compile: getprogname.c setprogname.c +asn1_compile.nx: getprogname.c setprogname.c .endif parse.o: parse.c roken.h @@ -124,12 +124,9 @@ lex.o: lex.l parse.h roken.h print_version.o: print_version.h print_version.c roken.h ${CC} ${CFLAGS} -c -o ${.TARGET} ${KRB5DIR}/lib/vers/print_version.c -print_version.h: make-print-version - ./make-print-version print_version.h +print_version.h: make-print-version.nx + ./make-print-version.nx print_version.h -make-print-version: make-print-version.c - ${CC} ${CFLAGS} -static -o ${.TARGET} ${.OODATE} - -CLEANFILES+= ${GEN} asn1_compile lex.o parse.o parse.c parse.h \ - hdb_asn1.h make-print-version print_version.h print_version.o \ +CLEANFILES+= ${GEN} asn1_compile.nx lex.o parse.o parse.c parse.h \ + hdb_asn1.h make-print-version.nx print_version.h print_version.o \ y.tab.c y.tab.h diff --git a/kerberos5/lib/libhdb/Makefile b/kerberos5/lib/libhdb/Makefile index 51f70b4f17..9d5f6cd312 100644 --- a/kerberos5/lib/libhdb/Makefile +++ b/kerberos5/lib/libhdb/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/kerberos5/lib/libhdb/Makefile,v 1.2.2.5 2002/08/19 16:10:22 ru Exp $ -# $DragonFly: src/kerberos5/lib/libhdb/Makefile,v 1.2 2003/06/17 04:26:17 dillon Exp $ +# $DragonFly: src/kerberos5/lib/libhdb/Makefile,v 1.3 2004/03/22 20:58:00 dillon Exp $ LIB= hdb CFLAGS+=-I${KRB5DIR}/include \ @@ -44,7 +44,7 @@ GEN= \ .PATH: ${KRB5DIR}/lib/vers .PATH: ${KRB5DIR}/lib/roken -build-tools: make-print-version asn1_compile +build-tools: make-print-version.nx asn1_compile.nx .for I in ${GEN} ${I:S/.x/.c/}: ${I} @@ -53,20 +53,20 @@ ${I:S/.x/.c/}: ${I} CLEANFILES+= ${GEN:S/.x/.c/g} hdb_asn1.h asn1_files -${GEN} hdb_asn1.h: asn1_compile hdb.asn1 - ./asn1_compile ${KRB5DIR}/lib/hdb/hdb.asn1 hdb_asn1 +${GEN} hdb_asn1.h: asn1_compile.nx hdb.asn1 + ./asn1_compile.nx ${KRB5DIR}/lib/hdb/hdb.asn1 hdb_asn1 -asn1_compile: parse.o lex.o main.c hash.c symbol.c emalloc.c gen.c \ +asn1_compile.nx: parse.no lex.no main.c hash.c symbol.c emalloc.c gen.c \ gen_encode.c gen_decode.c gen_free.c gen_length.c \ - gen_copy.c gen_glue.c getarg.c warnerr.c print_version.o \ + gen_copy.c gen_glue.c getarg.c warnerr.c print_version.no \ get_window_size.c strupr.c - ${CC} ${CFLAGS} ${.OODATE} -o ${.TARGET} + ${NXCC} ${NXCFLAGS} ${.ALLSRC} -o ${.TARGET} .if defined(BOOTSTRAPPING) -asn1_compile: getprogname.c setprogname.c +asn1_compile.nx: getprogname.c setprogname.c .endif -parse.o: parse.c +parse.no: parse.c .ORDER: parse.c parse.h parse.h parse.c: parse.y @@ -79,12 +79,9 @@ lex.o: lex.l print_version.o: print_version.h print_version.c ${CC} ${CFLAGS} -c -o ${.TARGET} ${KRB5DIR}/lib/vers/print_version.c -print_version.h: make-print-version - ./make-print-version print_version.h +print_version.h: make-print-version.nx + ./make-print-version.nx print_version.h -make-print-version: make-print-version.c - ${CC} ${CFLAGS} -static -o ${.TARGET} ${.OODATE} - -CLEANFILES+= ${GEN} asn1_compile lex.o parse.o parse.c parse.h \ - hdb_asn1.h make-print-version print_version.h print_version.o \ - y.tab.c y.tab.h +CLEANFILES+= ${GEN} asn1_compile.nx lex.no parse.no parse.c parse.h \ + hdb_asn1.h make-print-version.nx print_version.h \ + print_version.no y.tab.c y.tab.h diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile index 038133dd09..077fc79547 100644 --- a/kerberos5/lib/libroken/Makefile +++ b/kerberos5/lib/libroken/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/kerberos5/lib/libroken/Makefile,v 1.3.2.7 2002/09/01 04:22:01 nectar Exp $ -# $DragonFly: src/kerberos5/lib/libroken/Makefile,v 1.2 2003/06/17 04:26:17 dillon Exp $ +# $DragonFly: src/kerberos5/lib/libroken/Makefile,v 1.3 2004/03/22 20:58:01 dillon Exp $ LIB= roken CFLAGS+= -I${KRB5DIR}/include \ @@ -66,4 +66,4 @@ INCS= roken.h ${KRB5DIR}/lib/roken/roken-common.h .PATH: ${KRB5DIR}/lib/roken -build-tools: make-roken +build-tools: make-roken.nx diff --git a/kerberos5/lib/libsl/Makefile b/kerberos5/lib/libsl/Makefile index 8d67fe7260..00e2e6cc50 100644 --- a/kerberos5/lib/libsl/Makefile +++ b/kerberos5/lib/libsl/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/kerberos5/lib/libsl/Makefile,v 1.3.2.1 2002/07/19 18:46:24 ru Exp $ -# $DragonFly: src/kerberos5/lib/libsl/Makefile,v 1.2 2003/06/17 04:26:17 dillon Exp $ +# $DragonFly: src/kerberos5/lib/libsl/Makefile,v 1.3 2004/03/22 20:58:02 dillon Exp $ LIB= sl CFLAGS+=-I${KRB5DIR}/lib/sl \ @@ -14,4 +14,4 @@ INTERNALLIB= yes .PATH: ${KRB5DIR}/lib/sl -build-tools: make-roken +build-tools: make-roken.nx diff --git a/kerberos5/lib/libvers/Makefile b/kerberos5/lib/libvers/Makefile index cfc3bfc42a..a480746cb2 100644 --- a/kerberos5/lib/libvers/Makefile +++ b/kerberos5/lib/libvers/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/kerberos5/lib/libvers/Makefile,v 1.3.2.2 2002/07/19 18:46:25 ru Exp $ -# $DragonFly: src/kerberos5/lib/libvers/Makefile,v 1.2 2003/06/17 04:26:17 dillon Exp $ +# $DragonFly: src/kerberos5/lib/libvers/Makefile,v 1.3 2004/03/22 20:58:08 dillon Exp $ LIB= vers INTERNALLIB= YES @@ -17,12 +17,12 @@ SRCS= \ .PATH: ${KRB5DIR}/lib/vers -build-tools: make-print-version +build-tools: make-print-version.nx -print_version.h: make-print-version - ./make-print-version print_version.h +print_version.h: make-print-version.nx + ./make-print-version.nx print_version.h -make-print-version: make-print-version.c - ${CC} ${CFLAGS} -static -o ${.TARGET} ${.OODATE} +make-print-version.nx: make-print-version.c + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC} ${NXLDLIBS} -o ${.TARGET} -CLEANFILES+= make-print-version print_version.h +CLEANFILES+= make-print-version.nx print_version.h diff --git a/lib/libncurses/Makefile b/lib/libncurses/Makefile index e190522b86..30e1f49a34 100644 --- a/lib/libncurses/Makefile +++ b/lib/libncurses/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/lib/libncurses/Makefile,v 1.39.2.13 2002/08/07 16:31:48 ru Exp $ -# $DragonFly: src/lib/libncurses/Makefile,v 1.3 2004/03/20 16:27:40 drhodus Exp $ +# $DragonFly: src/lib/libncurses/Makefile,v 1.4 2004/03/22 20:58:09 dillon Exp $ NCURSES=${.CURDIR}/../../contrib/ncurses @@ -308,13 +308,17 @@ term.h: MKterm.h.awk edit_cfg.sh Caps mv -f $@.new $@ # Build tools +# +# NOTE! make_hash, at least, is directly referenced by scripts +# in contrib/ncurses. +# build-tools: make_hash make_keys make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} - ${CC} -o $@ ${CFLAGS} ${NCURSES}/ncurses/tinfo/make_keys.c + ${NXCC} -o $@ ${NXCFLAGS} ${NCURSES}/ncurses/tinfo/make_keys.c make_hash: comp_hash.c hashsize.h ncurses_def.h ${HEADERS} - ${CC} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ + ${NXCC} -o $@ ${NXCFLAGS} -DMAIN_PROGRAM \ ${NCURSES}/ncurses/tinfo/comp_hash.c # ./configure generated diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile index 427fdf58bc..fca9981adb 100644 --- a/release/sysinstall/Makefile +++ b/release/sysinstall/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/release/sysinstall/Makefile,v 1.92.2.22 2003/03/07 08:17:59 ru Exp $ -# $DragonFly: src/release/sysinstall/Attic/Makefile,v 1.2 2003/06/17 04:27:21 dillon Exp $ +# $DragonFly: src/release/sysinstall/Attic/Makefile,v 1.3 2004/03/22 20:58:11 dillon Exp $ PROG= sysinstall MAN= sysinstall.8 @@ -28,46 +28,43 @@ CFLAGS+= -DPC98 DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO} LDADD= -ldialog -lncurses -lutil -ldisk -lftpio -CLEANFILES= makedevs.c rtermcap +CLEANFILES= makedevs.c rtermcap.nx CLEANFILES+= keymap.tmp keymap.h -makedevs.c: Makefile rtermcap +makedevs.c: Makefile rtermcap.nx echo '#include ' > makedevs.c - ./rtermcap ansi | \ + ./rtermcap.nx ansi | \ file2c 'const char termcap_ansi[] = {' ',0};' \ >> makedevs.c - ./rtermcap cons25w | \ + ./rtermcap.nx cons25w | \ file2c 'const char termcap_cons25w[] = {' ',0};' \ >> makedevs.c - ./rtermcap cons25 | \ + ./rtermcap.nx cons25 | \ file2c 'const char termcap_cons25[] = {' ',0};' \ >> makedevs.c - ./rtermcap cons25-m | \ + ./rtermcap.nx cons25-m | \ file2c 'const char termcap_cons25_m[] = {' ',0};' \ >> makedevs.c - ./rtermcap cons25r | \ + ./rtermcap.nx cons25r | \ file2c 'const char termcap_cons25r[] = {' ',0};' \ >> makedevs.c - ./rtermcap cons25r-m | \ + ./rtermcap.nx cons25r-m | \ file2c 'const char termcap_cons25r_m[] = {' ',0};' \ >> makedevs.c - ./rtermcap cons25l1 | \ + ./rtermcap.nx cons25l1 | \ file2c 'const char termcap_cons25l1[] = {' ',0};' \ >> makedevs.c - ./rtermcap cons25l1-m | \ + ./rtermcap.nx cons25l1-m | \ file2c 'const char termcap_cons25l1_m[] = {' ',0};' \ >> makedevs.c - ./rtermcap vt100 | \ + ./rtermcap.nx vt100 | \ file2c 'const char termcap_vt100[] = {' ',0};' \ >> makedevs.c - ./rtermcap xterm | \ + ./rtermcap.nx xterm | \ file2c 'const char termcap_xterm[] = {' ',0};' \ >> makedevs.c -build-tools: rtermcap - -rtermcap: rtermcap.c - ${CC} -o ${.TARGET} ${.ALLSRC} -ltermcap +build-tools: rtermcap.nx .if ${MACHINE} == "pc98" KEYMAPS= jp.pc98 jp.pc98.iso diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 35fafd90bb..e14dc382ac 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.2.2.5 2002/07/19 08:09:32 ru Exp $ -# $DragonFly: src/share/mk/bsd.cpu.mk,v 1.5 2004/01/30 02:35:02 dillon Exp $ +# $DragonFly: src/share/mk/bsd.cpu.mk,v 1.6 2004/03/22 20:58:15 dillon Exp $ # include compiler-specific bsd.cpu.mk. Note that CCVER may or may not # be passed as an environment variable. If not set we make it consistent @@ -12,7 +12,7 @@ _CCVER := ${CCVER} .if ${CCVER} == "gcc2" . include -.elif defined(CCVER) && ${CCVER} == "gcc3" +.elif ${CCVER} == "gcc3" . include .elif defined(CCVER_BSD_CPU_MK) . if ${CCVER_BSD_CPU_MK} != "" diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk index 0de3ba9ead..b22e81ab26 100644 --- a/share/mk/bsd.info.mk +++ b/share/mk/bsd.info.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.info.mk,v 1.57.2.7 2003/05/21 13:00:46 ru Exp $ -# $DragonFly: src/share/mk/bsd.info.mk,v 1.2 2003/06/17 04:37:02 dillon Exp $ +# $DragonFly: src/share/mk/bsd.info.mk,v 1.3 2004/03/22 20:58:15 dillon Exp $ # # The include file handles installing GNU (tech)info files. # Texinfo is a documentation system that uses a single source @@ -152,6 +152,7 @@ ${x:S/$/-install/}: ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE} .endfor +.ORDER: ${INFO:S/$/-install/} .PHONY: ${INSTALLINFODIRS} .if defined(SRCS) diff --git a/share/mk/bsd.init.mk b/share/mk/bsd.init.mk index f621284ece..8ee6595c8a 100644 --- a/share/mk/bsd.init.mk +++ b/share/mk/bsd.init.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.init.mk,v 1.1.2.1 2002/07/17 19:08:23 ru Exp $ -# $DragonFly: src/share/mk/bsd.init.mk,v 1.5 2004/01/30 02:35:02 dillon Exp $ +# $DragonFly: src/share/mk/bsd.init.mk,v 1.6 2004/03/22 20:58:15 dillon Exp $ # The include file includes ../Makefile.inc and # ; this is used at the top of all files @@ -15,4 +15,5 @@ ____: .endif .include .MAIN: all + .endif !target(____) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index e2031e5819..ca43c6c722 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,6 +1,6 @@ # from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 # $FreeBSD: src/share/mk/bsd.lib.mk,v 1.91.2.15 2002/08/07 16:31:50 ru Exp $ -# $DragonFly: src/share/mk/bsd.lib.mk,v 1.5 2004/03/20 16:27:41 drhodus Exp $ +# $DragonFly: src/share/mk/bsd.lib.mk,v 1.6 2004/03/22 20:58:15 dillon Exp $ # .include @@ -330,3 +330,4 @@ clean: .include .include + diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 1128d28938..ba3ca5334c 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.own.mk,v 1.27.2.4 2002/07/22 14:21:51 ru Exp $ -# $DragonFly: src/share/mk/bsd.own.mk,v 1.8 2004/03/20 16:27:41 drhodus Exp $ +# $DragonFly: src/share/mk/bsd.own.mk,v 1.9 2004/03/22 20:58:15 dillon Exp $ # # The include file set common variables for owner, # group, mode, and directories. Defaults are in brackets. @@ -12,6 +12,14 @@ # DISTDIR Change the tree where the file for a distribution # gets installed (see /usr/src/release/Makefile). [not set] # +# USRDATA_PREFIX This is a companion to TOOLS_PREFIX, and is set to +# TOOLS_PREFIX by default. It controls where an entity +# should look for ${USRDATA_PREFIX}/usr/... data. For +# example in a buildworld the compiler and includes are +# installed in one place (in /usr/obj somewhere), but +# will eventually be installworld'd and so these programs +# are expected to access /usr data from somewhere other +# then where they were initially built/installed. # # COPY The flag passed to the install program to cause the binary # to be copied rather than moved. This is to be used when @@ -143,6 +151,7 @@ LIBOWN?= ${BINOWN} LIBGRP?= ${BINGRP} LIBMODE?= ${NOBINMODE} +USRDATA_PREFIX?= ${TOOLS_PREFIX} # Share files SHAREDIR?= /usr/share diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index aa3317e7be..22332a2ff3 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -1,6 +1,6 @@ # from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 # $FreeBSD: src/share/mk/bsd.prog.mk,v 1.86.2.17 2002/12/23 16:33:37 ru Exp $ -# $DragonFly: src/share/mk/bsd.prog.mk,v 1.3 2004/03/05 01:06:50 joerg Exp $ +# $DragonFly: src/share/mk/bsd.prog.mk,v 1.4 2004/03/22 20:58:15 dillon Exp $ .include @@ -190,3 +190,4 @@ ${OBJS}: ${SRCS:M*.h} .include .include + diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 7324ff9336..b2b95f4c69 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -1,6 +1,6 @@ # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 # $FreeBSD: src/share/mk/bsd.subdir.mk,v 1.30.2.5 2002/07/22 14:21:51 ru Exp $ -# $DragonFly: src/share/mk/bsd.subdir.mk,v 1.2 2003/06/17 04:37:02 dillon Exp $ +# $DragonFly: src/share/mk/bsd.subdir.mk,v 1.3 2004/03/22 20:58:15 dillon Exp $ # # The include file contains the default targets # for building subdirectories. @@ -94,3 +94,8 @@ afterinstall: install: beforeinstall realinstall afterinstall .ORDER: beforeinstall realinstall afterinstall .endif + +.ORDER: clean cleandepend cleandir cleanobj \ + obj objlink tags depend all all-man \ + install maninstall realinstall distribute + diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 1a8c754e7e..bd2cb5dea0 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,6 +1,6 @@ # from: @(#)sys.mk 8.2 (Berkeley) 3/21/94 # $FreeBSD: src/share/mk/sys.mk,v 1.45.2.6 2002/12/23 16:33:37 ru Exp $ -# $DragonFly: src/share/mk/sys.mk,v 1.5 2004/03/20 16:27:41 drhodus Exp $ +# $DragonFly: src/share/mk/sys.mk,v 1.6 2004/03/22 20:58:15 dillon Exp $ unix ?= We run FreeBSD, not UNIX. @@ -16,7 +16,7 @@ unix ?= We run FreeBSD, not UNIX. .if defined(%POSIX) .SUFFIXES: .o .c .y .l .a .sh .f .else -.SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .s .cl .p .h .sh +.SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .s .cl .p .h .sh .no .nx .endif .LIBS: .a @@ -39,6 +39,10 @@ CC ?= c89 .else CC ?= cc .endif +# The system cc frontend is not subject to the path, e.g. when buildworld +# is doing cross compiles it may still need the native compiler for things. +# +NXCC ?= OBJFORMATPATH=/ ${CC} CFLAGS ?= -O -pipe CXX ?= c++ @@ -74,6 +78,9 @@ LFLAGS ?= LD ?= ld LDFLAGS ?= +NXCFLAGS ?= ${CFLAGS} +NXLDLIBS ?= ${LDLIBS} +NXLDFLAGS ?= -static ${LDFLAGS} LINT ?= lint LINTFLAGS ?= -chapbx @@ -211,6 +218,24 @@ MACHINE_ARCH ?= i386 ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c +# .no == native object file, for helper code when cross building. +# +.c.no: + ${NXCC} ${NXCFLAGS} -c ${.IMPSRC} -o ${.TARGET} + +.y.no: + ${YACC} ${YFLAGS} ${.IMPSRC} + ${NXCC} ${CFLAGS} -c y.tab.c -o ${.TARGET} + rm -f y.tab.c + +.l.no: + ${LEX} ${LFLAGS} -o${.TARGET}.c ${.IMPSRC} + ${NXCC} ${CFLAGS} -c ${.TARGET}.c -o ${.TARGET} + rm -f ${.TARGET}.c + +.no.nx .c.nx: + ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.IMPSRC} ${NXLDLIBS} -o ${.TARGET} + # XXX not -j safe .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -259,3 +284,4 @@ __MAKE_CONF?=/etc/make.conf # Default executable format # XXX hint for bsd.port.mk OBJFORMAT?= elf + diff --git a/share/syscons/scrnmaps/Makefile b/share/syscons/scrnmaps/Makefile index 72170cf1ac..55c3669bba 100644 --- a/share/syscons/scrnmaps/Makefile +++ b/share/syscons/scrnmaps/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/share/syscons/scrnmaps/Makefile,v 1.14.2.3 2002/08/07 16:31:52 ru Exp $ -# $DragonFly: src/share/syscons/scrnmaps/Makefile,v 1.2 2003/06/17 04:37:03 dillon Exp $ +# $DragonFly: src/share/syscons/scrnmaps/Makefile,v 1.3 2004/03/22 20:58:17 dillon Exp $ SCRMAPS = iso-8859-1_to_cp437.scm iso-8859-4_for_vga9.scm \ iso-8859-7_to_cp437.scm \ @@ -26,7 +26,7 @@ ${SCRMAPS}: ${.TARGET:R}.mk rm -f ${.TARGET:R}.tmp ${SCRMAPS_MK}: ${.TARGET:R} mkscrfil.c - ${CC} -static ${CFLAGS} -I${.CURDIR} -DFIL=\"${.TARGET:R}\" ${LDFLAGS} \ + ${NXCC} ${NXCFLAGS} -I${.CURDIR} -DFIL=\"${.TARGET:R}\" ${NXLDFLAGS} \ -o ${.TARGET} ${.CURDIR}/mkscrfil.c .include diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile index 24f894b65a..723d00ef7c 100644 --- a/usr.bin/awk/Makefile +++ b/usr.bin/awk/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/usr.bin/awk/Makefile,v 1.9.2.1 2002/06/21 20:12:08 obrien Exp $ -# $DragonFly: src/usr.bin/awk/Makefile,v 1.2 2003/06/17 04:29:25 dillon Exp $ +# $DragonFly: src/usr.bin/awk/Makefile,v 1.3 2004/03/22 20:58:25 dillon Exp $ AWKSRC= ${.CURDIR}/../../contrib/one-true-awk .PATH: ${AWKSRC} @@ -17,11 +17,12 @@ CLEANFILES= maketab proctab.c ytab.h ytab.h: awkgram.h ln -sf ${.ALLSRC} ${.TARGET} -proctab.c: maketab - ./maketab > proctab.c +proctab.c: maketab.nx + ./maketab.nx > proctab.c -build-tools: maketab -maketab: ytab.h ${AWKSRC}/maketab.c +build-tools: maketab.nx + +maketab.nx: ytab.h ${AWKSRC}/maketab.c CLEANFILES+= nawk.1 nawk.1: awk.1 diff --git a/usr.bin/file/Makefile b/usr.bin/file/Makefile index ce6f464d77..9fad6ee36b 100644 --- a/usr.bin/file/Makefile +++ b/usr.bin/file/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/usr.bin/file/Makefile,v 1.13.2.8 2003/03/16 04:47:04 obrien Exp $ -# $DragonFly: src/usr.bin/file/Makefile,v 1.2 2003/06/17 04:29:26 dillon Exp $ +# $DragonFly: src/usr.bin/file/Makefile,v 1.3 2004/03/22 20:58:27 dillon Exp $ # Makefile for file(1) cmd. # Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE. # @@ -51,18 +51,18 @@ all: ${PROG} magic.mgc magic.mime.mgc magic: ${MAGFILES} cat ${.ALLSRC} > ${.TARGET} -magic.mgc: mkmagic magic - ./mkmagic magic +magic.mgc: mkmagic.nx magic + ./mkmagic.nx magic -magic.mime.mgc: mkmagic magic.mime +magic.mime.mgc: mkmagic.nx magic.mime ln -sf ${SRCDIR}/magic.mime magic.mime.PITA - ./mkmagic magic.mime.PITA + ./mkmagic.nx magic.mime.PITA mv magic.mime.PITA.mgc magic.mime.mgc -CLEANFILES+= mkmagic -build-tools: mkmagic -mkmagic: apprentice.c print.c - ${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \ +CLEANFILES+= mkmagic.nx +build-tools: mkmagic.nx +mkmagic.nx: apprentice.c print.c + ${NXCC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \ -I${.CURDIR} -I${SRCDIR} -o ${.TARGET} ${.ALLSRC} .include