diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-05-15 17:14:50 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-05-20 21:50:45 +0200 |
commit | c0d271fb2cf4e67f892e8f1b575439d13b73a01f (patch) | |
tree | 2ca8f5aff0f24a05c036fe19c8e5022ecd5ce260 | |
parent | 3ae7e562a2ff05c27052670c20b7ba3b7005bf7b (diff) | |
download | perl-c0d271fb2cf4e67f892e8f1b575439d13b73a01f.tar.gz |
Eliminate x2p/cflags.SH. x2p's Makefile can use ../cflags
x2p/Makefile is only used on *nix, so this should not present a problem.
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | Porting/exec-bit.txt | 1 | ||||
-rwxr-xr-x | x2p/Makefile.SH | 8 | ||||
-rwxr-xr-x | x2p/cflags.SH | 104 |
4 files changed, 4 insertions, 110 deletions
@@ -5493,7 +5493,6 @@ x2p/a2p.h Global declarations x2p/a2p.pod Pod for awk to perl translator x2p/a2p.y A yacc grammar for awk x2p/a2py.c Awk compiler, sort of -x2p/cflags.SH A script that emits C compilation flags per file x2p/EXTERN.h Same as above x2p/find2perl.PL A find to perl translator x2p/hash.c Hashes again diff --git a/Porting/exec-bit.txt b/Porting/exec-bit.txt index e2f445b095..0073e77cb6 100644 --- a/Porting/exec-bit.txt +++ b/Porting/exec-bit.txt @@ -27,7 +27,6 @@ runtests.SH t/TEST vms/ext/filespec.t x2p/Makefile.SH -x2p/cflags.SH Porting/Maintainers.pl Porting/add-package.pl Porting/bisect.pl diff --git a/x2p/Makefile.SH b/x2p/Makefile.SH index e5a3c94d8b..5edc9d6c33 100755 --- a/x2p/Makefile.SH +++ b/x2p/Makefile.SH @@ -77,7 +77,7 @@ PERL = $perl cat >>Makefile <<'!NO!SUBS!' REALPERL = ../perl -CCCMD = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $@` +CCCMD = `sh $(shellflags) ../cflags "optimize='$(OPTIMIZE)'" $@` public = a2p$(EXE_EXT) s2p find2perl @@ -87,8 +87,8 @@ manpages = a2p.man s2p.man util = -sh = Makefile.SH cflags.SH -shextract = Makefile cflags +sh = Makefile.SH +shextract = Makefile pl = find2perl.PL s2p.PL plextract = find2perl s2p @@ -170,7 +170,7 @@ lint: lint $(lintflags) $(defs) $(c) > a2p.fuzz depend: ../makedepend - sh ../makedepend MAKE=$(MAKE) cflags + sh ../makedepend MAKE=$(MAKE) ../cflags clist: echo $(c) | tr ' ' $(TRNL) >.clist diff --git a/x2p/cflags.SH b/x2p/cflags.SH deleted file mode 100755 index caeb336632..0000000000 --- a/x2p/cflags.SH +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh - -case $PERL_CONFIG_SH in -'') - if test -f config.sh; then TOP=.; - elif test -f ../config.sh; then TOP=..; - elif test -f ../../config.sh; then TOP=../..; - elif test -f ../../../config.sh; then TOP=../../..; - elif test -f ../../../../config.sh; then TOP=../../../..; - else - echo "Can't find config.sh."; exit 1 - fi - . $TOP/config.sh - ;; -esac -: This forces SH files to create target in same directory as SH file. -: This is so that make depend always knows where to find SH derivatives. -case "$0" in -*/cflags.SH) cd `expr X$0 : 'X\(.*\)/'` ;; -cflags.SH) ;; -*) case `pwd` in - */x2p) ;; - *) if test -d x2p; then cd x2p - else echo "Can't figure out where to write output."; exit 1 - fi;; - esac;; -esac -echo "Extracting x2p/cflags (with variable substitutions)" -: This section of the file will have variable substitutions done on it. -: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. -: Protect any dollar signs and backticks that you do not want interpreted -: by putting a backslash in front. You may delete these comments. -rm -f cflags -$spitshell >cflags <<!GROK!THIS! -!GROK!THIS! - -: In the following dollars and backticks do not need the extra backslash. -$spitshell >>cflags <<'!NO!SUBS!' -case $PERL_CONFIG_SH in -'') - if test -f config.sh; then TOP=.; - elif test -f ../config.sh; then TOP=..; - elif test -f ../../config.sh; then TOP=../..; - elif test -f ../../../config.sh; then TOP=../../..; - elif test -f ../../../../config.sh; then TOP=../../../..; - else - echo "Can't find config.sh."; exit 1 - fi - . $TOP/config.sh - ;; -esac - -case "X$1" in -Xoptimize=*|X"optimize=*") - eval "$1" - shift - ;; -esac - -also=': ' -case $# in -1) also='echo 1>&2 " CCCMD = "' -esac - -case $# in -0) set *.c; echo "The current C flags are:" ;; -esac - -set `echo "$* " | sed -e 's/\.[oc] / /g' -e 's/\.obj / /g' -e "s/\\$obj_ext / /g"` - -for file do - - case "$#" in - 1) ;; - *) echo $n " $file.c $c" ;; - esac - - : allow variables like str_cflags to be evaluated - - eval 'eval ${'"${file}_cflags"'-""}' - - : or customize here - - case "$file" in - a2p) ;; - a2py) ;; - hash) ;; - str) ;; - util) ;; - walk) ;; - *) ;; - esac - - ccflags="`echo $ccflags | sed -e 's/-DMULTIPLICITY//'`" - - echo "$cc -c $ccflags $optimize" - eval "$also "'"$cc -c $ccflags $optimize"' - - . $TOP/config.sh - -done -!NO!SUBS! -chmod 755 cflags -$eunicefix cflags |