aboutsummaryrefslogtreecommitdiff
path: root/Makeconf
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-11-01 12:23:11 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-11-01 12:23:11 +0100
commitbbb977d086e4f501751ae95d253450c57e1ca00c (patch)
treee15f2631f4d243d9bec2a2925fa4db9f8442e497 /Makeconf
parent80bc1678b7b859decae536e726a3e5870cbe84eb (diff)
downloadhurd-bbb977d086e4f501751ae95d253450c57e1ca00c.tar.gz
hurd-bbb977d086e4f501751ae95d253450c57e1ca00c.tar.bz2
hurd-bbb977d086e4f501751ae95d253450c57e1ca00c.zip
Fix parallel builds
As explained on https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html a b: c foo -o a -o b is actually equivalent to a: c foo -o a -o b b: c foo -o a -o b and can thus break in parallel builds, since the foo command may then be called twice. Also, we are here using pattern rules. The automake manual contains various levels of fixing this, using a mere stamp file should be enough for us.
Diffstat (limited to 'Makeconf')
-rw-r--r--Makeconf22
1 files changed, 17 insertions, 5 deletions
diff --git a/Makeconf b/Makeconf
index d82d2fa9..dfca7711 100644
--- a/Makeconf
+++ b/Makeconf
@@ -460,7 +460,7 @@ dist.tar: $(DISTFILES) FORCE
clean:
rm -f dist.tar
ifeq ($(clean),yes)
- rm -f *.d *.o *Server.c *User.c *_S.h *_U.h *.[su]defsi \
+ rm -f *.d *.o *Server.c *User.c *_S.h *_U.h *.[su]defsi *.stamp \
$(cleantarg)
endif
@@ -549,7 +549,7 @@ MIGCOMFLAGS := -subrprefix __
# But it's convenient to be able to explicitly make the intermediate
# files when you want to deal with a problem in the MiG stub generator.
-%.sdefsi %.sdefs.d: %.defs
+%.sdefs.stamp: %.defs
$(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*-MIGSFLAGS) -DSERVERPREFIX=S_ \
-DHURD_SERVER=1 \
-MD -MF $*.sdefs.d.new \
@@ -557,23 +557,35 @@ MIGCOMFLAGS := -subrprefix __
sed -e 's#[^:]*:#$*Server.c $(mig-sheader-prefix)$*_S.h:#' \
< $*.sdefs.d.new > $*.sdefs.d
rm $*.sdefs.d.new
+ touch $@
+%.sdefsi %.sdefs.d: %.sdefs.stamp
+ :
-$(mig-sheader-prefix)%_S.h %Server.c: %.sdefsi
+%Server.stamp: %.sdefsi
$(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) $($*-MIGCOMSFLAGS) \
-sheader $(mig-sheader-prefix)$*_S.h -server $*Server.c \
-user /dev/null -header /dev/null < $<
+ touch $@
+$(mig-sheader-prefix)%_S.h %Server.c: %Server.stamp
+ :
-%.udefsi %.udefs.d: %.defs
+%.udefs.stamp: %.defs
$(CPP) $(CPPFLAGS) $(MIGUFLAGS) $($*-MIGUFLAGS) \
-MD -MF $*.udefs.d.new \
$< -o $*.udefsi
sed -e 's#[^:]*:#$*User.c $*_U.h:#' \
< $*.udefs.d.new > $*.udefs.d
rm $*.udefs.d.new
+ touch $@
+%.udefsi %.udefs.d: %.udefs.stamp
+ :
-%_U.h %User.c: %.udefsi
+%User.stamp: %.udefsi
$(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) $($*-MIGCOMUFLAGS) < $< \
-user $*User.c -server /dev/null -header $*_U.h
+ touch $@
+%_U.h %User.c: %User.stamp
+ :
# Where to find .defs files.
vpath %.defs $(top_srcdir)/hurd