You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

285 lines
11 KiB

  1. --- a/Makefile.SH 2017-10-17 11:59:52.938763142 -0600
  2. +++ b/Makefile.SH 2017-10-17 12:13:46.202555604 -0600
  3. @@ -275,6 +275,7 @@ LNS = $lns
  4. # NOTE: some systems don't grok "cp -f". XXX Configure test needed?
  5. CPS = $cp
  6. RMS = rm -f
  7. +RMS_R = rm -rf
  8. ranlib = $ranlib
  9. # The following are mentioned only to make metaconfig include the
  10. @@ -736,7 +737,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
  11. ./generate_uudmap$(HOST_EXE_EXT) $(generated_headers)
  12. generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
  13. - -@rm generate_uudmap$(HOST_EXE_EXT)
  14. + @$(RMS) generate_uudmap$(HOST_EXE_EXT)
  15. $(LNS) $(HOST_GENERATE) generate_uudmap$(HOST_EXE_EXT)
  16. !NO!SUBS!
  17. @@ -876,26 +877,26 @@ mydtrace.h: $(DTRACE_H)
  18. define)
  19. $spitshell >>$Makefile <<'!NO!SUBS!'
  20. $(DTRACE_MINI_O): perldtrace.d $(miniperl_objs_nodt)
  21. - -rm -rf mpdtrace
  22. + $(RMS_R) mpdtrace
  23. mkdir mpdtrace
  24. cp $(miniperl_objs_nodt) mpdtrace/
  25. $(DTRACE) -G -s perldtrace.d -o $(DTRACE_MINI_O) $(miniperl_dtrace_objs)
  26. $(DTRACE_PERLLIB_O): perldtrace.d $(perllib_objs_nodt)
  27. - -rm -rf libpdtrace
  28. + $(RMS_R) libpdtrace
  29. mkdir libpdtrace
  30. cp $(perllib_objs_nodt) libpdtrace/
  31. $(DTRACE) -G -s perldtrace.d -o $(DTRACE_PERLLIB_O) $(perllib_dtrace_objs)
  32. $(DTRACE_MAIN_O): perldtrace.d perlmain$(OBJ_EXT)
  33. - -rm -rf maindtrace
  34. + $(RMS_R) maindtrace
  35. mkdir maindtrace
  36. cp perlmain$(OBJ_EXT) maindtrace/
  37. $(DTRACE) -G -s perldtrace.d -o $(DTRACE_MAIN_O) $(perlmain_dtrace_objs) || \
  38. ( $(ECHO) "No probes in perlmain$(OBJ_EXT), generating a dummy $(DTRACE_MAIN_O)" && \
  39. $(ECHO) >dtrace_main.c && \
  40. `$(CCCMD)` $(PLDLFLAGS) dtrace_main.c && \
  41. - rm -f dtrace_main.c )
  42. + $(RMS) dtrace_main.c )
  43. !NO!SUBS!
  44. ;;
  45. @@ -906,13 +907,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
  46. case "$useshrplib" in
  47. true)
  48. $spitshell >>$Makefile <<'!NO!SUBS!'
  49. - rm -f $@
  50. + $(RMS) $@
  51. $(LD) -o $@ $(SHRPLDFLAGS) $(perllib_objs) $(DYNALOADER) $(libs)
  52. !NO!SUBS!
  53. case "$osname" in
  54. aix)
  55. $spitshell >>$Makefile <<'!NO!SUBS!'
  56. - rm -f libperl$(OBJ_EXT)
  57. + $(RMS) libperl$(OBJ_EXT)
  58. mv $@ libperl$(OBJ_EXT)
  59. $(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
  60. !NO!SUBS!
  61. @@ -921,7 +922,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
  62. ;;
  63. *)
  64. $spitshell >>$Makefile <<'!NO!SUBS!'
  65. - rm -f $(LIBPERL)
  66. + $(RMS) $(LIBPERL)
  67. $(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER)
  68. @$(ranlib) $(LIBPERL)
  69. !NO!SUBS!
  70. @@ -954,7 +955,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
  71. amigaos*)
  72. $spitshell >>$Makefile <<'!NO!SUBS!'
  73. lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
  74. - -@rm -f miniperl.xok
  75. + @$(RMS) miniperl.xok
  76. $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
  77. $(miniperl_objs) $(libs)
  78. # $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
  79. @@ -992,7 +993,7 @@ NAMESPACEFLAGS = -force_flat_namespace
  80. esac
  81. $spitshell >>$Makefile <<'!NO!SUBS!'
  82. lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
  83. - -@rm -f miniperl.xok
  84. + @$(RMS) miniperl.xok
  85. $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
  86. $(miniperl_objs) $(libs)
  87. $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
  88. @@ -1003,8 +1004,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
  89. if test "X$hostperl" != X; then
  90. $spitshell >>$Makefile <<!GROK!THIS!
  91. lib/buildcustomize.pl: \$& \$(miniperl_dep) write_buildcustomize.pl
  92. - -@rm -f miniperl.xok
  93. - -@rm \$(MINIPERL_EXE)
  94. + @\$(RMS) miniperl.xok
  95. + @\$(RMS) \$(MINIPERL_EXE)
  96. \$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
  97. \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
  98. \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
  99. @@ -1012,7 +1013,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
  100. else
  101. $spitshell >>$Makefile <<'!NO!SUBS!'
  102. lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl
  103. - -@rm -f miniperl.xok
  104. + @$(RMS) miniperl.xok
  105. $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
  106. $(miniperl_objs) $(libs)
  107. $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
  108. @@ -1025,7 +1026,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
  109. $spitshell >>$Makefile <<'!NO!SUBS!'
  110. $(PERL_EXE): $& $(perlmain_dep) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl
  111. - -@rm -f miniperl.xok
  112. + @$(RMS) miniperl.xok
  113. !NO!SUBS!
  114. case $osname in
  115. @@ -1119,8 +1120,8 @@ pod/perl5280delta.pod: pod/perldelta.pod
  116. $(LNS) perldelta.pod pod/perl5280delta.pod
  117. extra.pods: $(MINIPERL_EXE)
  118. - -@test ! -f extra.pods || rm -f `cat extra.pods`
  119. - -@rm -f extra.pods
  120. + -@test ! -f extra.pods || $(RMS) `cat extra.pods`
  121. + @$(RMS) extra.pods
  122. -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
  123. nx=`echo $$x | sed -e "s/README\.//"`; \
  124. $(LNS) ../$$x "pod/perl"$$nx".pod" ; \
  125. @@ -1340,11 +1341,11 @@ realclean: _realcleaner _mopup
  126. @echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
  127. _clobber:
  128. - -@rm -f Cross/run-* Cross/to-* Cross/from-* Cross/mkdir
  129. - -rm -rf host
  130. - rm -f t/test_state
  131. - rm -f config.sh cppstdin Policy.sh extras.lst
  132. - rm -f $(MANIFEST_SRT)
  133. + @$(RMS) Cross/run-* Cross/to-* Cross/from-* Cross/mkdir
  134. + $(RMS_R) host
  135. + $(RMS) t/test_state
  136. + $(RMS) config.sh cppstdin Policy.sh extras.lst
  137. + $(RMS) $(MANIFEST_SRT)
  138. clobber: _realcleaner _mopup _clobber
  139. @@ -1352,23 +1353,23 @@ distclean: clobber
  140. # Like distclean but also removes emacs backups and *.orig.
  141. veryclean: _verycleaner _mopup _clobber
  142. - -@rm -f Obsolete Wanted
  143. + $(RMS) Obsolete Wanted
  144. # Do not 'make _mopup' directly.
  145. _mopup:
  146. - rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers)
  147. + $(RMS) *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers)
  148. -rmdir .depending
  149. - -@test -f extra.pods && rm -f `cat extra.pods`
  150. - -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod
  151. - -rm -f perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall
  152. - -rm -f perl.export perl.dll perl.libexp perl.map perl.def
  153. - -rm -f *perl.xok
  154. - -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
  155. - -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
  156. - -rm -f config.arch config.over $(DTRACE_H)
  157. + -@test -f extra.pods && $(RMS) `cat extra.pods`
  158. + -@test -f vms/README_vms.pod && $(RMS) vms/README_vms.pod
  159. + $(RMS) perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall
  160. + $(RMS) perl.export perl.dll perl.libexp perl.map perl.def
  161. + $(RMS) *perl.xok
  162. + $(RMS) cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
  163. + $(RMS) $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
  164. + $(RMS) config.arch config.over $(DTRACE_H)
  165. _cleaner1:
  166. - -cd os2; rm -f Makefile
  167. + -cd os2; $(RMS) Makefile
  168. -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
  169. -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
  170. -@if test -f $(MINIPERL_EXE) ; then \
  171. @@ -1378,31 +1379,31 @@ _cleaner1:
  172. else \
  173. sh $(CLEAN).sh ; \
  174. fi
  175. - rm -f realclean.sh veryclean.sh
  176. - -rm -f `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'`
  177. + $(RMS) realclean.sh veryclean.sh
  178. + $(RMS) `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'`
  179. # Dear POSIX, thanks for making the default to xargs to be
  180. # run once if nothhing is passed in. It is such a great help.
  181. # Some systems do not support "?", so keep these files separate.
  182. _cleaner2:
  183. - -rm -f core.*perl.*.? t/core.perl.*.? .?*.c
  184. - rm -f core *perl.core t/core t/*perl.core core.* t/core.*
  185. - rm -f t/$(PERL_EXE) t/rantests
  186. - rm -rf t/tmp*
  187. - rm -rf $(addedbyconf)
  188. - rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old utils/Makefile
  189. - rm -f $(private)
  190. - rm -rf $(unidatafiles) $(unidatadirs)
  191. - rm -rf lib/auto
  192. - rm -f lib/.exists lib/*/.exists lib/*/*/.exists
  193. - rm -f h2ph.man
  194. - rm -rf .config
  195. - rm -f preload
  196. - rm -f pod2htmd.tmp
  197. - rm -rf pod/perlfunc pod/perlipc
  198. + $(RMS) core.*perl.*.? t/core.perl.*.? .?*.c
  199. + $(RMS) core *perl.core t/core t/*perl.core core.* t/core.*
  200. + $(RMS) t/$(PERL_EXE) t/rantests
  201. + $(RMS_R) t/tmp*
  202. + $(RMS_R) $(addedbyconf)
  203. + $(RMS) $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old utils/Makefile
  204. + $(RMS) $(private)
  205. + $(RMS_R) $(unidatafiles) $(unidatadirs)
  206. + $(RMS_R) lib/auto
  207. + $(RMS) lib/.exists lib/*/.exists lib/*/*/.exists
  208. + $(RMS) h2ph.man
  209. + $(RMS_R) .config
  210. + $(RMS) preload
  211. + $(RMS) pod2htmd.tmp
  212. + $(RMS_R) pod/perlfunc pod/perlipc
  213. -rmdir ext/B/lib
  214. - rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
  215. + $(RMS) so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
  216. -rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding
  217. -rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS
  218. -rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale
  219. @@ -1452,11 +1453,11 @@ _realcleaner:
  220. _verycleaner:
  221. @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean
  222. @$(LDLIBPTH) $(MAKE) _cleaner2
  223. - -rm -f *~ *.orig */*~ */*.orig */*/*~ */*/*.orig
  224. + $(RMS) *~ *.orig */*~ */*.orig */*/*~ */*/*.orig
  225. .PHONY: lint
  226. lint: $(c)
  227. - rm -f *.ln
  228. + $(RMS) *.ln
  229. lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
  230. cscopeflags = -Rb # Recursive, build-only.
  231. @@ -1514,7 +1515,7 @@ case "$targethost" in
  232. '') $spitshell >>$Makefile <<'!NO!SUBS!'
  233. test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
  234. $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) common_build
  235. - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
  236. + cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
  237. !NO!SUBS!
  238. ;;
  239. @@ -1564,7 +1565,7 @@ test_prep test-prep: test_prep_pre \$(MI
  240. $to config.sh
  241. # --- For lib/diagnostics.t with -Duseshrplib
  242. $to \$(PERL_EXE)
  243. - cd t && (rm -f \$(PERL_EXE); \$(LNS) ../\$(PERL_EXE) \$(PERL_EXE)) && cd ..
  244. + cd t && (\$(RMS) \$(PERL_EXE); \$(LNS) ../\$(PERL_EXE) \$(PERL_EXE)) && cd ..
  245. $to t/\$(PERL_EXE)
  246. !GROK!THIS!
  247. @@ -1574,7 +1575,7 @@ esac
  248. $spitshell >>$Makefile <<'!NO!SUBS!'
  249. test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
  250. $(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
  251. - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
  252. + cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
  253. !NO!SUBS!
  254. case "$targethost" in
  255. @@ -1629,7 +1630,7 @@ minitest_prep:
  256. @echo "You may see some irrelevant test failures if you have been unable"
  257. @echo "to build lib/Config.pm, or the Unicode data files."
  258. @echo " "
  259. - - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
  260. + - cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
  261. MINITEST_TESTS = base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t