Introduce CONTENTS variable into Makefiles to list the contents of the directory, excluding the Makefile for to Make life easier

This commit is contained in:
Roy Marples 2007-11-20 17:37:15 +00:00
parent 18acf0803c
commit 9635b455c7
11 changed files with 18 additions and 19 deletions

View File

@ -1,5 +1,5 @@
DIR = /etc/conf.d DIR = /etc/conf.d
CONF = localmount moused net.example powerd syscons CONF = $(CONTENTS)
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -1,6 +1,5 @@
DIR = /etc/conf.d DIR = /etc/conf.d
CONF = bootmisc checkfs clock env_whitelist hostname local.start local.stop \ CONF = $(CONTENTS)
net rc urandom
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -11,6 +11,11 @@ _OS_SH = u=`uname -s`; case "$${u}" in *BSD|DragonFly) echo "BSD";; *) echo "$${
_OS != $(_OS_SH) _OS != $(_OS_SH)
OS ?= $(_OS)$(shell $(_OS_SH)) OS ?= $(_OS)$(shell $(_OS_SH))
# We store the contents of the directory for ease of use in Makefiles
_CONTENTS_SH = ls -1 | grep -v Makefile | xargs
_CONTENTS != $(_CONTENTS_SH)
CONTENTS = $(_CONTENTS)$(shell $(_CONTENTS_SH))
# Recursive rules # Recursive rules
# Adapted from FreeBSDs bsd.subdir.mk # Adapted from FreeBSDs bsd.subdir.mk
ECHODIR ?= true ECHODIR ?= true

View File

@ -1,5 +1,5 @@
DIR = /etc/init.d DIR = /etc/init.d
BIN = clock ipfw moused powerd rarpd rpcbind syscons sysctl syslogd BIN = $(CONTENTS)
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -1,5 +1,5 @@
DIR = /etc/init.d DIR = /etc/init.d
BIN = clock consolefont keymaps modules numlock sysctl BIN = $(CONTENTS)
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -1,6 +1,5 @@
DIR = /etc/init.d DIR = /etc/init.d
BIN = bootmisc checkfs checkroot hostname local localmount \ BIN = $(CONTENTS)
netmount rmnologin urandom halt.sh
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -1,5 +1,5 @@
DIR = $(RC_LIB)/net DIR = $(RC_LIB)/net
CONF = ifconfig.sh iwconfig.sh CONF = $(CONTENTS)
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -1,8 +1,5 @@
DIR = $(RC_LIB)/net DIR = $(RC_LIB)/net
CONF = adsl.sh apipa.sh arping.sh bonding.sh br2684ctl.sh bridge.sh \ CONF = $(CONTENTS)
ccwgroup.sh clip.sh ifconfig.sh ifplugd.sh ip6to4.sh ipppd.sh \
iproute2.sh iwconfig.sh netplugd.sh pppd.sh pump.sh tuntap.sh \
udhcpc.sh vlan.sh
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -1,6 +1,5 @@
DIR = $(RC_LIB)/net DIR = $(RC_LIB)/net
CONF = dhclient.sh dhcpcd.sh macchanger.sh macnet.sh ssidnet.sh system.sh \ CONF = $(CONTENTS)
wpa_supplicant.sh
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -1,5 +1,5 @@
DIR = $(RC_LIB)/sh DIR = $(RC_LIB)/sh
BIN = init.sh BIN = $(CONTENTS)
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk

View File

@ -1,5 +1,5 @@
DIR = $(RC_LIB)/sh DIR = $(RC_LIB)/sh
BIN = init.sh init-early.sh BIN = $(CONTENTS)
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/default.mk include $(TOPDIR)/default.mk