about summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2018-11-22 00:28:36 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2018-11-22 00:28:36 +0000
commitbbeaa55023675ff92b9eb8e1a8d73ec91e6bb7d2 (patch)
tree056c1f1ed83eedf2a2a4b0f09afd13bb503907ef /GNUmakefile
parent59407fe251524fb63a8169741b6b9b68c20cf46c (diff)
downloadnetpbm-mirror-bbeaa55023675ff92b9eb8e1a8d73ec91e6bb7d2.tar.gz
netpbm-mirror-bbeaa55023675ff92b9eb8e1a8d73ec91e6bb7d2.tar.xz
netpbm-mirror-bbeaa55023675ff92b9eb8e1a8d73ec91e6bb7d2.zip
Add missing dependency
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3438 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile23
1 files changed, 12 insertions, 11 deletions
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" \