summaryrefslogtreecommitdiff
blob: 2b997540d5d865e672360ac9cfb0227a3111b3ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
tested revision 255489

diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
index 2d648de..e456a4b 100644
--- a/share/mk/bsd.compiler.mk
+++ b/share/mk/bsd.compiler.mk
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 .if !defined(COMPILER_TYPE)
-. if ${CC:T:Mgcc*}
+. if ${CC:T:M*gcc*}
 COMPILER_TYPE:=	gcc  
 . elif ${CC:T:Mclang}
 COMPILER_TYPE:=	clang
diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk
index 49b2d9b..c2a8c5c 100644
--- a/share/mk/bsd.doc.mk
+++ b/share/mk/bsd.doc.mk
@@ -135,10 +135,12 @@ CLEANFILES+=	${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \
 realinstall:
 .for _dev in ${PRINTERDEVICE:Mhtml}
 	cd ${SRCDIR}; \
+	    ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}; \
 	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
 	    ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
 .endfor
 .for _dev in ${PRINTERDEVICE:Nhtml}
+	${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}; \
 	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
 	    ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME}
 .endfor
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index 240f958..67f0cf9 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -39,6 +39,7 @@ ${group}NAME_${file:T}?=	${file:T}
 .endif
 installfiles: _${group}INS_${file:T}
 _${group}INS_${file:T}: ${file}
