pkg-generic: run $(PKG)_PRE_RSYNC_HOOKS before checking for the existence of $(SRCDIR)
authorTal Shorer <tal.shorer@gmail.com>
Sun, 11 Dec 2016 18:12:45 +0000 (20:12 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 17 Dec 2016 15:00:03 +0000 (16:00 +0100)
This will allow packages to define their pre-rsync hooks which will be
guaranteed to run even if the source is missing.

Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-generic.mk

index 827de627e84da2aa49c50162cc95817f3841719e..3ca71b03b9dfaa44beafbbdeba8ce7d00e658f6d 100644 (file)
@@ -161,8 +161,8 @@ $(BUILD_DIR)/%/.stamp_extracted:
 # used.
 $(BUILD_DIR)/%/.stamp_rsynced:
        @$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
-       @test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
        $(foreach hook,$($(PKG)_PRE_RSYNC_HOOKS),$(call $(hook))$(sep))
+       @test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
        rsync -au --chmod=u=rwX,go=rX $(RSYNC_VCS_EXCLUSIONS) $(call qstrip,$(SRCDIR))/ $(@D)
        $(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep))
        $(Q)touch $@