summaryrefslogtreecommitdiff
path: root/x2p
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-05-15 17:14:50 +0200
committerNicholas Clark <nick@ccl4.org>2013-05-20 21:50:45 +0200
commitc0d271fb2cf4e67f892e8f1b575439d13b73a01f (patch)
tree2ca8f5aff0f24a05c036fe19c8e5022ecd5ce260 /x2p
parent3ae7e562a2ff05c27052670c20b7ba3b7005bf7b (diff)
downloadperl-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.
Diffstat (limited to 'x2p')
-rwxr-xr-xx2p/Makefile.SH8
-rwxr-xr-xx2p/cflags.SH104
2 files changed, 4 insertions, 108 deletions
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