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
|
diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk
index 9fc6d8f..8ec6e9e 100644
--- a/share/mk/bsd.doc.mk
+++ b/share/mk/bsd.doc.mk
@@ -144,10 +144,12 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \
realinstall:
.if ${PRINTERDEVICE:Mhtml}
cd ${SRCDIR}; \
+ ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}; \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}/
.endif
.for _dev in ${PRINTERDEVICE:Nhtml}
+ ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}; \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},docs} -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 04a0621..45c059e 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -63,6 +63,7 @@ stage_as.${file:T}: ${file}
installfiles-${group}: _${group}INS_${file:T}
_${group}INS_${file:T}: ${file}
+ ${INSTALL} -d ${DESTDIR}${${group}DIR_${.ALLSRC:T}}
${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \
-g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
${.ALLSRC} \
@@ -77,10 +78,12 @@ stage_files.${group}: ${_${group}FILES}
installfiles-${group}: _${group}INS
_${group}INS: ${_${group}FILES}
.if defined(${group}NAME)
+ ${INSTALL} -d ${DESTDIR}${${group}DIR}/${${group}NAME}
${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \
-m ${${group}MODE} ${.ALLSRC} \
${DESTDIR}${${group}DIR}/${${group}NAME}
.else
+ ${INSTALL} -d ${DESTDIR}${${group}DIR}
${INSTALL} ${${group}TAG_ARGS} -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 897618a..a5548bc 100644
--- a/share/mk/bsd.incs.mk
+++ b/share/mk/bsd.incs.mk
@@ -62,6 +62,9 @@ stage_includes: stage_as.${header:T}
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} \
@@ -77,9 +80,13 @@ stage_includes: stage_files.${group}
installincludes: _${group}INS
_${group}INS: ${_${group}INCS}
.if defined(${group}NAME)
+ ${INSTALL} -d -o ${${group}OWN} -g ${${group}GRP} \
+ ${DESTDIR}${${group}DIR}
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -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} ${TAG_ARGS:D${TAG_ARGS},development} -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 3081488..11d4547 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
@@ -141,15 +142,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 3145dbd..5932e17 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -52,8 +52,6 @@ CFLAGS+= ${DEBUG_FLAGS}
.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
CTFFLAGS+= -g
.endif
-.else
-STRIP?= -s
.endif
.if ${SHLIBDIR:M*lib32*}
@@ -335,14 +333,17 @@ realinstall: _libinstall
.ORDER: beforeinstall _libinstall
_libinstall:
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
+ ${INSTALL} -d ${DESTDIR}${_LIBDIR}
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/
.endif
.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
+ ${INSTALL} -d ${DESTDIR}${_LIBDIR}
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},profile} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/
.endif
.if defined(SHLIB_NAME)
+ ${INSTALL} -d ${DESTDIR}${_SHLIBDIR}
${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
@@ -387,10 +388,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} ${TAG_ARGS:D${TAG_ARGS},development} -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} ${TAG_ARGS:D${TAG_ARGS},development} -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 101cddf..2285b63 100644
--- a/share/mk/bsd.libnames.mk
+++ b/share/mk/bsd.libnames.mk
@@ -63,7 +63,7 @@ LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a
LIBEXECINFO?= ${DESTDIR}${LIBDIR}/libexecinfo.a
LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a
LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpar.a
-LIBFL?= "don't use LIBFL, use LIBL"
+LIBFL?= ${DESTDIR}${LIBDIR}/libfl.a
LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a
LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a
LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a
@@ -92,7 +92,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
LIBLN?= "don't use LIBLN, use LIBL"
LIBLZMA?= ${DESTDIR}${LIBDIR}/liblzma.a
LIBM?= ${DESTDIR}${LIBDIR}/libm.a
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index 1eec745..31089fd 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -188,9 +188,11 @@ maninstall: ${MAN}
.if ${MK_MANCOMPRESS} == "no"
.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
@@ -204,11 +206,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
@@ -216,9 +221,11 @@ maninstall: ${MAN}
.endif # defined(MANFILTER)
.else # ${MK_MANCOMPRESS} == "yes"
.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 b1a8094..91ab4f3 100644
--- a/share/mk/bsd.nls.mk
+++ b/share/mk/bsd.nls.mk
@@ -71,7 +71,8 @@ STAGE_SYMLINKS_DIR.NLS= ${STAGE_OBJTOP}
SYMLINKS+= ${NLSSYMLINKS}
.endif
.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})
.if !empty(NLSLINKS_${file:R}:M${file:R})
.error NLSLINKS_${file:R} contains itself: ${file:R}
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 49f6929..2cadaea 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -233,9 +233,6 @@ INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK}
INSTALL_RSYMLINK?= ${INSTALL} ${RSYMLINK}
# 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 bf1bd80..75d2f06 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_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
TAGS+= package=${PACKAGE:Uruntime}
@@ -217,6 +213,7 @@ realinstall: _proginstall
.ORDER: beforeinstall _proginstall
_proginstall:
.if defined(PROG)
+ ${INSTALL} -d ${DESTDIR}${BINDIR}
${INSTALL} ${TAG_ARGS} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
.if ${MK_DEBUG_FILES} != "no"
@@ -255,6 +252,7 @@ SCRIPTSMODE_${script:T}?= ${SCRIPTSMODE}
STAGE_AS_${script:T}= ${SCRIPTSDIR_${script:T}}/${SCRIPTSNAME_${script:T}}
_scriptsinstall: _SCRIPTSINS_${script:T}
_SCRIPTSINS_${script:T}: ${script}
+ ${INSTALL} -d ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}
${INSTALL} ${TAG_ARGS} -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 7885056..6263ba8 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -29,9 +29,6 @@ CFLAGS+= -std=${CSTD}
.if defined(WARNS)
.if ${WARNS} >= 1
CWARNFLAGS+= -Wsystem-headers
-.if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE})
-CWARNFLAGS+= -Werror
-.endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE}
.endif # WARNS >= 1
.if ${WARNS} >= 2
CWARNFLAGS+= -Wall -Wno-format-y2k
@@ -100,9 +97,6 @@ CWARNFLAGS+= -Wformat=2 -Wno-format-extra-args
.if ${WARNS} <= 3
CWARNFLAGS.clang+= -Wno-format-nonliteral
.endif # WARNS <= 3
-.if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE})
-CWARNFLAGS+= -Werror
-.endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE}
.endif # WFORMAT > 0
.endif # WFORMAT
.if defined(NO_WFORMAT) || defined(NO_WFORMAT.${COMPILER_TYPE})
@@ -151,6 +145,13 @@ CFLAGS.clang+= -fno-dwarf2-cfi-asm
# but not yet.
CXXFLAGS.clang+= -Wno-c++11-extensions
+.if ${MK_SSP} == "no"
+# gcc-4.9, -fstack-protector-strong is enabled by default.
+# Add -fno-stack-protector to disable it. Gentoo Bug #511698.
+SSP_CFLAGS?= -fno-stack-protector
+CFLAGS+= ${SSP_CFLAGS}
+.endif
+
.if ${MK_SSP} != "no" && \
${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
.if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index 27b259b..58091a5 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -418,12 +418,6 @@ YFLAGS ?= -d
rm -f ${.PREFIX}.tmp.c
${CTFCONVERT_CMD}
-# Pull in global settings.
-__MAKE_CONF?=/etc/make.conf
-.if exists(${__MAKE_CONF})
-.include "${__MAKE_CONF}"
-.endif
-
# late include for customization
.sinclude <local.sys.mk>
|