]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.port.subdir.mk
Obtained from: my old fix for 1.1.5
[FreeBSD/FreeBSD.git] / share / mk / bsd.port.subdir.mk
1 #       from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
2 #       $Id: bsd.port.subdir.mk,v 1.5 1994/09/16 14:30:22 jkh Exp $
3
4 .MAIN: all
5
6 .if !defined(DEBUG_FLAGS)
7 STRIP?= -s
8 .endif
9
10 BINGRP?=        bin
11 BINOWN?=        bin
12 BINMODE?=       555
13
14 _SUBDIRUSE: .USE
15         @for entry in ${SUBDIR}; do \
16                 (if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
17                         echo "===> ${DIRPRFX}$${entry}.${MACHINE}"; \
18                         edir=$${entry}.${MACHINE}; \
19                         cd ${.CURDIR}/$${edir}; \
20                 else \
21                         echo "===> ${DIRPRFX}$$entry"; \
22                         edir=$${entry}; \
23                         cd ${.CURDIR}/$${edir}; \
24                 fi; \
25                 ${MAKE} ${.TARGET:realinstall=install} DIRPRFX=${DIRPRFX}$$edir/); \
26         done
27
28 ${SUBDIR}::
29         @if test -d ${.TARGET}.${MACHINE}; then \
30                 cd ${.CURDIR}/${.TARGET}.${MACHINE}; \
31         else \
32                 cd ${.CURDIR}/${.TARGET}; \
33         fi; \
34         ${MAKE} all
35
36 .if !target(all)
37 all: _SUBDIRUSE
38 .endif
39
40 .if !target(fetch)
41 fetch: _SUBDIRUSE
42 .endif
43
44 .if !target(package)
45 package: _SUBDIRUSE
46 .endif
47
48 .if !target(extract)
49 extract: _SUBDIRUSE
50 .endif
51
52 .if !target(configure)
53 configure: _SUBDIRUSE
54 .endif
55
56 .if !target(build)
57 build: _SUBDIRUSE
58 .endif
59
60 .if !target(clean)
61 clean: _SUBDIRUSE
62 .endif
63
64 .if !target(depend)
65 depend: _SUBDIRUSE
66 .endif
67
68 .if !target(reinstall)
69 reinstall: _SUBDIRUSE
70 .endif
71
72 .if !target(install)
73 .if !target(beforeinstall)
74 beforeinstall:
75 .endif
76 .if !target(afterinstall)
77 afterinstall:
78 .endif
79 install: afterinstall
80 afterinstall: realinstall
81 realinstall: beforeinstall _SUBDIRUSE
82 .endif
83
84 .if !target(tags)
85 tags: _SUBDIRUSE
86 .endif