]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - Makefile.inc0
s/Linux-PAM/PAM/g
[FreeBSD/FreeBSD.git] / Makefile.inc0
1 #
2 #       $Id: Makefile.inc0,v 1.10 1998/09/29 22:03:13 jkh Exp $
3 #
4 # This makefile ensures that the object directory is set according to the
5 # object format to avoid mixing aout and elf formatted files during the
6 # transition period.
7 #
8 # >> Beware, this makefile  overwrites the local build environment! <<
9 #
10
11 #
12 # Build things relative to the user's preferred object directory,
13 # defaulting to /usr/obj if not defined.
14 #
15 MAKEOBJDIRPREFIX?=/usr/obj
16
17 #
18 # Variables passed to make work better if they are set as environment
19 # variables instead of command line options.
20 #
21 MK_ENV= MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${OBJFORMAT}
22
23 #
24 # We should always use the current set of mk files, not the installed ones.
25 # This makefile is a wrapper for the backend makefile (Makefile.inc1).
26 #
27 MAKE=   make -m ${.CURDIR}/share/mk -f Makefile.inc1
28
29 #
30 # These are the backend targets.
31 #
32 BKTGTS= afterdistribute all checkdpadd clean cleandepend cleandir \
33         depend distribute everything hierarchy includes install installmost \
34         lint maninstall mk most obj objlink regress rerelease \
35         tags update
36
37 #
38 # A generic rule for the backend targets.
39 #
40 ${BKTGTS} :
41         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} ${.TARGET}
42
43 #
44 # Temporary path and environment for the legacy build.
45 #
46 ELFTMP=         ${MAKEOBJDIRPREFIX}/elf${.CURDIR}/tmp
47 ELFTMPPATH=     ${ELFTMP}/sbin:${ELFTMP}/bin:${ELFTMP}/usr/sbin:${ELFTMP}/usr/bin:${ELFTMP}/usr/games
48 LEGACY_ENV=     PATH=${ELFTMPPATH} OBJFORMAT=aout NOTOOLS=1 TOOLROOT=${ELFTMP} \
49                 MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/aout
50 XMAKE=          ${ELFTMP}/usr/bin/${MAKE}
51
52 #
53 # world
54 #
55 # Attempt to rebuild and reinstall *everything*, with reasonable chance of
56 # success, regardless of how old your existing system is. If building on
57 # an i386/elf system, build the aout legacy cruft too.
58 #
59 world:
60         @echo "--------------------------------------------------------------"
61         @echo ">>> ${OBJFORMAT} make world started on `LC_TIME=C date`"
62         @echo "--------------------------------------------------------------"
63 .if target(pre-world)
64         @echo
65         @echo "--------------------------------------------------------------"
66         @echo ">>> Making 'pre-world' target"
67         @echo "--------------------------------------------------------------"
68         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} pre-world
69 .endif
70         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} buildworld
71 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" && !defined(NOAOUT)
72         @cd ${.CURDIR}; ${LEGACY_ENV} ${XMAKE} legacy-build
73 .endif
74         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} -B installworld
75 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" && !defined(NOAOUT)
76         @cd ${.CURDIR}; ${LEGACY_ENV} ${XMAKE} legacy-install
77 .endif
78 .if target(post-world)
79         @echo
80         @echo "--------------------------------------------------------------"
81         @echo ">>> Making 'post-world' target"
82         @echo "--------------------------------------------------------------"
83         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} post-world
84 .endif
85         @echo
86         @echo "--------------------------------------------------------------"
87         @echo ">>> ${OBJFORMAT} make world completed on `LC_TIME=C date`"
88         @echo "--------------------------------------------------------------"
89
90 #
91 # buildworld
92 #
93 # Build the world in the current object format, plus the legacy aout
94 # support if the current object format is elf on i386.
95 #
96 buildworld      :
97         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} buildworld
98 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" && !defined(NOAOUT)
99         @cd ${.CURDIR}; ${LEGACY_ENV} ${XMAKE} legacy-build
100 .endif
101
102 #
103 # installworld
104 #
105 # Install the world in the current object format, plus the legacy aout
106 # support if the current object format is elf on i386.
107 #
108 installworld    :
109         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} installworld
110 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" && !defined(NOAOUT)
111         @cd ${.CURDIR}; ${LEGACY_ENV} ${XMAKE} -DNOMAN -DNOINFO legacy-install
112 .endif