X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/e15451872271610da58ca6e6d720c75ab4524f41..1f3ffe4c6058f20e1f7d746ababdd669651e8d2b:/Makefile.SH diff --git a/Makefile.SH b/Makefile.SH index 3559262..a18dff0 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -1,7 +1,7 @@ #!/bin/sh # quote() - Creates a shell literal -# Usage: echo "...$( quote "..." )..." +# Usage: echo "...` quote "..." `..." quote() { case "$1" in '') echo "''" ;; @@ -37,6 +37,7 @@ case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac +pwd="`pwd`" linklibperl='$(LIBPERL)' linklibperl_nonshr='' shrpldflags='$(LDDLFLAGS)' @@ -48,8 +49,8 @@ true) # Prefix all runs of 'miniperl' and 'perl' with # $ldlibpth so that ./perl finds *this* shared libperl. case "$LD_LIBRARY_PATH" in - '') ldlibpth="LD_LIBRARY_PATH=$( quote "`pwd`" )" ;; - *) ldlibpth="LD_LIBRARY_PATH=$( quote "`pwd`" ):$( quote "$LD_LIBRARY_PATH" )" ;; + '') ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `" ;; + *) ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `:` quote "$LD_LIBRARY_PATH" `" ;; esac pldlflags="$cccdlflags" @@ -131,8 +132,8 @@ true) eval "ldlibpthval=\"\$$ldlibpthname\"" case "$ldlibpthval" in - '') ldlibpth="$ldlibpthname=$( quote "`pwd`" )" ;; - *) ldlibpth="$ldlibpthname=$( quote "`pwd`" ):$( quote "$ldlibpthval" )" ;; + '') ldlibpth="$ldlibpthname=` quote "$pwd" `" ;; + *) ldlibpth="$ldlibpthname=` quote "$pwd" `:` quote "$ldlibpthval" `" ;; esac ;; @@ -305,7 +306,7 @@ RUN = $run # These variables may need to be manually set for non-Unix systems. AR = $full_ar -HOST_EXE_EXT = +HOST_EXE_EXT = $_exe EXE_EXT = $_exe LIB_EXT = $_a OBJ_EXT = $_o @@ -442,16 +443,27 @@ xconfig.h: config_h.SH Cross/config-\$(CROSS_NAME).sh ;; esac +SH_to_target() { + echo $@ | sed -e s/\\\.SH//g -e s/_/./g +} + +SH='Makefile.SH cflags.SH config_h.SH makedepend.SH myconfig.SH runtests.SH pod/Makefile.SH x2p/Makefile.SH' +shextract=`SH_to_target $SH` + ## In the following dollars and backticks do not need the extra backslash. -$spitshell >>$Makefile <<'!NO!SUBS!' +$spitshell >>$Makefile <>$Makefile <<'!NO!SUBS!' addedbyconf = UU $(shextract) pstruct @@ -465,7 +477,7 @@ unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \ unidatadirs = lib/unicore/To lib/unicore/lib h1 = EXTERN.h INTERN.h XSUB.h av.h $(CONFIGH) cop.h cv.h dosish.h -h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h opcode.h +h2 = embed.h form.h gv.h handy.h hv.h hv_func.h keywords.h mg.h op.h opcode.h h3 = pad.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h h5 = utf8.h warnings.h mydtrace.h op_reg_common.h l1_char_class_tab.h @@ -491,7 +503,7 @@ mini_obj = $(minindt_obj) $(MINIDTRACE_O) ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS) obj = $(ndt_obj) $(DTRACE_O) -perltoc_pod_prereqs = extra.pods pod/perl5179delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod +perltoc_pod_prereqs = extra.pods pod/perl5191delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs) generated_headers = uudmap.h bitcount.h mg_data.h @@ -588,18 +600,21 @@ perl$(OBJ_EXT): git_version.h case "$usedl$static_cwd" in defineundef) util_deps='$(MINIPERL_EXE) $(CONFIGPM) lib/auto/Cwd/Cwd$(DLSUFFIX) FORCE' - x2p_deps='$(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) FORCE' + x2p_deps="\$(MINIPERL_EXE) \$(CONFIGPM) \$(dynamic_ext) x2p/$firstmakefile FORCE" ;; definedefine) util_deps='$(PERL_EXE) $(CONFIGPM) FORCE' - x2p_deps='$(PERL_EXE) $(CONFIGPM) $(dynamic_ext) FORCE' + x2p_deps="\$(PERL_EXE) \$(CONFIGPM) \$(dynamic_ext) x2p/$firstmakefile FORCE" ;; *) util_deps='$(PERL_EXE) $(CONFIGPM) FORCE' - x2p_deps='$(PERL_EXE) $(CONFIGPM) FORCE' + x2p_deps="\$(PERL_EXE) \$(CONFIGPM) x2p/$firstmakefile FORCE" ;; esac $spitshell >>$Makefile <>$Makefile <>$Makefile <<'!NO!SUBS!' -runtests: runtests.SH config.sh - sh ./runtests.SH +.PHONY: depend +depend: makedepend + sh ./makedepend MAKE=$(MAKE) cflags .PHONY: test check test_prep test_prep_nodll test_prep_pre \ test_prep_reonly test_tty test-tty test_notty test-notty \ @@ -1576,7 +1591,7 @@ noknack: utilities nokfilenack: utilities $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A -.PHONY: clist hlist shlist +.PHONY: clist hlist clist: $(c) echo $(c) | tr ' ' $(TRNL) >.clist @@ -1584,12 +1599,6 @@ clist: $(c) hlist: $(h) echo $(h) | tr ' ' $(TRNL) >.hlist -shlist: $(sh) - echo $(sh) | tr ' ' $(TRNL) >.shlist - -Makefile: Makefile.SH ./config.sh - $(SHELL) Makefile.SH - .PHONY: distcheck distcheck: FORCE perl '-MExtUtils::Manifest=&fullcheck' -e 'fullcheck()' @@ -1604,12 +1613,6 @@ ctags: !NO!SUBS! $eunicefix Makefile -case `pwd` in -*SH) - $rm -f ../Makefile - $ln Makefile ../Makefile - ;; -esac $rm -f $firstmakefile # Now do any special processing required before building.