PR 55769: avoid the module set if we do not build anydiff -r1.35 -r1.36 src/usr.sbin/sysinst/Makefile.inc
(martin)
--- src/usr.sbin/sysinst/Makefile.inc 2020/05/18 21:19:36 1.35
+++ src/usr.sbin/sysinst/Makefile.inc 2020/10/30 18:47:38 1.36
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile.inc,v 1.35 2020/05/18 21:19:36 jmcneill Exp $ | 1 | # $NetBSD: Makefile.inc,v 1.36 2020/10/30 18:47:38 martin Exp $ | |
2 | # | 2 | # | |
3 | # Makefile for sysinst | 3 | # Makefile for sysinst | |
4 | 4 | |||
5 | .if exists(${.CURDIR}/../../../Makefile.inc) | 5 | .if exists(${.CURDIR}/../../../Makefile.inc) | |
6 | .include "${.CURDIR}/../../../Makefile.inc" | 6 | .include "${.CURDIR}/../../../Makefile.inc" | |
7 | .endif | 7 | .endif | |
8 | 8 | |||
9 | PROG= sysinst | 9 | PROG= sysinst | |
10 | MAN= sysinst.8 | 10 | MAN= sysinst.8 | |
11 | 11 | |||
12 | WARNS= 4 | 12 | WARNS= 4 | |
13 | 13 | |||
14 | SRCS+= menu_defs.c msg_defs.c main.c install.c upgrade.c \ | 14 | SRCS+= menu_defs.c msg_defs.c main.c install.c upgrade.c \ | |
@@ -66,26 +66,30 @@ UNIF_AWK= ${.CURDIR}/../../unif.awk | @@ -66,26 +66,30 @@ UNIF_AWK= ${.CURDIR}/../../unif.awk | |||
66 | MSG_XLAT_SH= ${.CURDIR}/../../msg_xlat.sh | 66 | MSG_XLAT_SH= ${.CURDIR}/../../msg_xlat.sh | |
67 | MSG_CMP_SH= ${.CURDIR}/../../msg_cmp.sh | 67 | MSG_CMP_SH= ${.CURDIR}/../../msg_cmp.sh | |
68 | 68 | |||
69 | SETS_TAR_SUFF=${"${USE_XZ_SETS:Uno}"!="no":?"tar.xz":"tgz"} | 69 | SETS_TAR_SUFF=${"${USE_XZ_SETS:Uno}"!="no":?"tar.xz":"tgz"} | |
70 | 70 | |||
71 | .if ${MKBSDTAR:Uno} == "no" | 71 | .if ${MKBSDTAR:Uno} == "no" | |
72 | CPPFLAGS+= -DUSING_PAXASTAR | 72 | CPPFLAGS+= -DUSING_PAXASTAR | |
73 | .endif | 73 | .endif | |
74 | 74 | |||
75 | .if ${MKDTB:Uno} != "no" | 75 | .if ${MKDTB:Uno} != "no" | |
76 | CPPFLAGS+= -DHAVE_DTB | 76 | CPPFLAGS+= -DHAVE_DTB | |
77 | .endif | 77 | .endif | |
78 | 78 | |||
79 | .if ${MKKMOD:Uno} != "no" | |||
80 | CPPFLAGS+= -DHAVE_MODULES | |||
81 | .endif | |||
82 | ||||
79 | CATALOGDIR= /usr/share/sysinst/catalog | 83 | CATALOGDIR= /usr/share/sysinst/catalog | |
80 | CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.CURDIR} \ | 84 | CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.CURDIR} \ | |
81 | -I${.CURDIR}/../../../../sbin/fsck \ | 85 | -I${.CURDIR}/../../../../sbin/fsck \ | |
82 | -DSETS_TAR_SUFF=${SETS_TAR_SUFF:Q} \ | 86 | -DSETS_TAR_SUFF=${SETS_TAR_SUFF:Q} \ | |
83 | -DREL=\"${DISTRIBVER}\" -DMACH=\"${MACHINE}\" \ | 87 | -DREL=\"${DISTRIBVER}\" -DMACH=\"${MACHINE}\" \ | |
84 | -DMACH_${MACHINE} -DARCH_${MACHINE_ARCH} \ | 88 | -DMACH_${MACHINE} -DARCH_${MACHINE_ARCH} \ | |
85 | ${NODISKLABEL:D-DNO_DISKLABEL} \ | 89 | ${NODISKLABEL:D-DNO_DISKLABEL} \ | |
86 | ${NOPARTMAN:D-DNO_PARTMAN} | 90 | ${NOPARTMAN:D-DNO_PARTMAN} | |
87 | 91 | |||
88 | .if ${RELEASEMACHINEDIR} != ${MACHINE} | 92 | .if ${RELEASEMACHINEDIR} != ${MACHINE} | |
89 | CPPFLAGS+= -DARCH_SUBDIR="\"${RELEASEMACHINEDIR}\"" | 93 | CPPFLAGS+= -DARCH_SUBDIR="\"${RELEASEMACHINEDIR}\"" | |
90 | CPPFLAGS+= -DPKG_ARCH_SUBDIR="\"${MACHINE_ARCH}\"" | 94 | CPPFLAGS+= -DPKG_ARCH_SUBDIR="\"${MACHINE_ARCH}\"" | |
91 | .endif | 95 | .endif |
--- src/usr.sbin/sysinst/defs.h 2020/10/13 17:26:28 1.67
+++ src/usr.sbin/sysinst/defs.h 2020/10/30 18:47:38 1.68
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: defs.h,v 1.67 2020/10/13 17:26:28 martin Exp $ */ | 1 | /* $NetBSD: defs.h,v 1.68 2020/10/30 18:47:38 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 Piermont Information Systems Inc. | 4 | * Copyright 1997 Piermont Information Systems Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -168,31 +168,36 @@ enum { | @@ -168,31 +168,36 @@ enum { | |||
168 | SET_DEBUG, | 168 | SET_DEBUG, | |
169 | SET_X11_DEBUG, | 169 | SET_X11_DEBUG, | |
170 | 170 | |||
171 | SET_LAST, | 171 | SET_LAST, | |
172 | SET_GROUP, /* Start of submenu */ | 172 | SET_GROUP, /* Start of submenu */ | |
173 | SET_GROUP_END, /* End of submenu */ | 173 | SET_GROUP_END, /* End of submenu */ | |
174 | SET_PKGSRC, /* pkgsrc, not counted as regular set */ | 174 | SET_PKGSRC, /* pkgsrc, not counted as regular set */ | |
175 | }; | 175 | }; | |
176 | 176 | |||
177 | /* Initialisers to select sets */ | 177 | /* Initialisers to select sets */ | |
178 | /* All kernels */ | 178 | /* All kernels */ | |
179 | #define SET_KERNEL SET_KERNEL_1, SET_KERNEL_2, SET_KERNEL_3, SET_KERNEL_4, \ | 179 | #define SET_KERNEL SET_KERNEL_1, SET_KERNEL_2, SET_KERNEL_3, SET_KERNEL_4, \ | |
180 | SET_KERNEL_5, SET_KERNEL_6, SET_KERNEL_7, SET_KERNEL_8 | 180 | SET_KERNEL_5, SET_KERNEL_6, SET_KERNEL_7, SET_KERNEL_8 | |
181 | #ifdef HAVE_MODULES | |||
182 | #define WITH_MODULES SET_MODULES, | |||
183 | #else | |||
184 | #define WITH_MODULES | |||
185 | #endif | |||
181 | /* Core system sets */ | 186 | /* Core system sets */ | |
182 | #ifdef HAVE_DTB | 187 | #ifdef HAVE_DTB | |
183 | #define SET_CORE SET_MODULES, SET_BASE, SET_DTB, SET_ETC | 188 | #define SET_CORE WITH_MODULES SET_BASE, SET_DTB, SET_ETC | |
184 | #else | 189 | #else | |
185 | #define SET_CORE SET_MODULES, SET_BASE, SET_ETC | 190 | #define SET_CORE WITH_MODULES SET_BASE, SET_ETC | |
186 | #endif | 191 | #endif | |
187 | /* All system sets */ | 192 | /* All system sets */ | |
188 | #define SET_SYSTEM SET_CORE, SET_COMPILER, SET_GAMES, \ | 193 | #define SET_SYSTEM SET_CORE, SET_COMPILER, SET_GAMES, \ | |
189 | SET_MAN_PAGES, SET_MISC, SET_RESCUE, \ | 194 | SET_MAN_PAGES, SET_MISC, SET_RESCUE, \ | |
190 | SET_TESTS, SET_TEXT_TOOLS | 195 | SET_TESTS, SET_TEXT_TOOLS | |
191 | /* All X11 sets */ | 196 | /* All X11 sets */ | |
192 | #define SET_X11_NOSERVERS SET_X11_BASE, SET_X11_FONTS, SET_X11_PROG, SET_X11_ETC | 197 | #define SET_X11_NOSERVERS SET_X11_BASE, SET_X11_FONTS, SET_X11_PROG, SET_X11_ETC | |
193 | #define SET_X11 SET_X11_NOSERVERS, SET_X11_SERVERS | 198 | #define SET_X11 SET_X11_NOSERVERS, SET_X11_SERVERS | |
194 | 199 | |||
195 | /* All machine dependent sets */ | 200 | /* All machine dependent sets */ | |
196 | #define SET_MD SET_MD_1, SET_MD_2, SET_MD_3, SET_MD_4 | 201 | #define SET_MD SET_MD_1, SET_MD_2, SET_MD_3, SET_MD_4 | |
197 | 202 | |||
198 | /* All source sets */ | 203 | /* All source sets */ |
--- src/usr.sbin/sysinst/util.c 2020/10/27 15:28:01 1.52
+++ src/usr.sbin/sysinst/util.c 2020/10/30 18:47:38 1.53
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: util.c,v 1.52 2020/10/27 15:28:01 martin Exp $ */ | 1 | /* $NetBSD: util.c,v 1.53 2020/10/30 18:47:38 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 Piermont Information Systems Inc. | 4 | * Copyright 1997 Piermont Information Systems Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -104,27 +104,29 @@ distinfo dist_list[] = { | @@ -104,27 +104,29 @@ distinfo dist_list[] = { | |||
104 | #ifdef SET_KERNEL_6_NAME | 104 | #ifdef SET_KERNEL_6_NAME | |
105 | {SET_KERNEL_6_NAME, SET_KERNEL_6, false, MSG_set_kernel_6, NULL}, | 105 | {SET_KERNEL_6_NAME, SET_KERNEL_6, false, MSG_set_kernel_6, NULL}, | |
106 | #endif | 106 | #endif | |
107 | #ifdef SET_KERNEL_7_NAME | 107 | #ifdef SET_KERNEL_7_NAME | |
108 | {SET_KERNEL_7_NAME, SET_KERNEL_7, false, MSG_set_kernel_7, NULL}, | 108 | {SET_KERNEL_7_NAME, SET_KERNEL_7, false, MSG_set_kernel_7, NULL}, | |
109 | #endif | 109 | #endif | |
110 | #ifdef SET_KERNEL_8_NAME | 110 | #ifdef SET_KERNEL_8_NAME | |
111 | {SET_KERNEL_8_NAME, SET_KERNEL_8, false, MSG_set_kernel_8, NULL}, | 111 | {SET_KERNEL_8_NAME, SET_KERNEL_8, false, MSG_set_kernel_8, NULL}, | |
112 | #endif | 112 | #endif | |
113 | #ifdef SET_KERNEL_9_NAME | 113 | #ifdef SET_KERNEL_9_NAME | |
114 | {SET_KERNEL_9_NAME, SET_KERNEL_9, false, MSG_set_kernel_9, NULL}, | 114 | {SET_KERNEL_9_NAME, SET_KERNEL_9, false, MSG_set_kernel_9, NULL}, | |
115 | #endif | 115 | #endif | |
116 | 116 | |||
117 | #ifdef HAVE_MODULES | |||
117 | {"modules", SET_MODULES, false, MSG_set_modules, NULL}, | 118 | {"modules", SET_MODULES, false, MSG_set_modules, NULL}, | |
119 | #endif | |||
118 | {"base", SET_BASE, false, MSG_set_base, NULL}, | 120 | {"base", SET_BASE, false, MSG_set_base, NULL}, | |
119 | #ifdef HAVE_DTB | 121 | #ifdef HAVE_DTB | |
120 | {"dtb", SET_DTB, false, MSG_set_dtb, NULL}, | 122 | {"dtb", SET_DTB, false, MSG_set_dtb, NULL}, | |
121 | #endif | 123 | #endif | |
122 | {"etc", SET_ETC, false, MSG_set_system, NULL}, | 124 | {"etc", SET_ETC, false, MSG_set_system, NULL}, | |
123 | {"comp", SET_COMPILER, false, MSG_set_compiler, NULL}, | 125 | {"comp", SET_COMPILER, false, MSG_set_compiler, NULL}, | |
124 | {"games", SET_GAMES, false, MSG_set_games, NULL}, | 126 | {"games", SET_GAMES, false, MSG_set_games, NULL}, | |
125 | {"man", SET_MAN_PAGES, false, MSG_set_man_pages, NULL}, | 127 | {"man", SET_MAN_PAGES, false, MSG_set_man_pages, NULL}, | |
126 | {"misc", SET_MISC, false, MSG_set_misc, NULL}, | 128 | {"misc", SET_MISC, false, MSG_set_misc, NULL}, | |
127 | {"rescue", SET_RESCUE, false, MSG_set_rescue, NULL}, | 129 | {"rescue", SET_RESCUE, false, MSG_set_rescue, NULL}, | |
128 | {"tests", SET_TESTS, false, MSG_set_tests, NULL}, | 130 | {"tests", SET_TESTS, false, MSG_set_tests, NULL}, | |
129 | {"text", SET_TEXT_TOOLS, false, MSG_set_text_tools, NULL}, | 131 | {"text", SET_TEXT_TOOLS, false, MSG_set_text_tools, NULL}, | |
130 | 132 |