]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - Makefile.inc0
Bring in the simplified port probe from src/sys/i386/isa/lpt.c
[FreeBSD/FreeBSD.git] / Makefile.inc0
1 #
2 #       $Id: Makefile.inc0,v 1.13 1998/12/20 14:30:08 jhay 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 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "aout"
22 MK_ENV= MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${OBJFORMAT}
23 .endif
24
25 #
26 # We should always use the current set of mk files, not the installed ones.
27 # This makefile is a wrapper for the backend makefile (Makefile.inc1).
28 #
29 MAKE=   make -m ${.CURDIR}/share/mk -f Makefile.inc1
30
31 #
32 # These are the backend targets.
33 #
34 BKTGTS= all checkdpadd clean cleandepend cleandir \
35         depend everything hierarchy includes install installmost \
36         lint maninstall mk most obj objlink regress rerelease \
37         tags update
38
39 #
40 # A generic rule for the backend targets.
41 #
42 ${BKTGTS} :
43         @cd ${.CURDIR}; ${MAKE} ${.TARGET}
44
45 # These targets are used during a make release, which is done after a
46 # make world, so they should use the same OBJDIRPREFIX that was used
47 # during the make world.
48 RELTGTS= afterdistribute distribute
49
50 ${RELTGTS} :
51         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} ${.TARGET}
52
53 #
54 # Temporary path and environment for the legacy build.
55 #
56 ELFTMP=         ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp
57 ELFTMPPATH=     ${ELFTMP}/sbin:${ELFTMP}/bin:${ELFTMP}/usr/sbin:${ELFTMP}/usr/bin:${ELFTMP}/usr/games
58 LEGACY_ENV=     PATH=${ELFTMPPATH} OBJFORMAT=aout NOTOOLS=1 TOOLROOT=${ELFTMP} \
59                 MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/aout
60 XMAKE=          ${ELFTMP}/usr/bin/${MAKE}
61
62 #
63 # world
64 #
65 # Attempt to rebuild and reinstall *everything*, with reasonable chance of
66 # success, regardless of how old your existing system is. If building on
67 # an i386/elf system, build the aout legacy cruft too.
68 #
69 world:
70         @echo "--------------------------------------------------------------"
71         @echo ">>> ${OBJFORMAT} make world started on `LC_TIME=C date`"
72         @echo "--------------------------------------------------------------"
73 .if target(pre-world)
74         @echo
75         @echo "--------------------------------------------------------------"
76         @echo ">>> Making 'pre-world' target"
77         @echo "--------------------------------------------------------------"
78         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} pre-world
79 .endif
80         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} buildworld
81 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" && !defined(NOAOUT)
82         @cd ${.CURDIR}; ${LEGACY_ENV} ${XMAKE} legacy-build
83 .endif
84         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} -B installworld
85 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" && !defined(NOAOUT)
86         @cd ${.CURDIR}; ${LEGACY_ENV} ${XMAKE} legacy-install
87 .endif
88 .if target(post-world)
89         @echo
90         @echo "--------------------------------------------------------------"
91         @echo ">>> Making 'post-world' target"
92         @echo "--------------------------------------------------------------"
93         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} post-world
94 .endif
95         @echo
96         @echo "--------------------------------------------------------------"
97         @echo ">>> ${OBJFORMAT} make world completed on `LC_TIME=C date`"
98         @echo "--------------------------------------------------------------"
99
100 #
101 # buildworld
102 #
103 # Build the world in the current object format, plus the legacy aout
104 # support if the current object format is elf on i386.
105 #
106 buildworld      :
107         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} buildworld
108 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" && !defined(NOAOUT)
109         @cd ${.CURDIR}; ${LEGACY_ENV} ${XMAKE} legacy-build
110 .endif
111
112 #
113 # installworld
114 #
115 # Install the world in the current object format, plus the legacy aout
116 # support if the current object format is elf on i386.
117 #
118 installworld    :
119         @cd ${.CURDIR}; ${MK_ENV} ${MAKE} installworld
120 .if     ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" && !defined(NOAOUT)
121         @cd ${.CURDIR}; ${LEGACY_ENV} ${XMAKE} -DNOMAN -DNOINFO legacy-install
122 .endif