From 46fcb04d3624de978915ef0ccf57716ef208f735 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Tue, 26 Feb 2013 16:49:27 +0100 Subject: [PATCH] Simplification in drivers/ramdisk Periods are allowed in Make variable names, which let us simplify a bit the Makefile. Based on a proposition by Antoine LECA Change-Id: I759d7dc7721905a4775e8ab28e0371e48a443f25 --- drivers/ramdisk/Makefile | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/ramdisk/Makefile b/drivers/ramdisk/Makefile index 352f52929..808885208 100644 --- a/drivers/ramdisk/Makefile +++ b/drivers/ramdisk/Makefile @@ -31,8 +31,10 @@ PROTO_FILES= proto.common.etc proto.common.dynamic proto.dev PROG_DRIVERS= PROG_COMMANDS= mount fsck.mfs sh service PROG_SERVERS= mfs -PROG_USRSBIN= PROG_BIN= +PROG_SBIN= +PROG_USR.BIN= +PROG_USR.SBIN= .if ${MACHINE_ARCH} == "i386" ETC+= rs.single @@ -40,7 +42,7 @@ EXTRA+= PROG_DRIVERS+= at_wini floppy pci PROG_COMMANDS+= cdprobe loadramdisk sysenv PROG_SERVERS+= procfs -PROG_USRSBIN+= pwd_mkdb +PROG_USR.SBIN+= pwd_mkdb .if ${MKSMALL} != "yes" RAMDISK_SMALL= 1 @@ -69,8 +71,10 @@ PROG_LIBEXEC+= ld.elf_so PROG_LIBS+= libc libminlib libcompat_minix libterminfo .endif -PROGRAMS=${PROG_DRIVERS} ${PROG_COMMANDS} ${PROG_SERVERS} \ - ${PROG_USRSBIN} ${PROG_BIN} ${PROG_LIBEXEC} +PROGRAMS=${PROG_COMMANDS} \ + ${PROG_BIN} ${PROG_SBIN} ${PROG_USR.BIN} ${PROG_USR.SBIN} \ + ${PROG_DRIVERS} ${PROG_SERVERS} \ + ${PROG_LIBEXEC} CPPFLAGS+= -I${NETBSDSRCDIR}/servers @@ -125,7 +129,7 @@ ${PROGROOT}/lib/${lib}/${lib}.so.0: # Generate dependencies rules for binaries dir.sh:= ash -.for srcdir in bin commands drivers libexec servers +.for srcdir in bin sbin commands drivers libexec servers usr.bin usr.sbin .for prog in ${PROG_${srcdir:tu}} ${prog}: ${PROGROOT}/${srcdir}/${dir.${prog}:U${prog}}/${prog} ${INSTALL} $> $@ @@ -135,16 +139,6 @@ ${PROGROOT}/${srcdir}/${dir.${prog}:U${prog}}/${prog}: .endfor # prog .endfor # srcdir -# We have to do this as a separate loop, because USR.SBIN is not a valid -# make variable name. -.for prog in ${PROG_USRSBIN} -${prog}: ${PROGROOT}/usr.sbin/${dir.${prog}:U${prog}}/${prog} - ${INSTALL} $> $@ - -${PROGROOT}/usr.sbin/${dir.${prog}:U${prog}}/${prog}: - ${MAKE} -C ${NETBSDSRCDIR}/usr.sbin/${dir.${prog}:U${prog}} all -.endfor - image: proto.gen ${ETC} ${EXTRA} pwd.db spwd.db passwd ${_MKMSG_CREATE} "Generating ramdisk image" ${TOOL_MKFSMFS} image proto.gen || { rm -f image; false; } -- 2.44.0