aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-10 09:15:12 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-10 09:26:19 +0900
commitfaa4f4f23fbb6b48b158cc38d9b509fd00838976 (patch)
tree933ce9c064d2a437d1570eac36ed2f87aca980e9 /template
parentff767dd914d0aa91e2c6ec29bba7ff3739225b0c (diff)
downloadruby-faa4f4f23fbb6b48b158cc38d9b509fd00838976.tar.gz
Get rid of FreeBSD make incompatibility [Bug #16331]
FreeBSD make works differently with `-j` option. > -j max_jobs > Specify the maximum number of jobs that `make` may have running > at any one time. The value is saved in `.MAKE.JOBS.` Turns > compatibility mode off, unless the `B` flag is also specified. > When compatibility mode is off, all commands associated with a > target are executed in a single shell invocation as opposed to > the traditional one shell invocation per line. This can break > traditional scripts which change directories on each command > invocation and then expect to start with a fresh environment on > the next line. It is more efficient to correct the scripts > rather than turn backwards compatibility on. Stop using exit, cd, exec in middle of commands.
Diffstat (limited to 'template')
-rw-r--r--template/Makefile.in31
1 files changed, 18 insertions, 13 deletions
diff --git a/template/Makefile.in b/template/Makefile.in
index ed9e8b686e..9c133838e1 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -275,7 +275,7 @@ $(PROGRAM):
$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
$(Q) $(POSTLINK)
-PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(exec) $(RM) $(LIBRUBY_EXTS)
+PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(gnumake:yes=exec) $(RM) $(LIBRUBY_EXTS)
# We must `rm' the library each time this rule is invoked because "updating" a
# MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not
@@ -456,12 +456,14 @@ probes.$(OBJEXT): $(srcdir)/probes.d $(DTRACE_REBUILD:yes=probes.stamp)
main: mjit-headers
yes-mjit-headers: $(MJIT_MIN_HEADER)
clean-local::
- $(Q)$(RM) $(MJIT_HEADER) $(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX:%=*).h
- $(Q)$(RM) $(MJIT_MIN_HEADER) $(MJIT_MIN_HEADER:.h=)$(MJIT_HEADER_SUFFIX:%=*).h
- $(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_min_header-*.h
- $(Q)$(RM) $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time mjit_config.h
+ $(Q)$(RM) \
+ $(MJIT_HEADER) $(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX:%=*).h \
+ $(MJIT_MIN_HEADER) $(MJIT_MIN_HEADER:.h=)$(MJIT_HEADER_SUFFIX:%=*).h \
+ $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_min_header-*.h \
+ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time mjit_config.h \
+ || $(NULLCMD)
$(Q)$(RM) -r mjit_build_dir.*
- -$(Q) $(RMDIRS) $(MJIT_HEADER_INSTALL_DIR) $(MJIT_HEADER_BUILD_DIR) $(TIMESTAMPDIR) 2> $(NULL) || exit 0
+ -$(Q) $(RMDIRS) $(MJIT_HEADER_INSTALL_DIR) $(MJIT_HEADER_BUILD_DIR) $(TIMESTAMPDIR) 2> $(NULL) || $(NULLCMD)
# DTrace static library hacks described here:
# http://mail.opensolaris.org/pipermail/dtrace-discuss/2005-August/000207.html
@@ -470,15 +472,18 @@ ruby-glommed.$(OBJEXT):
$(Q) $(LD) -r -o $@ $(OBJS)
clean-local::
- $(Q)$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output \
- enc/encinit.c enc/encinit.$(OBJEXT)
- -$(Q)$(RM) $(pkgconfig_DATA)
- -$(Q)$(RMALL) exe/ ruby-runner.$(OBJEXT) ruby-runner.h *.dSYM
+ $(Q)$(RM) \
+ ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output \
+ enc/encinit.c enc/encinit.$(OBJEXT) $(pkgconfig_DATA) \
+ ruby-runner.$(OBJEXT) ruby-runner.h *.dSYM \
+ || $(NULLCMD)
+ -$(Q)$(RMALL) exe/
distclean-local::
- $(Q)$(RM) ext/config.cache $(RBCONFIG) Doxyfile
- -$(Q)$(RM) run.gdb
- -$(Q)$(RM) $(INSTALLED_LIST) $(arch_hdrdir)/ruby/config.h verconf.h
+ $(Q)$(RM) \
+ ext/config.cache $(RBCONFIG) Doxyfile run.gdb \
+ $(INSTALLED_LIST) $(arch_hdrdir)/ruby/config.h verconf.h \
+ || $(NULLCMD)
-$(Q)$(RMDIRS) $(arch_hdrdir)/ruby 2> /dev/null || true
ext/clean.sub:: ext/clean.mk