View | Details | Raw Unified | Return to bug 213572
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 133-139 Link Here
133
	xdev-links native-xtools stageworld stagekernel stage-packages \
133
	xdev-links native-xtools stageworld stagekernel stage-packages \
134
	create-packages-world create-packages-kernel create-packages \
134
	create-packages-world create-packages-kernel create-packages \
135
	packages installconfig real-packages sign-packages package-pkg \
135
	packages installconfig real-packages sign-packages package-pkg \
136
	print-dir test-system-compiler
136
	print-dir test-system-compiler config rmconfig
137
137
138
# XXX: r156740: This can't work since bsd.subdir.mk is not included ever.
138
# XXX: r156740: This can't work since bsd.subdir.mk is not included ever.
139
# It will only work for SUBDIR_TARGETS in make.conf.
139
# It will only work for SUBDIR_TARGETS in make.conf.
(-)Makefile.config (+179 lines)
Line 0 Link Here
1
# $FreeBSD$
2
#
3
# This Makefile is designed to have a very simpe interface to create a
4
# user-friendly interface to configure the options needed to build the
5
# world and/or the kernel, but not the options used to compile the kernel
6
# or the devices that will be statically linked to the kernel.
7
8
.include <src.opts.mk>
9
.include "${.CURDIR}/sys/conf/kern.opts.mk"
10
.include <src.opts.desc.mk>
11
12
DIALOG?=/usr/bin/dialog
13
DIALOG_OPTS=--backtitle "FreeBSD Configurator"
14
CHECK_LIST=--checklist "Build options" 50 80 45
15
MAKE=/usr/bin/make -C ${.CURDIR} 
16
MAKE_CONF=${MAKE} -f Makefile.config
17
WARNMSG=The following options will be set because of the chosen options:
18
19
SRCCONF?=/etc/src.conf
20
SRCCONF_BEFORE=${SRCCONF}
21
SRCCONF_DEFAULT=/dev/null
22
SRCCONF_CURRENT=/tmp/`echo ${SRCCONF} | tr '/' '_'`
23
24
SRC_ENV_CONF?=/etc/src-env.conf
25
SRC_ENV_CONF_BEFORE=${SRC_ENV_CONF}
26
SRC_ENV_CONF_DEFAULT=/dev/null
27
SRC_ENV_CONF_CURRENT=/tmp/`echo ${SRC_ENV_CONF} | tr '/' '_'`
28
29
CONFIG_OPTIONS=
30
31
# Create the main menu with all the options to be configured.
32
MAIN_MENU=
33
.for __cat in ${CATEGORIES}
34
MAIN_MENU+=	${__cat}
35
.if defined(${__cat}_DESC)
36
MAIN_MENU+=	${${__cat}_DESC}
37
.else
38
MAIN_MENU+=	${__cat}
39
.endif
40
41
# For every single category, get the options to be configured on it.
42
.if defined(${__cat})
43
${__cat}_OPTS=
44
.for __opt in ${${__cat}}
45
${__cat}_OPTS+=	${__opt}
46
.if defined(${__opt}_DESC)
47
${__cat}_OPTS+=	"${${__opt}_DESC}"
48
.else
49
${__cat}_OPTS+=	"${__opt}"
50
.endif 
51
52
.if defined(MK_${__opt})
53
.if ${MK_${__opt}} != "no"
54
${__cat}_OPTS+= on
55
.else
56
${__cat}_OPTS+=	off
57
.endif
58
.else
59
${__cat}_OPTS+= off
60
.endif
61
62
.endfor
63
64
65
config-${__cat:tl}:
66
	@${DIALOG} ${DIALOG_OPTS} ${CHECK_LIST} ${${__cat}_OPTS}\
67
		2> /tmp/config || exit 0; \
68
	touch ${SRCCONF_CURRENT}.tmp ${SRC_ENV_CONF_CURRENT}.tmp ; \
69
	for ITEM in ${${__cat}};do \
70
		FILE=${SRCCONF_CURRENT}.tmp ; \
71
		echo ${__ENV_ONLY_OPTIONS} | grep -q "$${ITEM}"\
