From bbeaa55023675ff92b9eb8e1a8d73ec91e6bb7d2 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 22 Nov 2018 00:28:36 +0000 Subject: Add missing dependency git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3438 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- GNUmakefile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 3a02ea03..f7a87d35 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -102,14 +102,15 @@ all: nonmerge .PHONY: nonmerge nonmerge: $(PRODUCT_SUBDIRS:%=%/all) -# Parallel make (make --jobs) is not smart enough to coordinate builds -# between submakes, so a naive parallel make would cause certain -# targets to get built multiple times simultaneously. That is usually -# unacceptable. So we introduce extra dependencies here just to make -# sure such targets are already up to date before the submake starts, -# for the benefit of parallel make. Note that we ensure that parallel -# make works for 'make all' in the top directory, but it may still fail -# for the aforementioned reason for other invocations. +# Parallel make (make --jobs) is not smart enough to coordinate builds between +# submakes, so a naive parallel make would cause certain targets to be seen as +# existing by one thread while another thread is in the process of creating +# it. Also, multiple threads may build a target simultaneously. So we +# introduce extra dependencies here just to make sure such targets are already +# up to date before the submake starts, for the benefit of parallel make. +# Note that we ensure that parallel make works for 'make all' in the top +# directory, but it may still fail for the aforementioned reason for other +# invocations. $(SUBDIRS:%=%/all) lib/util/all: pm_config.h inttypes_netpbm.h version.h $(PROG_SUBDIRS:%=%/all): lib/all $(SUPPORT_SUBDIRS:%=%/all) @@ -140,7 +141,7 @@ $(TYPEGEN) $(ENDIANGEN): $(BUILDDIR)/buildtools $(MAKE) -C $(dir $@) -f $(SRCDIR)/buildtools/Makefile \ SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@) -inttypes_netpbm.h: $(TYPEGEN) +$(BUILDDIR)/inttypes_netpbm.h: $(TYPEGEN) $(TYPEGEN) >$@ @@ -156,7 +157,7 @@ $(TESTRANDOM): $(BUILDDIR)/test # that or to override the results, because it doesn't work if he's # cross compiling. -pm_config.h: \ +$(BUILDDIR)/pm_config.h: \ $(SRCDIR)/pm_config.in.h config.mk inttypes_netpbm.h \ $(ENDIANGEN) # Note that this rule depends on the effect of the .DELETE_ON_ERROR @@ -198,7 +199,7 @@ endif MAJOR := $(NETPBM_MAJOR_RELEASE) MINOR := $(NETPBM_MINOR_RELEASE) POINT := $(NETPBM_POINT_RELEASE) -version.h: $(SRCDIR)/version.mk +$(BUILDDIR)/version.h: $(SRCDIR)/version.mk @rm -f $@ @echo "/* Generated by make file rule */" >>$@ @echo "#define NETPBM_VERSION" \ -- cgit 1.4.1