aboutsummaryrefslogtreecommitdiff
path: root/default.mk
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-20 17:37:15 +0000
committerRoy Marples <roy@marples.name>2007-11-20 17:37:15 +0000
commit9635b455c7ba6d5a7e196ac8776fc28c6f1e03e4 (patch)
treeeb58ecc87b35a3d27c94e19c7a01c51798cdc68f /default.mk
parent18acf0803c49e5921cac4b065d5962a51df89231 (diff)
Introduce CONTENTS variable into Makefiles to list the contents of the directory, excluding the Makefile for to Make life easier
Diffstat (limited to 'default.mk')
-rw-r--r--default.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/default.mk b/default.mk
index 6ec11c31..661e4477 100644
--- a/default.mk
+++ b/default.mk
@@ -11,6 +11,11 @@ _OS_SH = u=`uname -s`; case "$${u}" in *BSD|DragonFly) echo "BSD";; *) echo "$${
_OS != $(_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
# Adapted from FreeBSDs bsd.subdir.mk
ECHODIR ?= true