72
				&& FILE=${SRC_ENV_CONF_CURRENT}.tmp; \
73
		if grep -qE "(^|[[:space:]])$${ITEM}([[:space:]]|$$)" \
74
			/tmp/config ; then \
75
			echo "WITH_$${ITEM}=yes" >> $${FILE}; \
76
		else \
77
			echo "WITHOUT_$${ITEM}=yes" >> $${FILE} ; \
78
		fi ; \
79
	done ;\
80
	sort ${SRCCONF_CURRENT}.tmp | uniq > ${SRCCONF_CURRENT} || true; \
81
	sort ${SRC_ENV_CONF_CURRENT}.tmp | uniq > ${SRC_ENV_CONF_CURRENT} || true; \
82
	rm -f /tmp/config-* ; \
83
	${MAKE_CONF} check-config ; \
84
	if [ ! -s "${SRCCONF}.tmp" -a ! -s "${SRC_CONF_ENV}.tmp" ] ;\
85
	then \
86
		comm -23 /tmp/config-current /tmp/config-default \
87
			> ${SRCCONF} ;\
88
		comm -23 /tmp/config-current.env /tmp/config-default.env \
89
			> ${SRC_ENV_CONF} ; \
90
	else \
91
		WARNMSG="${WARNMSG}" ; \
92
		for ITEM in $$(cut -d '=' -f1 ${SRCCONF}.tmp) ; do \
93
			ONOFF=$$(echo $${ITEM} | cut -d '_' -f1) ; \
94
			ITEM=$$(echo $${ITEM} | cut -d '_' -f2-) ; \
95
			[ "$${ONOFF}" = "WITHOUT" ] && ONOFF="off" \
96
				|| ONOFF="on" ;\
97
			WARNMSG="$${WARNMSG}\n    $${ITEM} -> $${ONOFF}"; \
98
		done ; \
99
		${DIALOG} ${DIALOG_OPTS} --msgbox "$${WARNMSG}" 30 70 ; \
100
		${MAKE_CONF} config-${__cat:tl} ;\
101
	fi
102
.endif #defined(${__cat})
103
.endfor #${CATEGORIES}
104
105
.for __conf in before default current
106
config-${__conf}:
107
	@${MAKE} SRCCONF=${SRCCONF_${__conf:tu}} \
108
	SRC_CONF_ENV=${SRC_ENV_CONF_${__conf:tu}} showconfig | \
109
	while read OPTION _ VALUE; do \
110
		FILE=/tmp/${.TARGET}.tmp ; \
111
		echo ${__ENV_ONLY_OPTIONS} | grep -q "$${OPTION##MK_}" && \
112
			FILE=/tmp/${.TARGET}.env.tmp ;\
113
		[ "$${VALUE}" = "yes" ] && WHAT=WITH || WHAT=WITHOUT ; \
114
		echo "$${WHAT}_$${OPTION##MK_}=yes" >> $${FILE} ;\
115
	done ; sort /tmp/${.TARGET}.tmp | uniq > /tmp/${.TARGET} ; \
116
	sort /tmp/${.TARGET}.env.tmp | uniq > /tmp/${.TARGET}.env ; \
117
	rm -f /tmp/${.TARGET}.tmp /tmp/${.TARGET}.env.tmp
118
	
119
.endfor
120
121
config: ${SRCCONF} ${SRC_ENV_CONF} 
122
	@cp ${SRCCONF} ${SRCCONF}.bak; \
123
	cp ${SRC_ENV_CONF} ${SRC_ENV_CONF}.bak; \
124
	while true ; do \
125
		if [ -r "${SRCCONF_CURRENT}" ] ; then \
126
			echo "There is another process trying to configure the build" \
127
			", please finish it first." ;\
128
			exit 1 ;\
129
		fi ; \
130
		cp ${SRCCONF} ${SRCCONF_CURRENT} ;\
131
		if ! ${DIALOG} ${DIALOG_OPTS} --menu "Categories" 20 70 15 \
132
			${MAIN_MENU} SAVE "Save the current configuration" \
