summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/Makefile
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-02-28 20:29:43 +0000
committerjhb <jhb@FreeBSD.org>2006-02-28 20:29:43 +0000
commit0aeeea8f00e36e75986095f9a9129081094ab8b2 (patch)
tree93c019b1413ec559e921369c9a6815b62bf56d9f /usr.sbin/sysinstall/Makefile
parentf4fef487daf4c65e5dc2847f7578cca52412accc (diff)
downloadFreeBSD-src-0aeeea8f00e36e75986095f9a9129081094ab8b2.zip
FreeBSD-src-0aeeea8f00e36e75986095f9a9129081094ab8b2.tar.gz
- Autogenerate a menu containing a list of countries and keymaps supported
by syscons. - If we are running as init, popup the country menu before the main menu. If a non-default country is chosen, then a second menu is brought up to let the user choose a keymap. By default the default keymap for the country that was selected is highlighted. If the user chooses the default country, then the default keymap is just assumed and the user is not presented with the keymap menu. Currently the default country is set to "United States" except for PC98 which assumes "Japan". PR: bin/93853 Submitted by: Seth Kingsley sethk at magnesium dot net MFC after: 3 days
Diffstat (limited to 'usr.sbin/sysinstall/Makefile')
-rw-r--r--usr.sbin/sysinstall/Makefile25
1 files changed, 23 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/Makefile b/usr.sbin/sysinstall/Makefile
index 77d8518..5ce9b34 100644
--- a/usr.sbin/sysinstall/Makefile
+++ b/usr.sbin/sysinstall/Makefile
@@ -12,7 +12,7 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c \
label.c main.c makedevs.c media.c menus.c misc.c modules.c \
mouse.c msg.c network.c nfs.c options.c package.c \
system.c tape.c tcpip.c termcap.c ttys.c ufs.c user.c \
- variable.c ${_wizard} keymap.h
+ variable.c ${_wizard} keymap.h countries.h
CFLAGS+= -DUSE_GZIP=1
.if ${MACHINE} == "pc98"
@@ -24,7 +24,7 @@ DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO}
LDADD= -ldialog -lncurses -lutil -ldisk -lftpio
CLEANFILES= makedevs.c rtermcap
-CLEANFILES+= keymap.tmp keymap.h
+CLEANFILES+= keymap.tmp keymap.h countries.tmp countries.h
.if exists(${.CURDIR}/../../share/termcap/termcap.src)
RTERMCAP= TERMCAP=${.CURDIR}/../../share/termcap/termcap.src ./rtermcap
@@ -99,4 +99,25 @@ keymap.h:
( echo " { 0 }"; echo "};" ; echo "" ) >> keymap.tmp
mv keymap.tmp keymap.h
+countries.h: ${.CURDIR}/../../share/misc/iso3166
+ rm -f countries.tmp
+ awk 'BEGIN { \
+ FS = "\t"; \
+ num = 1; \
+ print "DMenu MenuCountry = {"; \
+ print " DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,"; \
+ print " \"Country Selection\","; \
+ print " \"Please choose a country, region, or group.\\n\""; \
+ print " \"Select an item using [SPACE] or [ENTER].\","; \
+ printf " NULL,\n NULL,\n { "; \
+ } \
+ /^[[:space:]]*#/ {next;} \
+ {if (num > 1) {printf " ";} \
+ print "{ \"" num "\", \"" $$4 "\"" \
+ ", dmenuVarCheck, dmenuSetCountryVariable" \
+ ", NULL, VAR_COUNTRY \"=" tolower($$1) "\" },"; \
+ ++num;} \
+ END {print " { NULL } }\n};\n";}' < ${.ALLSRC} > countries.tmp
+ mv countries.tmp ${.TARGET}
+
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud