]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
build: create include/xfs before installing headers
authorDave Chinner <dchinner@redhat.com>
Fri, 31 Jul 2015 04:44:52 +0000 (14:44 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 31 Jul 2015 04:44:52 +0000 (14:44 +1000)
Currently the install-headers rule from include/Makefile creates
include/xfs, but there is no guarantee that it will be the first
directory that make executes that rule in. Hence other directories
can race with the creation on include/xfs and fail.

Move the creation of include/xfs to occur before running the
install_headers rules on the subdirectories to avoid any possible
races with creation.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
debian/rules
include/Makefile
include/buildrules

index 27b043fa96918f1916f7b4c84904f43d6b4a72f9..5526bbf985f7e2e92098fba049b8c4062d565c80 100755 (executable)
@@ -44,6 +44,7 @@ dibuild:
        @echo "== dpkg-buildpackage: installer" 1>&2
        if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
                $(diopts) $(MAKE) include/platform_defs.h; \
+               mkdir -p include/xfs; \
                for dir in include libxfs; do \
                        $(MAKE) -C $$dir NODEP=1 install-headers; \
                done; \
index 91b33b073a681f586f1e633c47d8d956db609f8a..01c886db3a1c3b526653c01d4bbe49d7a566b7bd 100644 (file)
@@ -65,12 +65,9 @@ include $(BUILDRULES)
 # set up include/xfs header directory
 install-headers: $(addsuffix -hdrs, $(HFILES) $(QAHFILES) $(PHFILES) $(DKHFILES) $(LIBHFILES))
 
-%-hdrs: xfs
+%-hdrs:
        $(Q)$(LN_S) -f $(PWD)/include/$* xfs/$*
 
-xfs:
-       @mkdir -p xfs
-
 install: default
        $(INSTALL) -m 755 -d $(PKG_INC_DIR)
 
index 0e13f9da83530bbb4061cf25c59b7bb63cdf7180..5010895db52df4c05e055b3c90f4f5c9859f7153 100644 (file)
@@ -14,10 +14,16 @@ clean clobber : $(addsuffix -clean,$(SUBDIRS))
        $(Q)$(MAKE) $(MAKEOPTS) -C $* clean
 
 ifdef HDR_SUBDIRS
+.PHONY: .xfs
+
 headers: $(addsuffix -headers, $(HDR_SUBDIRS))
-%-headers:
+
+%-headers: .xfs
        @echo "   [HEADERS] $*"
        $(Q)$(MAKE) $(MAKEOPTS) -C $* NODEP=1 install-headers
+
+.xfs:
+       @mkdir -p include/xfs
 endif
 
 # Never blow away subdirs