133
			 2> /tmp/config ; then\
134
			mv ${SRCCONF}.bak ${SRCCONF} ;\
135
			mv ${SRC_ENV_CONF}.bak ${SRC_ENV_CONF} ;\
136
			rm -f /tmp/config* ${SRCCONF_CURRENT}* \
137
				${SRC_ENV_CONF_CURRENT}* ${SRCCONF}.tmp \
138
				${SRC_ENV_CONF}.tmp ;\
139
			exit 0 ;\
140
		fi ;\
141
		SUBMENU="config-`cat /tmp/config | tr '[:upper:]' '[:lower:]'`"; \
142
		${MAKE_CONF} $${SUBMENU} ; \
143
		rm -f /tmp/config* ${SRCCONF_CURRENT}* \
144
			${SRC_ENV_CONF_CURRENT}* ${SRCCONF}.tmp \
145
			${SRC_ENV_CONF}.tmp ;\
146
		[ "$${SUBMENU}" = "config-save" ] && break ; \
147
	done
148
149
${SRCCONF} ${SRC_ENV_CONF}:
150
	@[ -r ${.TARGET} ] || touch ${.TARGET}
151
152
check-config: ${SRCCONF} ${SRC_ENV_CONF} config-before config-default config-current
153
	@comm -23 /tmp/config-current /tmp/config-before | sort | uniq \
154
		> ${SRCCONF_CURRENT}.diff ;\
155
	comm -23 /tmp/config-current.env /tmp/config-before.env | sort | uniq \
156
		> ${SRC_ENV_CONF_CURRENT}.diff ;\
157
	cat ${SRCCONF_CURRENT}.diff | while read LINE ; do \
158
		grep -qE "$${LINE} ${SRCCONF_CURRENT} && continue ;\
159
		echo $${LINE} ; \
160
	done > ${SRCCONF}.tmp ; \
161
	cat ${SRC_ENV_CONF_CURRENT}.diff | while read LINE ; do \
162
		grep -qE "$${LINE} ${SRC_ENV_CONF_CURRENT} && continue ;\
163
		echo $${LINE} ; \
164
	done > ${SRC_ENV_CONF}.tmp
165
166
config-save: config-default config-current
167
	@if [ -r "${SRCCONF_CURRENT}" ] ; then \
168
		mv ${SRCCONF_CURRENT} ${SRCCONF} ; \
169
		rm -f ${SRCCONF}.bak ; \
170
	else \
171
		mv ${SRCCONF}.bak ${SRCCONF} ; \
172
	fi
173
	@if [ -r "${SRC_ENV_CONF_CURRENT}" ] ; then \
174
		mv ${SRC_ENV_CONF_CURRENT} ${SRC_ENV_CONF} ; \
175
		rm ${SRC_ENV_CONF}.bak ; \
176
	else \
177
		mv ${SRC_ENV_CONF}.bak ${SRC_ENV_CONF} ; \
178
	fi
179
(-)Makefile.inc1 (+6 lines)
Lines 2889-2891 Link Here
2889
xdev xdev-build xdev-install xdev-links: .PHONY
2889
xdev xdev-build xdev-install xdev-links: .PHONY
2890
	@echo "*** Error: Both TARGET and TARGET_ARCH must be defined for \"${.TARGET}\" target"
2890
	@echo "*** Error: Both TARGET and TARGET_ARCH must be defined for \"${.TARGET}\" target"
2891
.endif
2891
.endif
2892
2893
config:
2894
	@cd ${SRCDIR} ; ${CDMAKE} -f Makefile.config config
2895
2896
rmconfig:
2897
	@rm -f /etc/src.conf /etc/src-env.conf
(-)share/mk/src.opts.desc.mk (+264 lines)
Line 0 Link Here
1
# $FreeBSD$
2
#
3
# Description of the options used for all the /usr/src builds
4
#
5
# All the descriptions are stored in the FOO_DESC variables.
6
7
CATEGORIES= \
8
	    ADMIN 	\
9
	    DEVEL 	\
10
	    DOCS	\
11
	    DRIVERS	\
12
	    EMULATION	\
13
	    NETWORK	\
14
	    OTHER	\
15
	    PROGRAMS	\
16
	    SECURITY	\
17
18
19
ADMIN=	\
20
	ACCT 			\
21
	ACPI			\
22
	AMD			\
23
	APM			\
24
	AT			\
25
	AUDIT			\
26
	AUTHPF			\
27
	AUTOFS			\
28
	BLACKLIST		\
29
	BLACKLIST_SUPPORT	\
30
	BSDINSTALL		\
31
	FINGER			\
32
	FREEBSD_UPDATE		\
33
	HAST			\
34
	JAIL			\
35
	LPR			\
36
	MAIL			\
37
	MAILWRAPPER		\
38
	NTP			\
39
	PAM			\
40
	PAM_SUPPORT		\
41
	PC_SYSINSTALL		\
42
	PF			\
43
	PKGBOOTSTRAP		\
44
	PMC			\
45
	PORTSNAP		\
46
	QUOTAS			\
47
	RADIUS_SUPPORT		\
48
	RATELIMIT		\
49
	RBOOTD			\
50
	RCMDS			\
51
	SENDMAIL		\
52
	SETUID_LOGIN		\
53
	TALK			\
54
	TIMED			\
55
	UTMPX			\
56
57
58
DEVEL=	\
59
	ASSERT_DEBUG 		\
60
	AUTO_OBJ		\
61
	BINUTILS		\
62
	BINUTILS_BOOTSTRAP	\
63
	CCACHE_BUILD		\
64
	CLANG			\
65
	CLANG_BOOTSTRAP		\
66
	CLANG_EXTRAS		\
67
	CLANG_FULL		\
68
	CROSS_COMPILER		\
69
	CTF			\
70
	CTM			\
71
	CXGBETOOL		\
72
	CXX			\
73
	DEBUG_FILES		\
74
	DIRDEPS_BUILD		\
75
	DIRDEPS_CACHE		\
76
	DTRACE_TESTS		\
77
	ELFTOOLCHAIN_BOOTSTRAP	\
78
	FORMAT_EXTENSIONS	\
79
	FP_LIBC			\
80
	GCC			\
81
	GCC_BOOTSTRAP		\
82
	GCOV			\
83
	GDB			\
84
	GDB_LIBEXEC		\
85
	GNUCXX			\
86
	ICONV			\
87
	INCLUDES		\
88
	INSTALLLIB		\
89
	KDUMP			\
90
	KERNEL_SYMBOLS		\
91
	KVM			\
92
	KVM_SUPPORT		\
93
	LIB32			\
94
	LIBCPLUSPLUS		\
95
	LIBPTHREAD		\
96
	LIBSOFT			\
97
	LIBTHR			\
98
	LLD			\
99
	LLDB			\
100
	LLD_BOOTSTRAP		\
101
	LLVM_LIBUNWIND		\
102
	MAKE			\
103
	META_MODE		\
104
	PROFILE			\
105
	REPRODUCIBLE_BUILD	\
106
	RESCUE			\
107
	SHARED_TOOLCHAIN	\
108
	SOURCELESS		\
109
	SOURCELESS_HOST		\
110
	SOURCELESS_UCODE	\
111
	SSP			\
112
	STAGING			\
113
	STALE_STAGED		\
114
	SYSROOT			\
115
	SYSTEM_COMPILER		\
116
	TESTS			\
117
	TESTS_SUPPORT		\
118
	TOOLCHAIN		\
119
	WARNS			\
120
121
122
NETWORK= \
123
	 ATM			\
124
	 BLUETOOTH		\
125
	 DMAGENT		\
126
	 EXTRA_TCP_STACKS	\
127
	 INET			\
128
	 INET6			\
129
	 INET6_SUPPORT		\
130
	 INETD			\
131
	 INET_SUPPORT		\
132
	 IPFILTER		\
133
	 IPFW			\
134
	 IPSEC_SUPPORT		\
135
	 LDNS			\
136
	 LDNS_UTILS		\
137
	 NETCAT			\
138
	 NETGRAPH		\
139
	 NETGRAPH_SUPPORT	\
140
	 NIS			\
141
	 PPP			\
142
	 ROUTED			\
143
	 RPCBIND_WARMSTART_SUPPORT	\
144
	 TCP_WRAPPERS		\
145
	 TELNET			\
146
	 TFTP			\
147
	 UNBOUND		\
148
	 WIRELESS		\
149
	 WIRELESS_SUPPORT	\
150
	 WPA_SUPPLICANT_EAPOL	\
151
152
153
EMULATION= \
154
	   BHYVE		\
155
	   NDIS			\
156
157
158
PROGRAMS= \
159
	  BSD_CPIO		\
160
	  BSD_GREP		\
161
	  BSD_GREP_FASTMATCH	\
162
	  BSNMP			\
163
	  BZIP2			\
164
	  BZIP2_SUPPORT		\
165
	  CALENDAR		\
166
	  CLANG_IS_CC		\
167
	  CPP			\
168
	  DIALOG		\
169
	  EE			\
170
	  FILE			\
171
	  FMTREE		\
172
	  FTP			\
173
	  GAMES			\
174
	  GNU_DIFF		\
175
	  GNU_GREP		\
176
	  GNU_GREP_COMPAT	\
177
	  GPIO			\
178
	  LLD_IS_LD		\
179
	  LOCATE		\
180
	  LS_COLORS		\
181
	  LZMA_SUPPORT		\
182
	  SORT_THREADS		\
183
	  STAGING_PROG		\
184
	  SVN			\
185
	  SVNLITE		\
186
	  SYMVER		\
187
	  SYSCONS		\
188
	  TCSH			\
189
	  TEXTPROC		\
190
	  USB			\
191
	  VI			\
192
193
194
SECURITY= \
195
	  CAPSICUM		\
196
	  CASPER		\
197
	  CRYPT			\
198
	  ED_CRYPTO		\
199
	  GSSAPI		\
200
	  KERBEROS		\
201
	  KERBEROS_SUPPORT	\
202
	  OPENLDAP		\
203
	  OPENSSH		\
204
	  OPENSSL		\
205
206
207
DRIVERS= \
208
	 CCD			\
209
	 CUSE			\
210
	 FDT			\
211
	 FLOPPY			\
212
	 HESIOD			\
213
	 HYPERV			\
214
	 ISCSI			\
215
	 NAND			\
216
	 USB_GADGET_EXAMPLES	\
217
	 ZFS			\
218
219
220
OTHER= \
221
	BOOT			\
222
	BOOTPARAMD		\
223
	BOOTD			\
224
	CDDL			\
225
	DYNAMICROOT		\
226
	EFI			\
227
	FORTH			\
228
	GPL_DTC			\
229
	INSTALL_AS_USER		\
230
	LEGACY_CONSOLE		\
231
	LOCALES			\
232
	NLS			\
233
	NLS_CATALOGS		\
234
	NLS_CACHING		\
235
	OFED			\
236
	ZONEINFO		\
237
	ZONEINFO_LEAPSECONDS_SUPPORT	\
238
	ZONEINFO_OLD_TIMEZONES_SUPPORT	\
239
240
241
DOCS=	\
242
	DICT			\
243
	DOCCOMPRESS		\
244
	EXAMPLES		\
245
	HTML			\
246
	MAN			\
247
	MANCOMPRESS		\
248
	MAN_UTILS		\
249
	SHAREDOCS		\
250
	STAGING_MAN		\
251
	VT			\
252
253
254
ADMIN_DESC=	"Administration programs"
255
DEVEL_DESC=	"Building options, compilers and debugging information."
256
DOCS_DESC=	"Documentation options"
257
DRIVERS_DESC=	"Kernel modules or options relative to devices."
258
EMULATION_DESC=	"Emulation/virtualitation options."
259
NETWORK_DESC=	"Programs or kernel options/modules to build."
260
OTHER_DESC=	"Other options to configure."
261
PROGRAMS_DESC=	"Non-administrative programs to build."
262
SECURITY_DESC=	"Security features to include in the build."
263
264

Return to bug 213572