Makefile.inc1 (47736) | Makefile.inc1 (48654) |
---|---|
1# | 1# |
2# $Id: Makefile.inc1,v 1.77 1999/06/01 02:55:44 billf Exp $ | 2# $Id: Makefile.inc1,v 1.78 1999/06/04 17:34:28 billf Exp $ |
3# 4# Make command line options: 5# -DCLOBBER will remove /usr/include 6# -DMAKE_KERBEROS4 to build KerberosIV 7# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir 8# -DNOCLEAN do not clean at all 9# -DNOTOOLS do not rebuild any tools first 10# -DNOCRYPT will prevent building of crypt versions --- 120 unchanged lines hidden (view full) --- 131# 132.if defined(NOCLEAN) 133MK_FLAGS= -DWORLD -DNOINFO -DNOMAN -DNOPROFILE 134.else 135MK_FLAGS= -DWORLD -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED 136.endif 137 138# | 3# 4# Make command line options: 5# -DCLOBBER will remove /usr/include 6# -DMAKE_KERBEROS4 to build KerberosIV 7# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir 8# -DNOCLEAN do not clean at all 9# -DNOTOOLS do not rebuild any tools first 10# -DNOCRYPT will prevent building of crypt versions --- 120 unchanged lines hidden (view full) --- 131# 132.if defined(NOCLEAN) 133MK_FLAGS= -DWORLD -DNOINFO -DNOMAN -DNOPROFILE 134.else 135MK_FLAGS= -DWORLD -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED 136.endif 137 138# |
139# If we're building a cross world, define MACHINE and MACHINE_ARCH for 140# the version of make that we're using. 141# 142.if defined(TARGET) 143CROSS_MAKE_FLAGS+=-DMACHINE=\"${TARGET}\" 144.endif 145.if defined(TARGET_ARCH) 146CROSS_MAKE_FLAGS+=-DMACHINE_ARCH=\"${TARGET_ARCH}\" 147.endif 148 149# |
|
139# Define the location of the temporary installation directory. Note that 140# MAKEOBJDIRPREFIX normally isn't defined so if the current directory is 141# /usr/src, then the world temporary directory is /usr/obj/usr/src/tmp. 142# 143# During the transition from aout to elf format on i386, MAKEOBJDIRPREFIX 144# is set by the parent makefile (Makefile.inc0) to be /usr/obj/${OBJFORMAT} 145# in order to keep aout and elf format files apart. 146# --- 35 unchanged lines hidden (view full) --- 182# want that - all compile-time library paths should be resolved by gcc. 183# It fails for set[ug]id executables (are any used?). 184COMPILER_ENV= BISON_SIMPLE=${TOOLROOT}/usr/share/misc/bison.simple \ 185 COMPILER_PATH=${TOOLROOT}/usr/libexec:${TOOLROOT}/usr/bin \ 186 GCC_EXEC_PREFIX=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib/ \ 187 LD_LIBRARY_PATH=${TOOLROOT}${SHLIBDIR} \ 188 LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib 189 | 150# Define the location of the temporary installation directory. Note that 151# MAKEOBJDIRPREFIX normally isn't defined so if the current directory is 152# /usr/src, then the world temporary directory is /usr/obj/usr/src/tmp. 153# 154# During the transition from aout to elf format on i386, MAKEOBJDIRPREFIX 155# is set by the parent makefile (Makefile.inc0) to be /usr/obj/${OBJFORMAT} 156# in order to keep aout and elf format files apart. 157# --- 35 unchanged lines hidden (view full) --- 193# want that - all compile-time library paths should be resolved by gcc. 194# It fails for set[ug]id executables (are any used?). 195COMPILER_ENV= BISON_SIMPLE=${TOOLROOT}/usr/share/misc/bison.simple \ 196 COMPILER_PATH=${TOOLROOT}/usr/libexec:${TOOLROOT}/usr/bin \ 197 GCC_EXEC_PREFIX=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib/ \ 198 LD_LIBRARY_PATH=${TOOLROOT}${SHLIBDIR} \ 199 LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib 200 |
190BMAKEENV= PATH=${TMPPATH} ${COMPILER_ENV} NOEXTRADEPEND=t \ | 201BMAKEENV= ${COMPILER_ENV} NOEXTRADEPEND=t PATH=${TMPPATH} \ |
191 OBJFORMAT_PATH=${TOOLROOT}/usr/libexec:/usr/libexec | 202 OBJFORMAT_PATH=${TOOLROOT}/usr/libexec:/usr/libexec |
192XMAKEENV= PATH=${STRICTTMPPATH} ${COMPILER_ENV} \ | 203XTMAKEENV= NOEXTRADEPEND=t 204.if defined(TARGET) 205XMAKEENV= PATH=${TMPPATH} 206.else 207XMAKEENV= PATH=${STRICTTMPPATH} 208.endif 209XMAKEENV+= ${COMPILER_ENV} \ |
193 PERL5LIB=${DESTDIR}/usr/libdata/perl/5.00503 \ 194 OBJFORMAT_PATH=${TOOLROOT}/usr/libexec \ 195 CFLAGS="-nostdinc ${CFLAGS}" # XXX -nostdlib 196 197# used to compile and install 'make' in temporary build tree 198MAKETMP= ${WORLDTMP}/make 199IBMAKE= ${BMAKEENV} MAKEOBJDIR=${MAKETMP} ${MAKE} DESTDIR=${WORLDTMP} 200 201.if defined(NOTOOLS) | 210 PERL5LIB=${DESTDIR}/usr/libdata/perl/5.00503 \ 211 OBJFORMAT_PATH=${TOOLROOT}/usr/libexec \ 212 CFLAGS="-nostdinc ${CFLAGS}" # XXX -nostdlib 213 214# used to compile and install 'make' in temporary build tree 215MAKETMP= ${WORLDTMP}/make 216IBMAKE= ${BMAKEENV} MAKEOBJDIR=${MAKETMP} ${MAKE} DESTDIR=${WORLDTMP} 217 218.if defined(NOTOOLS) |
219# cross tools make 220XTMAKE= ${XTMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} |
|
202# bootstrap make 203BMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} 204# cross make used for compilation 205XMAKE= ${XMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} 206# cross make used for final installation 207IXMAKE= ${XMAKEENV} ${MAKE} 208.else | 221# bootstrap make 222BMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} 223# cross make used for compilation 224XMAKE= ${XMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} 225# cross make used for final installation 226IXMAKE= ${XMAKEENV} ${MAKE} 227.else |
228# cross tools make 229XTMAKE= ${XTMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} |
|
209# bootstrap make 210BMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} 211# cross make used for compilation 212XMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} 213# cross make used for final installation 214IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make 215.endif 216 --- 17 unchanged lines hidden (view full) --- 234 @echo 235 @echo "--------------------------------------------------------------" 236 @echo ">>> Making make" 237 @echo "--------------------------------------------------------------" 238 mkdir -p ${WORLDTMP}/usr/bin ${MAKETMP} 239 ( \ 240 cd ${.CURDIR}/usr.bin/make; \ 241 MAKEOBJDIRPREFIX=""; unset MAKEOBJDIRPREFIX; \ | 230# bootstrap make 231BMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} 232# cross make used for compilation 233XMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} 234# cross make used for final installation 235IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make 236.endif 237 --- 17 unchanged lines hidden (view full) --- 255 @echo 256 @echo "--------------------------------------------------------------" 257 @echo ">>> Making make" 258 @echo "--------------------------------------------------------------" 259 mkdir -p ${WORLDTMP}/usr/bin ${MAKETMP} 260 ( \ 261 cd ${.CURDIR}/usr.bin/make; \ 262 MAKEOBJDIRPREFIX=""; unset MAKEOBJDIRPREFIX; \ |
242 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all; \ | 263 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all CROSS_MAKE_FLAGS='${CROSS_MAKE_FLAGS}'; \ |
243 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} install; \ 244 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} clean \ 245 ) 246 @echo 247 @echo "--------------------------------------------------------------" 248 @echo ">>> Making mtree" 249 @echo "--------------------------------------------------------------" 250 mkdir -p ${WORLDTMP}/usr/sbin ${WORLDTMP}/mtree --- 18 unchanged lines hidden (view full) --- 269 @echo "--------------------------------------------------------------" 270 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} 271.endif 272 @echo 273 @echo "--------------------------------------------------------------" 274 @echo ">>> Rebuilding the ${OBJFORMAT} obj tree" 275 @echo "--------------------------------------------------------------" 276 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 par-${OBJDIR} | 264 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} install; \ 265 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} clean \ 266 ) 267 @echo 268 @echo "--------------------------------------------------------------" 269 @echo ">>> Making mtree" 270 @echo "--------------------------------------------------------------" 271 mkdir -p ${WORLDTMP}/usr/sbin ${WORLDTMP}/mtree --- 18 unchanged lines hidden (view full) --- 290 @echo "--------------------------------------------------------------" 291 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} 292.endif 293 @echo 294 @echo "--------------------------------------------------------------" 295 @echo ">>> Rebuilding the ${OBJFORMAT} obj tree" 296 @echo "--------------------------------------------------------------" 297 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 par-${OBJDIR} |
277.if !defined(NOTOOLS) | 298.if defined(TARGET) |
278 @echo 279 @echo "--------------------------------------------------------------" | 299 @echo 300 @echo "--------------------------------------------------------------" |
301 @echo ">>> Rebuilding toolchain for ${TARGET} buildworld" 302 @echo "--------------------------------------------------------------" 303 cd ${.CURDIR}; ${XTMAKE} -f Makefile.inc1 cross-toolchain 304.endif 305.if !defined(NOTOOLS) && !defined(TARGET) 306 @echo 307 @echo "--------------------------------------------------------------" |
|
280 @echo ">>> Rebuilding ${OBJFORMAT} bootstrap tools" 281 @echo "--------------------------------------------------------------" 282 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 bootstrap 283 @echo 284 @echo "--------------------------------------------------------------" 285 @echo ">>> Rebuilding tools necessary to build the include files" 286 @echo "--------------------------------------------------------------" 287 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 include-tools --- 9 unchanged lines hidden (view full) --- 297 @echo "--------------------------------------------------------------" 298 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 bootstrap-libraries 299.if !defined(NOTOOLS) 300 @echo 301 @echo "--------------------------------------------------------------" 302 @echo ">>> Rebuilding tools needed to build libraries" 303 @echo "--------------------------------------------------------------" 304 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 lib-tools | 308 @echo ">>> Rebuilding ${OBJFORMAT} bootstrap tools" 309 @echo "--------------------------------------------------------------" 310 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 bootstrap 311 @echo 312 @echo "--------------------------------------------------------------" 313 @echo ">>> Rebuilding tools necessary to build the include files" 314 @echo "--------------------------------------------------------------" 315 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 include-tools --- 9 unchanged lines hidden (view full) --- 325 @echo "--------------------------------------------------------------" 326 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 bootstrap-libraries 327.if !defined(NOTOOLS) 328 @echo 329 @echo "--------------------------------------------------------------" 330 @echo ">>> Rebuilding tools needed to build libraries" 331 @echo "--------------------------------------------------------------" 332 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 lib-tools |
305.endif 306.if !defined(NOTOOLS) | |
307 @echo 308 @echo "--------------------------------------------------------------" 309 @echo ">>> Rebuilding all other tools needed to build the ${OBJFORMAT} world" 310 @echo "--------------------------------------------------------------" 311 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 build-tools 312.endif 313.if !defined(_NODEPEND) 314 @echo --- 155 unchanged lines hidden (view full) --- 470 cd ${.CURDIR}/etc; ${MAKE} distrib-dirs 471 472# 473# bootstrap - [re]build tools needed to run the actual build, this includes 474# tools needed by 'make depend', as some tools are needed to generate source 475# for the dependency information to be gathered from. 476# 477bootstrap: | 333 @echo 334 @echo "--------------------------------------------------------------" 335 @echo ">>> Rebuilding all other tools needed to build the ${OBJFORMAT} world" 336 @echo "--------------------------------------------------------------" 337 cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 build-tools 338.endif 339.if !defined(_NODEPEND) 340 @echo --- 155 unchanged lines hidden (view full) --- 496 cd ${.CURDIR}/etc; ${MAKE} distrib-dirs 497 498# 499# bootstrap - [re]build tools needed to run the actual build, this includes 500# tools needed by 'make depend', as some tools are needed to generate source 501# for the dependency information to be gathered from. 502# 503bootstrap: |
504.if defined(DESTDIR) 505 rm -f ${DESTDIR}/usr/src/sys 506 ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src 507 cd ${.CURDIR}/include; ${MAKE} all 508 cd ${.CURDIR}/include; ${MAKE} beforeinstall 509.endif |
|
478 cd ${.CURDIR}/usr.bin/make; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ | 510 cd ${.CURDIR}/usr.bin/make; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ |
479 ${MAKE} ${MK_FLAGS} all; \ | 511 ${MAKE} ${MK_FLAGS} all CROSS_MAKE_FLAGS='${CROSS_MAKE_FLAGS}'; \ |
480 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} 481 cd ${.CURDIR}/usr.bin/xinstall; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 482 ${MAKE} ${MK_FLAGS} all; \ 483 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} 484 cd ${.CURDIR}/usr.bin/yacc; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 485 ${MAKE} ${MK_FLAGS} all; \ 486 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} 487 cd ${.CURDIR}/usr.bin/lex; ${MAKE} bootstrap; \ 488 ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 489 ${MAKE} ${MK_FLAGS} -DNOLIB all; \ 490 ${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR} 491 cd ${.CURDIR}/usr.bin/lex; ${MAKE} ${OBJDIR} 492 cd ${.CURDIR}/usr.sbin/mtree; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 493 ${MAKE} ${MK_FLAGS} all; \ 494 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} | 512 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} 513 cd ${.CURDIR}/usr.bin/xinstall; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 514 ${MAKE} ${MK_FLAGS} all; \ 515 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} 516 cd ${.CURDIR}/usr.bin/yacc; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 517 ${MAKE} ${MK_FLAGS} all; \ 518 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} 519 cd ${.CURDIR}/usr.bin/lex; ${MAKE} bootstrap; \ 520 ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 521 ${MAKE} ${MK_FLAGS} -DNOLIB all; \ 522 ${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR} 523 cd ${.CURDIR}/usr.bin/lex; ${MAKE} ${OBJDIR} 524 cd ${.CURDIR}/usr.sbin/mtree; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 525 ${MAKE} ${MK_FLAGS} all; \ 526 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} |
527.if defined(DESTDIR) 528 cd ${.CURDIR}/include && ${MAKE} copies 529.endif |
|
495 496# 497# include-tools - generally the same as 'bootstrap', except that it's for 498# things that are specifically needed to generate include files. 499# 500# XXX should be merged with bootstrap, it's not worth keeeping them separate. 501# Well, maybe it is now. We force 'cleandepend' here to avoid dependencies 502# on cleaned away headers in ${WORLDTMP}. --- 458 unchanged lines hidden (view full) --- 961 @echo "You need to complete a 'make aout-to-elf' to bring your system" 962 @echo "up to date with ELF tools. This requires a fair amount of disk" 963 @echo "space to complete. Alternatively, you can do a binary upgrade" 964 @echo "using the 3.0-RELEASE binaries from CD or ftp.freebsd.org in" 965 @echo "/pub/FreeBSD/3.0-RELEASE/bin/ to convert your userland to ELF." 966 @exit 1 967.endif 968 | 530 531# 532# include-tools - generally the same as 'bootstrap', except that it's for 533# things that are specifically needed to generate include files. 534# 535# XXX should be merged with bootstrap, it's not worth keeeping them separate. 536# Well, maybe it is now. We force 'cleandepend' here to avoid dependencies 537# on cleaned away headers in ${WORLDTMP}. --- 458 unchanged lines hidden (view full) --- 996 @echo "You need to complete a 'make aout-to-elf' to bring your system" 997 @echo "up to date with ELF tools. This requires a fair amount of disk" 998 @echo "space to complete. Alternatively, you can do a binary upgrade" 999 @echo "using the 3.0-RELEASE binaries from CD or ftp.freebsd.org in" 1000 @echo "/pub/FreeBSD/3.0-RELEASE/bin/ to convert your userland to ELF." 1001 @exit 1 1002.endif 1003 |
1004# 1005# cross toolchain 1006# 1007# This is a subset of the tools built in lib-tools, build-tools, etc. What 1008# we are looking for here is to build the cross compilers, etc, with 1009# the current host compiler. 1010# 1011cross-toolchain: 1012.for d in \ 1013 gnu/usr.bin/binutils \ 1014 gnu/usr.bin/bison \ 1015 gnu/usr.bin/cc \ 1016 usr.bin/objformat 1017 cd ${.CURDIR}/$d; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ 1018 ${XTMAKE} ${MK_FLAGS} all; \ 1019 ${XTMAKE} ${MK_FLAGS} -B install; \ 1020 ${XTMAKE} ${MK_FLAGS:S/-DNOPIC//} -B ${CLEANDIR} ${OBJDIR} 1021.endfor |
|
969 970.for __target in clean cleandepend cleandir depend obj 971.for entry in ${SUBDIR} 972${entry}.${__target}__D: .PHONY 973 @if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ 974 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH}"; \ 975 edir=${entry}.${MACHINE_ARCH}; \ 976 cd ${.CURDIR}/$${edir}; \ 977 else \ 978 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \ 979 edir=${entry}; \ 980 cd ${.CURDIR}/$${edir}; \ 981 fi; \ 982 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ 983.endfor 984par-${__target}: ${SUBDIR:S/$/.${__target}__D/} 985.endfor 986 987.include <bsd.subdir.mk> | 1022 1023.for __target in clean cleandepend cleandir depend obj 1024.for entry in ${SUBDIR} 1025${entry}.${__target}__D: .PHONY 1026 @if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ 1027 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH}"; \ 1028 edir=${entry}.${MACHINE_ARCH}; \ 1029 cd ${.CURDIR}/$${edir}; \ 1030 else \ 1031 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \ 1032 edir=${entry}; \ 1033 cd ${.CURDIR}/$${edir}; \ 1034 fi; \ 1035 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ 1036.endfor 1037par-${__target}: ${SUBDIR:S/$/.${__target}__D/} 1038.endfor 1039 1040.include <bsd.subdir.mk> |