ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/trunk/Makefile.inc1
(Generate patch)

Comparing trunk/Makefile.inc1 (file contents):
Revision 8977 by laffer1, Fri Sep 30 01:10:03 2016 UTC vs.
Revision 9758 by laffer1, Sat Jan 20 20:51:14 2018 UTC

# Line 4 | Line 4
4   # Make command line options:
5   #       -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
6   #       -DNO_CLEAN do not clean at all
7 + #       -DDB_FROM_SRC use the user/group databases in src/etc instead of
8 + #           the system database when installing.
9   #       -DNO_SHARE do not go into share subdir
10   #       -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,DEPEND,OBJ}
11   #       -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
# Line 11 | Line 13
13   #       -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
14   #       -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel
15   #       -DNO_PORTSUPDATE do not update ports in ${MAKE} update
16 + #       -DNO_ROOT install without using root privilege
17   #       -DNO_DOCUPDATE do not update doc in ${MAKE} update
15 #       -DDB_FROM_SRC use the user/group databases in src/etc instead of
16 #           the system database when installing.
18   #       -DNO_CTF do not run the DTrace CTF conversion tools on built objects
19   #       LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
20   #       LOCAL_MTREE="list of mtree files" to process to allow local directories
21   #           to be created before files are installed
22 + #       METALOG="path to metadata log" to write permission and ownership
23 + #           when NO_ROOT is set.  (default: ${DESTDIR}/METALOG)
24   #       TARGET="machine" to crossbuild world for a different machine type
25   #       TARGET_ARCH= may be required when a TARGET supports multiple endians
26  
# Line 221 | Line 224 | CROSSENV=      MAKEOBJDIRPREFIX=${OBJTREE} \
224   .if ${OSRELDATE} < 4015
225   CROSSENV+=      AR=gnu-ar RANLIB=gnu-ranlib
226   .endif
224 .if ${MK_GROFF} != "no"
225 CROSSENV+=      GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
226                GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
227                GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
228 .endif
227  
228   # bootstrap-tools stage
229   BMAKEENV=       INSTALL="sh ${.CURDIR}/tools/install.sh" \
# Line 295 | Line 293 | LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
293   LIB32WMAKEENV=  MACHINE=i386 MACHINE_ARCH=i386 \
294                  MACHINE_CPU="i686 mmx sse sse2"
295   LIB32WMAKEFLAGS=        \
296 <                AS="${AS} --32"
296 >                AS="${AS} --32" \
297                  LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32"
298   .endif
299  
# Line 322 | Line 320 | LIB32WMAKEFLAGS+=      \
320                  CXX="${CXX} ${LIB32FLAGS}" \
321                  DESTDIR=${LIB32TMP} \
322                  -DCOMPAT_32BIT \
323 +                -DLIBRARIES_ONLY \
324                  -DNO_CPU_CFLAGS \
325                  -DNO_CTF \
326                  -DNO_LINT
327  
328   LIB32WMAKE=     ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \
329 <                -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML
329 >                -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \
330 >                -DWITHOUT_HTML -DNO_CTF -DNO_LINT \
331 >                DESTDIR=${LIB32TMP}
332   LIB32IMAKE=     ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \
333                  ${IMAKE_INSTALL}
334   .endif
# Line 344 | Line 345 | IMAKE+=                __MAKE_SHELL=${INSTALLTMP}/sh
345   IMAKEENV+=      PATH=${TMPPATH}:${INSTALLTMP}
346   .endif
347   .if defined(DB_FROM_SRC)
348 < IMAKE_INSTALL=  INSTALL="install -N ${.CURDIR}/etc"
349 < IMAKE_MTREE=    MTREE_CMD="nmtree -N ${.CURDIR}/etc"
348 > INSTALLFLAGS+=  -N ${.CURDIR}/etc
349 > MTREEFLAGS+=    -N ${.CURDIR}/etc
350   .endif
351 + .if defined(NO_ROOT)
352 + METALOG?=       ${DESTDIR}/${DISTDIR}/METALOG
353 + IMAKE+=         -DNO_ROOT METALOG=${METALOG}
354 + INSTALL_DDIR=   ${DESTDIR}/${DISTDIR}
355 + INSTALLFLAGS+=  -U -M ${METALOG} -D ${INSTALL_DDIR:S://:/:g:C:/$::}
356 + MTREEFLAGS+=    -W
357 + .endif
358 + .if defined(DB_FROM_SRC) || defined(NO_ROOT)
359 + IMAKE_INSTALL=  INSTALL="install ${INSTALLFLAGS}"
360 + IMAKE_MTREE=    MTREE_CMD="nmtree ${MTREEFLAGS}"
361 + .endif
362  
363   # kernel stage
364   KMAKEENV=       ${WMAKEENV}
# Line 384 | Line 396 | _worldtmp:
396          rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
397   .endif
398   .for _dir in \
399 <    lib usr legacy/usr legacy/usr/bin legacy/usr/sbin
399 >    lib usr legacy/bin legacy/usr legacy/usr/bin legacy/usr/sbin
400          mkdir -p ${WORLDTMP}/${_dir}
401   .endfor
402          mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
403              -p ${WORLDTMP}/legacy/usr >/dev/null
392 .if ${MK_GROFF} != "no"
393        mtree -deU -f ${.CURDIR}/etc/mtree/BSD.groff.dist \
394            -p ${WORLDTMP}/legacy/usr >/dev/null
395 .endif
404          mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
405              -p ${WORLDTMP}/usr >/dev/null
406          mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
# Line 588 | Line 596 | kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_librar
596   # Checks to be sure system is ready for installworld/installkernel.
597   #
598   installcheck:
599 + installcheck_UGID:
600  
601   #
602   # Require DESTDIR to be set if installing for a different architecture or
# Line 619 | Line 628 | CHECK_GIDS+=   smmsp
628   CHECK_UIDS+=    proxy
629   CHECK_GIDS+=    proxy authpf
630   .endif
622 installcheck: installcheck_UGID
631   installcheck_UGID:
632   .for uid in ${CHECK_UIDS}
633          @if ! `id -u ${uid} >/dev/null 2>&1`; then \
# Line 650 | Line 658 | _nmtree_itools=        nmtree
658   .endif
659  
660   ITOOLS= [ awk cap_mkdb cat chflags chmod chown \
661 <        date echo egrep find grep ${_install-info} \
661 >        date echo egrep find grep id install ${_install-info} \
662          ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \
663          rm sed sh sysctl test true uname wc ${_zoneinfo}
664  
# Line 673 | Line 681 | EXTRA_DISTRIBUTIONS+=  games
681   EXTRA_DISTRIBUTIONS+=   lib32
682   .endif
683  
684 < distributeworld installworld: installcheck
684 > MTREE_MAGIC?=   mtree 2.0
685 >
686 > distributeworld installworld: installcheck installcheck_UGID
687          mkdir -p ${INSTALLTMP}
688          progs=$$(for prog in ${ITOOLS}; do \
689                  if progpath=`which $$prog`; then \
# Line 695 | Line 705 | distributeworld installworld: installcheck
705              done); \
706          cp $$libs $$progs ${INSTALLTMP}
707          cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
708 + .if defined(NO_ROOT)
709 +        echo "#${MTREE_MAGIC}" > ${METALOG}
710 + .endif
711   .if make(distributeworld)
712   .for dist in ${EXTRA_DISTRIBUTIONS}
713          -mkdir ${DESTDIR}/${DISTDIR}/${dist}
# Line 704 | Line 717 | distributeworld installworld: installcheck
717              -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
718          mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
719              -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null
720 + .if defined(NO_ROOT)
721 +        ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \
722 +            sed -e 's#^\./#./${dist}/#' >> ${METALOG}
723 +        ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \
724 +            sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
725 +        ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
726 +            sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
727 + .endif
728   .endfor
729          -mkdir ${DESTDIR}/${DISTDIR}/base
730 <        ${_+_}cd ${.CURDIR}; ${IMAKE} distrib-dirs \
731 <            LOCAL_MTREE=${LOCAL_MTREE} DESTDIR=${DESTDIR}/${DISTDIR}/base
730 >        cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
731 >            METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \
732 >            DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \
733 >            LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
734   .endif
735          ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
736              ${IMAKEENV} rm -rf ${INSTALLTMP}
# Line 715 | Line 738 | distributeworld installworld: installcheck
738   .for dist in ${EXTRA_DISTRIBUTIONS}
739          find ${DESTDIR}/${DISTDIR}/${dist} -empty -delete
740   .endfor
741 + .if defined(NO_ROOT)
742 + .for dist in base ${EXTRA_DISTRIBUTIONS}
743 +        @# For each file that exists in this dist, print the corresponding
744 +        @# line from the METALOG.  This relies on the fact that
745 +        @# a line containing only the filename will sort immediatly before
746 +        @# the relevant mtree line.
747 +        cd ${DESTDIR}/${DISTDIR}; \
748 +        find ./${dist} | sort -u ${METALOG} - | \
749 +        awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}\//, "./"); print } }' > \
750 +        ${DESTDIR}/${DISTDIR}/${dist}.meta
751 + .endfor
752   .endif
753 + .endif
754  
755   packageworld:
756   .for dist in base ${EXTRA_DISTRIBUTIONS}
757 + .if defined(NO_ROOT)
758          ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
759 +            tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \
760 +            @${DESTDIR}/${DISTDIR}/${dist}.meta
761 + .else
762 +        ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
763              tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz .
764 + .endif
765   .endfor
766  
767   #
# Line 757 | Line 798 | redistribute:
798  
799   distrib-dirs distribution:
800          cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
801 <            ${IMAKE_INSTALL} ${IMAKE_MTREE} ${.TARGET}
801 >            ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
802  
803   #
804   # buildkernel and installkernel
# Line 1033 | Line 1074 | _strfile=      games/fortune/strfile
1074   _gperf=         gnu/usr.bin/gperf
1075   .endif
1076  
1036 .if ${MK_GROFF} != "no"
1037 _groff=         gnu/usr.bin/groff
1038 .endif
1039
1077   .if ${BOOTSTRAPPING} >= 4000 && ${BOOTSTRAPPING} < 4015
1078   _ar=            usr.bin/ar
1079   .endif
# Line 1107 | Line 1144 | bootstrap-tools:
1144      ${_dtrace_tools} \
1145      ${_strfile} \
1146      ${_gperf} \
1110    ${_groff} \
1147      ${_ar} \
1148      ${_dtc} \
1149      ${_awk} \
1150 +    ${_cat} \
1151      usr.bin/lorder \
1152 <    usr.bin/makewhatis \
1152 >    usr.bin/mandoc \
1153      ${_mklocale} \
1154      usr.bin/rpcgen \
1155      ${_sed} \
# Line 1246 | Line 1283 | cross-tools:
1283   # hierarchy - ensure that all the needed directories are present
1284   #
1285   hierarchy:
1286 + .if defined(NO_ROOT)
1287 +        cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \
1288 +            -DNO_ROOT METALOG=${METALOG} distrib-dirs
1289 + .else
1290          cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
1291 + .endif
1292  
1293   #
1294   # libraries - build all libraries, and install them under ${DESTDIR}.
# Line 1283 | Line 1325 | _startup_libs+=        lib/csu/${MACHINE_CPUARCH}
1325   _startup_libs+= gnu/lib/libgcc
1326   _startup_libs+= lib/libcompiler_rt
1327   _startup_libs+= lib/libc
1328 + _startup_libs+= lib/libc_nonshared
1329   .if ${MK_LIBCPLUSPLUS} != "no"
1330   _startup_libs+= lib/libcxxrt
1331   .endif
1332  
1333   gnu/lib/libgcc__L: lib/libc__L
1334 + gnu/lib/libgcc__L: lib/libc_nonshared__L
1335   .if ${MK_LIBCPLUSPLUS} != "no"
1336   lib/libcxxrt__L: gnu/lib/libgcc__L
1337   .endif
# Line 1309 | Line 1353 | _prebuild_libs=        ${_kerberos5_lib_libasn1} \
1353                  lib/libopie lib/libpam ${_lib_libthr} \
1354                  lib/libradius lib/libsbuf lib/libtacplus \
1355                  ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
1356 +                ${_cddl_lib_libzfs_core} \
1357                  lib/libutil ${_lib_libypclnt} lib/libz lib/msun \
1358                  ${_secure_lib_libcrypto} ${_secure_lib_libssh} \
1359                  ${_secure_lib_libssl} lib/libsqlite3 \
# Line 1333 | Line 1378 | _apache_lib= apache/lib
1378   .if ${MK_CDDL} != "no"
1379   _cddl_lib_libumem= cddl/lib/libumem
1380   _cddl_lib_libnvpair= cddl/lib/libnvpair
1381 + _cddl_lib_libzfs_core= cddl/lib/libzfs_core
1382   _cddl_lib= cddl/lib
1383 + cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
1384   .endif
1385  
1386   .if ${MK_CRYPT} != "no"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines