diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-03-26 16:18:03 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-03-26 16:18:03 +0200 |
commit | d8eaaeb3c12ea4c30243bc6598a55442156f8e00 (patch) | |
tree | 402a3e7b9657bd0dc2b8d347bc2339a80915e6b2 | |
parent | 864db5fdec4230e524b19f1f01b8c8b499458d66 (diff) | |
download | perl-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-x | cflags.SH | 53 |
1 files changed, 7 insertions, 46 deletions
@@ -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 |