diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-08-16 23:12:13 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-08-16 23:15:24 +0200 |
commit | 6cdadb5aa5805fffe20e051d971d99180e51c13d (patch) | |
tree | dd23d82fcb5bccd735a73e7719ec331c44b85b86 /Makefile.SH | |
parent | aa9e98059261a447f86c7380d500bd35eb00579e (diff) | |
download | perl-6cdadb5aa5805fffe20e051d971d99180e51c13d.tar.gz |
Only copy op.c to opmini.c if op.c is a symlink, else use a symlink.
Similarly for perl.c to perlmini.c
This avoids the work of a file copy if a symlink would do the job, but ensures
that we don't create a symlink to a symlink to a file, which (comments suggest)
upsets gcc.
Diffstat (limited to 'Makefile.SH')
-rw-r--r-- | Makefile.SH | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Makefile.SH b/Makefile.SH index e90b51f647..51529f40d4 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -586,18 +586,30 @@ utilities: $(MINIPERL_EXE) $(CONFIGPM) $(plextract) FORCE .PHONY: FORCE FORCE: @sh -c true - -# We do a copy of the op.c instead of a symlink because gcc gets huffy -# if we have a symlink forest to another disk (it complains about too many -# levels of symbolic links, even if we have only two) !NO!SUBS! for file in op perl; do - $spitshell >>$Makefile <<!GROK!THIS! + if $issymlink $file.c; then + $spitshell >>$Makefile <<!GROK!THIS! + +# We do a copy of the $file.c instead of a symlink because gcc gets huffy +# if we have a symlink forest to another disk (it complains about too many +# levels of symbolic links, even if we have only two) ${file}mini.c: $file.c \$(RMS) ${file}mini.c \$(CPS) ${file}.c ${file}mini.c +!GROK!THIS! + else + $spitshell >>$Makefile <<!GROK!THIS! + +${file}mini.c: $file.c + \$(RMS) ${file}mini.c + \$(LNS) ${file}.c ${file}mini.c +!GROK!THIS! + fi + + $spitshell >>$Makefile <<!GROK!THIS! ${file}mini\$(OBJ_EXT): ${file}mini.c \$(CCCMD) \$(PLDLFLAGS) $DPERL_IS_MINIPERL $DPERL_EXTERNAL_GLOB ${file}mini.c |