p4-projects@freebsd.org
[Top] [All Lists]

PERFORCE change 133524 for review

Subject: PERFORCE change 133524 for review
From: Warner Losh
Date: Fri, 18 Jan 2008 05:33:29 GMT
http://perforce.freebsd.org/chv.cgi?CH=133524

Change 133524 by imp@imp_paco-paco on 2008/01/18 05:32:56

        Integrate the Makefile changes from mips2

Affected files ...

.. //depot/projects/mips2-jnpr/src/Makefile#2 integrate
.. //depot/projects/mips2-jnpr/src/Makefile.inc1#2 integrate

Differences ...

==== //depot/projects/mips2-jnpr/src/Makefile#2 (text+ko) ====

@@ -1,5 +1,6 @@
+#OSX hint: bsdmake BSDMKAE=bsdmake MACHINE_ARCH=i386
 #
-# $FreeBSD: src/Makefile,v 1.344 2007/12/13 00:08:02 imp Exp $
+# $FreeBSD: src/Makefile,v 1.342 2007/10/18 08:41:52 delphij Exp $
 #
 # The user-driven targets are:
 #
@@ -93,6 +94,8 @@
 BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
 TGTS+= ${BITGTS}
 
+TGTS+= xdev xdev-build xdev-install
+
 .ORDER: buildworld installworld
 .ORDER: buildworld distributeworld
 .ORDER: buildworld buildkernel
@@ -163,7 +166,7 @@
 #
 
 ${TGTS}:
-       ${_+_}@cd ${.CURDIR}; \
+       ${_+_}cd ${.CURDIR}; \
                ${_MAKE} ${.TARGET}
 
 # Set a reasonable default
@@ -239,11 +242,11 @@
 
 #
 # Upgrade make(1) to the current version using the installed
-# headers, libraries and tools.  Also, allow the location of
-# the system bsdmake-like utility to be overridden.
+# headers, libraries and tools.
 #
 MMAKEENV=      MAKEOBJDIRPREFIX=${MAKEPATH} \
                DESTDIR= \
+               LIBC= \
                INSTALL="sh ${.CURDIR}/tools/install.sh"
 MMAKE=         ${MMAKEENV} ${MAKE} \
                -D_UPGRADING \

==== //depot/projects/mips2-jnpr/src/Makefile.inc1#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/Makefile.inc1,v 1.591 2007/12/04 12:55:27 yar Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.589 2007/10/15 13:50:46 emaste Exp $
 #
 # Make command line options:
 #      -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
@@ -113,7 +113,7 @@
 TARGET?=       ${MACHINE}
 TARGET_ARCH?=  ${MACHINE_ARCH}
 
-KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc sparc64 sparc64/sun4v
+KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 powerpc sparc64 
sparc64/sun4v
 .if ${TARGET} == ${TARGET_ARCH}
 _t=            ${TARGET}
 .else
@@ -159,14 +159,7 @@
 STRICTTMPPATH= ${BPATH}:${XPATH}
 TMPPATH=       ${STRICTTMPPATH}:${PATH}
 
-#
-# Avoid running mktemp(1) unless actually needed.
-# It may not be functional, e.g., due to new ABI
-# when in the middle of installing over this system.
-#
-.if make(distributeworld) || make(installworld)
 INSTALLTMP!=   /usr/bin/mktemp -d -u -t install
-.endif
 
 #
 # Building a world goes through the following stages
@@ -214,7 +207,7 @@
                DESTDIR= \
                BOOTSTRAPPING=${OSRELDATE} \
                -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
-               -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
+               -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE \
                -DNO_CPU_CFLAGS -DNO_WARNS
 
 # build-tools stage
@@ -272,16 +265,14 @@
 .endif
 
 # install stage
-IMAKEENV=      ${CROSSENV}
-IMAKE=         ${IMAKEENV} ${MAKE} -f Makefile.inc1
 .if empty(.MAKEFLAGS:M-n)
