summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-03-26 16:18:03 +0200
committerNicholas Clark <nick@ccl4.org>2012-03-26 16:18:03 +0200
commitd8eaaeb3c12ea4c30243bc6598a55442156f8e00 (patch)
tree402a3e7b9657bd0dc2b8d347bc2339a80915e6b2
parent864db5fdec4230e524b19f1f01b8c8b499458d66 (diff)
downloadperl-smoke-me/cflags.tar.gz
In cflags generate a case statement of file basenames by parsing MANIFEST.smoke-me/cflags
Previously cflags.SH contained a somewhat stale pre-canned list of file basenames including removed files such as usersub (deleted before 5.000 shipped), and a partial list of 5.000 XS extensions. Parsing MANIFEST to get the names of the top level C files minimised the maintenance needed to keep the case statement current.
-rwxr-xr-xcflags.SH53
1 files changed, 7 insertions, 46 deletions
diff --git a/cflags.SH b/cflags.SH
index f57cf2fc3e..ec1eedf93a 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -273,53 +273,14 @@ for file do
: or customize here
case "$file" in
- DB_File) ;;
- GDBM_File) ;;
- NDBM_File) ;;
- ODBM_File) ;;
- POSIX) ;;
- SDBM_File) ;;
- av) ;;
- byterun) ;;
- deb) ;;
- dl) ;;
- doio) ;;
- doop) ;;
- dump) ;;
- globals) ;;
- gv) ;;
- hv) ;;
- locale) ;;
- madly) ;;
- main) ;;
- malloc) ;;
- mg) ;;
- miniperlmain) ;;
- numeric) ;;
- op) ;;
- opmini) ;;
- pad) ;;
- perl) ;;
- perlapi) ;;
perlmain) ;;
- perly) ;;
- pp) ;;
- pp_ctl) ;;
- pp_hot) ;;
- pp_pack) ;;
- pp_sort) ;;
- pp_sys) ;;
- regcomp) ;;
- regexec) ;;
- run) ;;
- scope) ;;
- sv) ;;
- taint) ;;
- toke) ;;
- universal) ;;
- usersub) ;;
- utf8) ;;
- util) ;;
+ opmini) ;;
+ perlmini) ;;
+!NO!SUBS!
+
+ $awk '{if ($1 ~ /^([a-z]+)\.c$/) print " " $1;}' MANIFEST | $sed -e 's/\.c/\) ;;/' >>cflags
+
+$spitshell >>cflags <<'!NO!SUBS!'
*) ;;
esac