+	${INSTALL} -d ${DESTDIR}${${group}DIR_${.ALLSRC:T}}
 	${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
 	    -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
 	    ${.ALLSRC} \
@@ -51,10 +52,12 @@ _${group}FILES+= ${file}
 installfiles: _${group}INS
 _${group}INS: ${_${group}FILES}
 .if defined(${group}NAME)
+	${INSTALL} -d ${DESTDIR}${${group}DIR}/${${group}NAME}
 	${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
 	    -m ${${group}MODE} ${.ALLSRC} \
 	    ${DESTDIR}${${group}DIR}/${${group}NAME}
 .else
+	${INSTALL} -d ${DESTDIR}${${group}DIR}
 	${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
 	    -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}
 .endif
diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk
index 74c378b..7d2c7a0 100644
--- a/share/mk/bsd.incs.mk
+++ b/share/mk/bsd.incs.mk
@@ -41,6 +41,9 @@ ${group}NAME_${header:T}?=	${header:T}
 .endif
 installincludes: _${group}INS_${header:T}
 _${group}INS_${header:T}: ${header}
+	${INSTALL} -d -o ${${group}OWN_${.ALLSRC:T}} \
+		 -g ${${group}GRP_${.ALLSRC:T}} \
+		 ${DESTDIR}${${group}DIR_${.ALLSRC:T}}
 	${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \
 	    -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
 	    ${.ALLSRC} \
@@ -53,9 +56,13 @@ _${group}INCS+= ${header}
 installincludes: _${group}INS
 _${group}INS: ${_${group}INCS}
 .if defined(${group}NAME)
+	${INSTALL} -d -o ${${group}OWN} -g ${${group}GRP} \
+		${DESTDIR}${${group}DIR}
 	${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
 	    ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
 .else
+	${INSTALL} -d -o ${${group}OWN} -g ${${group}GRP} \
+		${DESTDIR}${${group}DIR}
 	${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
 	    ${.ALLSRC} ${DESTDIR}${${group}DIR}
 .endif
diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk
index c54b435..d283240 100644
--- a/share/mk/bsd.info.mk
+++ b/share/mk/bsd.info.mk
@@ -83,6 +83,7 @@ INFO2HTML?=	info2html
 TEX?=		tex
 DVIPS?=		dvips
 DVIPS2ASCII?=	dvips2ascii
+INSTALL?=	install
 
 .SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1 .html
 
@@ -144,15 +145,17 @@ ${x:S/$/${ICOMPRESS_EXT}/}:	${x}
 INSTALLINFODIRS+= ${x:S/$/-install/}
 ${x:S/$/-install/}:
 .if !empty(.MAKEFLAGS:M-j)
+	${INSTALL} -d ${DESTDIR}${INFODIR}
 	lockf -k ${DESTDIR}${INFODIR}/${INFODIRFILE} \
 	${INSTALLINFO} ${INSTALLINFOFLAGS} \
-	    --defsection=${INFOSECTION} \
-	    --defentry=${INFOENTRY_${x}} \
+	    --section=${INFOSECTION} \
+	    --entry=${INFOENTRY_${x}} \
 	    ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE}
 .else
+	${INSTALL} -d ${DESTDIR}${INFODIR}
 	${INSTALLINFO} ${INSTALLINFOFLAGS} \
-	    --defsection=${INFOSECTION} \
-	    --defentry=${INFOENTRY_${x}} \
+	    --section=${INFOSECTION} \
+	    --entry=${INFOENTRY_${x}} \
 	    ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE}
 .endif
 .endfor
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index bb3db64..dbb9bf4 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -39,8 +39,6 @@ CFLAGS+= ${DEBUG_FLAGS}
 .if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
 CTFFLAGS+= -g
 .endif
-.else
-STRIP?=	-s
 .endif
 
 .if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
@@ -302,14 +300,17 @@ realinstall: _libinstall
 .ORDER: beforeinstall _libinstall
 _libinstall:
 .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
+	${INSTALL} -d ${DESTDIR}${_LIBDIR}
 	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${_LIBDIR}
 .endif
 .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
+	${INSTALL} -d ${DESTDIR}${_LIBDIR}
 	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${_LIBDIR}
 .endif
 .if defined(SHLIB_NAME)
+	${INSTALL} -d ${DESTDIR}${_SHLIBDIR}
 	${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
 	    ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}
@@ -363,10 +364,12 @@ _libinstall:
 .endif # SHLIB_LINK
 .endif # SHIB_NAME
 .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
+	${INSTALL} -d ${DESTDIR}${_LIBDIR}
 	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}
 .endif
 .if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
+	${INSTALL} -d ${DESTDIR}${LINTLIBDIR}
 	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}
 .endif
diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk
index 00d38ff..86792f4 100644
--- a/share/mk/bsd.libnames.mk
+++ b/share/mk/bsd.libnames.mk
@@ -53,7 +53,7 @@ LIBEDIT?=	${DESTDIR}${LIBDIR}/libedit.a
 LIBELF?=	${DESTDIR}${LIBDIR}/libelf.a
 LIBEXECINFO?=	${DESTDIR}${LIBDIR}/libexecinfo.a
 LIBFETCH?=	${DESTDIR}${LIBDIR}/libfetch.a
-LIBFL?=		"don't use LIBFL, use LIBL"
+LIBFL?=		${DESTDIR}${LIBDIR}/libfl.a
 LIBFORM?=	${DESTDIR}${LIBDIR}/libform.a
 LIBG2C?=	${DESTDIR}${LIBDIR}/libg2c.a
 LIBGCC?=	${DESTDIR}${LIBDIR}/libgcc.a
@@ -88,7 +88,7 @@ LIBKEYCAP?=	${DESTDIR}${LIBDIR}/libkeycap.a
 LIBKICONV?=	${DESTDIR}${LIBDIR}/libkiconv.a
 LIBKRB5?=	${DESTDIR}${LIBDIR}/libkrb5.a
 LIBKVM?=	${DESTDIR}${LIBDIR}/libkvm.a
-LIBL?=		${DESTDIR}${LIBDIR}/libl.a
+LIBL?=		${DESTDIR}${LIBDIR}/libfl.a
 .if ${MK_LDNS} != "no"
 LIBLDNS?=	${DESTDIR}${LIBPRIVATEDIR}/libldns.a
 .endif
diff --git a/share/mk/bsd.links.mk b/share/mk/bsd.links.mk
index 1e4d57e..fcb81fe 100644
--- a/share/mk/bsd.links.mk
+++ b/share/mk/bsd.links.mk
@@ -15,6 +15,8 @@ _installlinks:
 		t=${DESTDIR}$$1; \
 		shift; \
 		${ECHO} $$t -\> $$l; \
+		d=`dirname $$t`; \
+		test -d $$d || mkdir $$d; \
 		${INSTALL_LINK} $$l $$t; \
 	done; true
 .endif
@@ -26,6 +28,8 @@ _installlinks:
 		t=${DESTDIR}$$1; \
 		shift; \
 		${ECHO} $$t -\> $$l; \
+		d=`dirname $$t`; \
+		test -d $$d || mkdir $$d; \
 		${INSTALL_SYMLINK} $$l $$t; \
 	done; true
 .endif
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index 6445ba3..fabffa2 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -165,9 +165,11 @@ _maninstall: ${MAN}
 .if defined(NO_MANCOMPRESS)
 .if defined(MANFILTER)
 .for __page in ${MAN}
+	${INSTALL} -d ${DESTDIR}${MANDIR}${page:E}${MANSUBDIR}/${page}
 	${MINSTALL} ${__page:T:S/$/${FILTEXTENSION}/g} \
 		${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/${__page}
 .if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
+	${INSTALL} -d ${DESTDIR}${CATDIR}${page:E}${MANSUBDIR}/${page}
 	${MINSTALL} ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} \
 		${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page}
 .endif
@@ -181,11 +183,14 @@ _maninstall: ${MAN}
 		esac; \
 		page=$$1; shift; sect=$$1; shift; \
 		d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \
+		${ECHO} ${INSTALL} -d $${d}; \
+		${INSTALL} -d $${d}; \
 		${ECHO} ${MINSTALL} $${page} $${d}; \
 		${MINSTALL} $${page} $${d}; \
 	done
 .if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
 .for __page in ${MAN}
+	${INSTALL} -d ${DESTDIR}${CATDIR}${page:E}${MANSUBDIR}/${page:T}
 	${MINSTALL} ${__page:T:S/$/${CATEXT}/} \
 		${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T}
 .endfor
@@ -193,9 +198,11 @@ _maninstall: ${MAN}
 .endif
 .else
 .for __page in ${MAN}
+	${INSTALL} -d ${DESTDIR}${MANDIR}${page:E}${MANSUBDIR}
 	${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \
 		${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}
 .if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
+	${INSTALL} -d ${DESTDIR}${CATDIR}${page:E}${MANSUBDIR}/${page:T:S/$/${MCOMPRESS_EXT}
 	${MINSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \
 		${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/}
 .endif
diff --git a/share/mk/bsd.nls.mk b/share/mk/bsd.nls.mk
index 48093eb..69f56bc 100644
--- a/share/mk/bsd.nls.mk
+++ b/share/mk/bsd.nls.mk
@@ -62,7 +62,8 @@ NLSDIR?=	${SHAREDIR}/nls
 # installation rules
 #
 .for file in ${NLS}
-NLSNAME_${file:T}= ${file:T:R}/${NLSNAME}.cat
+NLSDIR_${file:T}= ${SHAREDIR}/nls/${file:T:R}/
+NLSNAME_${file:T}= ${NLSNAME}.cat
 .if defined(NLSLINKS_${file:R}) && !empty(NLSLINKS_${file:R})
 NLSLINKS+=	${file:R}
 .endif
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 8f7f0b9..189ccec 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -202,9 +202,6 @@ INSTALL_LINK?=		${INSTALL} ${HRDLINK}
 INSTALL_SYMLINK?=	${INSTALL} ${SYMLINK}
 
 # Common variables
-.if !defined(DEBUG_FLAGS)
-STRIP?=		-s
-.endif
 
 COMPRESS_CMD?=	gzip -cn
 COMPRESS_EXT?=	.gz
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 22ddfb5..f6a4939 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -44,10 +44,6 @@ CTFFLAGS+= -g
 .endif
 .endif
 
-.if !defined(DEBUG_FLAGS)
-STRIP?=	-s
-.endif
-
 .if defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO")
 LDFLAGS+= -static
 .endif
@@ -201,6 +197,7 @@ realinstall: _proginstall
 .ORDER: beforeinstall _proginstall
 _proginstall:
 .if defined(PROG)
+	${INSTALL} -d ${DESTDIR}${BINDIR}
 	${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
 	    ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
 .if ${MK_DEBUG_FILES} != "no"
@@ -234,6 +231,7 @@ SCRIPTSGRP_${script:T}?=	${SCRIPTSGRP}
 SCRIPTSMODE_${script:T}?=	${SCRIPTSMODE}
 _scriptsinstall: _SCRIPTSINS_${script:T}
 _SCRIPTSINS_${script:T}: ${script}
+	${INSTALL} -d ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}
 	${INSTALL} -o ${SCRIPTSOWN_${.ALLSRC:T}} \
 	    -g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \
 	    ${.ALLSRC} \
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 72dfa61..4f21af4 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -30,10 +30,6 @@ CFLAGS+=	-std=${CSTD}
 .if defined(WARNS)
 .if ${WARNS} >= 1
 CWARNFLAGS+=	-Wsystem-headers
-.if !defined(NO_WERROR) && (${COMPILER_TYPE} != "clang" \
-    || !defined(NO_WERROR.clang))
-CWARNFLAGS+=	-Werror
-.endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang)
 .endif # WARNS >= 1
 .if ${WARNS} >= 2
 CWARNFLAGS+=	-Wall -Wno-format-y2k
@@ -99,10 +95,6 @@ CWARNFLAGS+=	-Wformat=2 -Wno-format-extra-args
 CWARNFLAGS+=	-Wno-format-nonliteral
 .endif # WARNS <= 3
 .endif # CLANG
-.if !defined(NO_WERROR) && (${COMPILER_TYPE} != "clang" \
-    || !defined(NO_WERROR.clang))
-CWARNFLAGS+=	-Werror
-.endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang)
 .endif # WFORMAT > 0
 .endif # WFORMAT
 .if defined(NO_WFORMAT) || (${COMPILER_TYPE} == "clang" && defined(NO_WFORMAT.clang))
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index eb9f2ca..09ad4cf 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -321,12 +321,6 @@ YFLAGS		?=	-d
 	rm -f ${.PREFIX}.tmp.c
 	${CTFCONVERT_CMD}
 
-# FreeBSD build pollution.  Hide it in the non-POSIX part of the ifdef.
-__MAKE_CONF?=/etc/make.conf
-.if exists(${__MAKE_CONF})
-.include "${__MAKE_CONF}"
-.endif
-
 .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)
 SHELL=	${__MAKE_SHELL}
 .SHELL: path=${__MAKE_SHELL}