diff options
author | Max Maischein <corion@corion.net> | 2020-12-28 13:00:49 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-11 10:01:16 -0600 |
commit | 8d469d0ecbd06a993426de11b8feec551378525b (patch) | |
tree | 637a9acf781591fbf0eeb18006d7dc95579873cf /Makefile.SH | |
parent | e3ccada49f28d9c8307d00bf9772c7039857809c (diff) | |
download | perl-8d469d0ecbd06a993426de11b8feec551378525b.tar.gz |
WIP: Run `makedepend` in parallel by using `make`
This moves the per-file loop body of `makedepend` into a separate
file named `makedepend_file` and then uses `make` to launch
the `makedepend_file` processes for each target potentially in parallel.
This reduces the time for
time sh ./makedepend MAKE=make cflags
from 5 seconds to 2 seconds with MAKEFLAGS=-j8
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-x | Makefile.SH | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.SH b/Makefile.SH index 7e75d47365..ecbe8c136b 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -1376,6 +1376,7 @@ veryclean: _verycleaner _mopup _clobber _mopup: rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers) -rmdir .depending + -rm *.depends -@test -f extra.pods && rm -f `cat extra.pods` -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod -rm -f perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall @@ -1499,7 +1500,7 @@ cscope.out cscope: $(c) $(h) # The README below ensures that the dependency list is never empty and # that when MAKEDEPEND is empty $(FIRSTMAKEFILE) doesn't need rebuilding. -MAKEDEPEND = Makefile makedepend +MAKEDEPEND = Makefile makedepend_file makedepend $(FIRSTMAKEFILE): README $(MAKEDEPEND) $(MAKE) depend MAKEDEPEND= @@ -1520,6 +1521,9 @@ $spitshell >>$Makefile <<'!NO!SUBS!' depend: makedepend $(DTRACE_H) $(generated_headers) sh ./makedepend MAKE="$(MAKE)" cflags +%.c.depends: %.c + sh ./makedepend_file $< $@ cflags + .PHONY: test check test_prep test_prep_nodll test_prep_pre \ test_prep_reonly test_tty test-tty test_notty test-notty \ test_harness test_harness_notty minitest test-reonly _test |