-IMAKEENV+=     PATH=${STRICTTMPPATH}:${INSTALLTMP} \
-               LD_LIBRARY_PATH=${INSTALLTMP} \
-               PATH_LOCALE=${INSTALLTMP}/locale
-IMAKE+=                __MAKE_SHELL=${INSTALLTMP}/sh
+IMAKEENV=      ${CROSSENV} \
+               PATH=${STRICTTMPPATH}:${INSTALLTMP}
 .else
-IMAKEENV+=     PATH=${TMPPATH}:${INSTALLTMP}
+IMAKEENV=      ${CROSSENV} \
+               PATH=${TMPPATH}:${INSTALLTMP}
 .endif
+IMAKE=         ${IMAKEENV} ${MAKE} -f Makefile.inc1
 
 # kernel stage
 KMAKEENV=      ${WMAKEENV}
@@ -517,7 +508,7 @@
 
 buildenv:
        @echo Entering world for ${TARGET_ARCH}:${TARGET}
-       @cd ${.CURDIR} && env ${WMAKEENV} sh || true
+       @cd ${.CURDIR} && env ${WMAKEENV} ${SHELL} || true
 
 TOOLCHAIN_TGTS=        ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
 toolchain: ${TOOLCHAIN_TGTS}
@@ -573,14 +564,6 @@
 .endfor
 
 #
-# Required install tools to be saved in a scratch dir for safety.
-#
-ITOOLS=        [ awk cap_mkdb cat chflags chmod chown \
-       date echo egrep find grep install-info \
-       ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
-       test true uname wc zic
-
-#
 # distributeworld
 #
 # Distributes everything compiled by a `buildworld'.
@@ -591,28 +574,19 @@
 #
 distributeworld installworld: installcheck
        mkdir -p ${INSTALLTMP}
-       progs=$$(for prog in ${ITOOLS}; do \
+       for prog in [ awk cap_mkdb cat chflags chmod chown \
+           date echo egrep find grep install-info \
+           ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
+           test true uname wc zic; do \
                if progpath=`which $$prog`; then \
-                       echo $$progpath; \
+                       cp $$progpath ${INSTALLTMP}; \
                else \
-                       echo "Required tool $$prog not found in PATH." >&2; \
+                       echo "Required install tool $$prog not found" >&2; \
                        exit 1; \
                fi; \
-           done); \
-       libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \
-           while read line; do \
-               set -- $$line; \
-               if [ "$$2 $$3" != "not found" ]; then \
-                       echo $$2; \
-               else \
-                       echo "Required library $$1 not found." >&2; \
-                       exit 1; \
-               fi; \
-           done); \
-       cp $$libs $$progs ${INSTALLTMP}
-       cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
-       ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
-           ${IMAKEENV} rm -rf ${INSTALLTMP}
+       done
+       ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}
+       rm -rf ${INSTALLTMP}
 
 #
 # reinstall
@@ -837,11 +811,12 @@
 # to attempt to manually finish it.  If in doubt, 'make world' again.
 #
 
+UNAME_SYSTEM!= uname
 #
 # legacy: Build compatibility shims for the next three targets
 #
 legacy:
-.if ${BOOTSTRAPPING} < 503000
+.if ${BOOTSTRAPPING} < 503000 && ${UNAME_SYSTEM} == "FreeBSD"
        @echo "ERROR: Source upgrades from versions prior to 5.3 not 
supported."; \
        false
 .endif
@@ -900,10 +875,6 @@
 _crunchgen=    usr.sbin/crunch/crunchgen
 .endif
 
-.if ${BOOTSTRAPPING} < 600020
-_pwd_mkdb=     usr.sbin/pwd_mkdb
-.endif
-
 bootstrap-tools:
 .for _tool in \
     ${_strfile} \
@@ -919,9 +890,10 @@
     usr.bin/rpcgen \
     usr.bin/xinstall \
     ${_gensnmptree} \
+    usr.bin/file2c \
+    lib/libsbuf \
     usr.sbin/config \
-    ${_crunchgen} \
-    ${_pwd_mkdb}
+    ${_crunchgen}
        ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
                cd ${.CURDIR}/${_tool}; \
                ${MAKE} DIRPRFX=${_tool}/ obj; \
@@ -937,7 +909,7 @@
 _aicasm= sys/modules/aic7xxx/aicasm
 .endif
 
-.if !defined(NO_SHARE)
+.if !defined(NO_SHARE) && ${UNAME_SYSTEM} == "FreeBSD"
 _share=        share/syscons/scrnmaps
 .endif
 
@@ -959,8 +931,7 @@
     ${_share} \
     ${_aicasm} \
     usr.bin/awk \
-    lib/libmagic \
-    usr.sbin/sysinstall
+
        ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
                cd ${.CURDIR}/${_tool}; \
                ${MAKE} DIRPRFX=${_tool}/ obj; \
@@ -1289,3 +1260,88 @@
 #
 showconfig:
        @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort
+
+
+###############
+
+.if defined(XDEV) && defined(XDEV_ARCH)
+
+NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
+           -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE 
+
+XDDIR=${XDEV}-freebsd
+XDTP=/usr/${XDDIR}
+CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
+       TARGET=${XDEV} \
+       TARGET_ARCH=${XDEV_ARCH}
+CDENV= ${CDBENV} \
+       _SHLIBDIRPREFIX=${XDTP} \
+       TOOLS_PREFIX=${XDTP} \
+       MACHINE=${XDEV} \
+       MACHINE_ARCH=${XDEV_ARCH}
+
+CDTMP= ${MAKEOBJDIRPREFIX}/${XDEV}/${.CURDIR}/tmp
+CDMAKE=${CDENV} ${MAKE} ${NOFUN}
+CD2MAKE=${CDENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
+XDDESTDIR=${DESTDIR}${XDTP}
+
+.ORDER: xdev-build xdev-install
+xdev: xdev-build xdev-install
+
+.ORDER: _xb-build-tools _xb-cross-tools
+xdev-build: _xb-build-tools _xb-cross-tools
+
+_xb-build-tools:
+       ${_+_}cd ${.CURDIR}; \
+       ${CDBENV} ${MAKE} -f Makefile.inc1 build-tools
+
+_xb-cross-tools:
+.for _tool in \
+    gnu/usr.bin/binutils \
+    gnu/usr.bin/cc
+       ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \
+       cd ${.CURDIR}/${_tool}; \
+       ${CDMAKE} DIRPRFX=${_tool}/ obj; \
+       ${CDMAKE} DIRPRFX=${_tool}/ depend; \
+       ${CDMAKE} DIRPRFX=${_tool}/ all
+.endfor
+
+       ${_+_}cd ${.CURDIR}; ${TMAKE} build-tools
+
+_xi-mtree:
+       ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}"
+       mkdir -p ${XDDESTDIR}
+       mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
+           -p ${XDDESTDIR} >/dev/null
+       mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+           -p ${XDDESTDIR}/usr >/dev/null
+       mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+           -p ${XDDESTDIR}/usr/include >/dev/null
+
+.ORDER: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links
+xdev-install: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links
+
+_xi-cross-tools:
+.for _tool in \
+    gnu/usr.bin/binutils \
+    gnu/usr.bin/cc
+       ${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \
+       cd ${.CURDIR}/${_tool}; \
+       ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR}
+.endfor
+
+_xi-includes:
+       ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes \
+               DESTDIR=${XDDESTDIR}
+
+_xi-libraries:
+       ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \
+               DESTDIR=${XDDESTDIR}
+
+_xi-links:
+       ${_+_}cd ${XDDESTDIR}/usr/bin; \
+               for i in *; do \
+                       ln -sf ../../${XDTP}/usr/bin/$$i \
+                           ../../../../usr/bin/${XDDIR}-$$i; \
+               done
+.endif
_______________________________________________
p4-projects@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "p4-projects-unsubscribe@xxxxxxxxxxx"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 133524 for review, Warner Losh <=