summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMakefile.SH16
-rwxr-xr-xcflags.SH15
2 files changed, 17 insertions, 14 deletions
diff --git a/Makefile.SH b/Makefile.SH
index 2f7668d3d4..98b9ae210e 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -409,9 +409,9 @@ case $CROSS_NAME in
## In the following dollars and backticks do not need the extra backslash.
$spitshell >>$Makefile <<'!NO!SUBS!'
-CCCMD = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $@`
+CCCMD = sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $@
-CCCMDSRC = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $<`
+CCCMDSRC = sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $<
CONFIGPM_FROM_CONFIG_SH = lib/Config.pm lib/Config_heavy.pl
CONFIGPM = $(CONFIGPM_FROM_CONFIG_SH) lib/Config_git.pl
@@ -566,13 +566,16 @@ splintflags = \
splintfiles = $(c1)
.c$(OBJ_EXT):
- $(CCCMD) $(PLDLFLAGS) $*.c
+ @echo `$(CCCMD)` $(PLDLFLAGS) $*.c
+ @`$(CCCMD)` $(PLDLFLAGS) $*.c
.c.i:
- $(CCCMDSRC) -E $*.c > $*.i
+ @echo `$(CCCMDSRC)` -E $*.c \> $*.i
+ @`$(CCCMDSRC)` -E $*.c > $*.i
.c.s:
- $(CCCMDSRC) -S $*.c
+ @echo `$(CCCMDSRC)` -S $*.c
+ @`$(CCCMDSRC)` -S $*.c
all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
@echo " ";
@@ -666,7 +669,8 @@ ${file}mini.c: $file.c
$spitshell >>$Makefile <<!GROK!THIS!
${file}mini\$(OBJ_EXT): ${file}mini.c
- \$(CCCMD) \$(PLDLFLAGS) $DPERL_IS_MINIPERL $DPERL_EXTERNAL_GLOB ${file}mini.c
+ echo @\`\$(CCCMD)\` \$(PLDLFLAGS) $DPERL_IS_MINIPERL $DPERL_EXTERNAL_GLOB ${file}mini.c
+ @\`\$(CCCMD)\` \$(PLDLFLAGS) $DPERL_IS_MINIPERL $DPERL_EXTERNAL_GLOB ${file}mini.c
!GROK!THIS!
done
diff --git a/cflags.SH b/cflags.SH
index cd6697c6b0..54ce74c995 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -254,8 +254,13 @@ case $PERL_CONFIG_SH in
;;
esac
-# syntax: cflags [optimize=XXX] [file[.suffix]]
-# displays the compiler command line for file
+# syntax: cflags [optimize=XXX] [file[.suffix]] ...
+# displays the proposed compiler command line for each 'file'
+#
+# with no file, dispalys it for all *.c files.
+# The optimise=XXX arg (if present) is evalled, setting the default
+# value of the $optimise variable, which is output on the command line
+# (but which may be overridden for specific files below)
case "X$1" in
Xoptimize=*|X"optimize=*")
@@ -264,11 +269,6 @@ Xoptimize=*|X"optimize=*")
;;
esac
-also=': '
-case $# in
-1) also='echo 1>&2 " CCCMD = "'
-esac
-
case $# in
0) set *.c; echo "The current C flags are:" ;;
esac
@@ -358,7 +358,6 @@ for file do
# Can we perhaps use $ansi2knr here
echo "$cc -c -DPERL_CORE $ccflags $stdflags $optimize $warn $extra"
- eval "$also "'"$cc -DPERL_CORE -c $ccflags $stdflags $optimize $warn $extra"'
. $TOP/config.sh