build: actually fix the creation of PKG_INFO_DIR
authorJonas Gorski <jonas.gorski@gmail.com>
Sat, 28 Oct 2017 09:57:39 +0000 (11:57 +0200)
committerJonas Gorski <jonas.gorski@gmail.com>
Sat, 28 Oct 2017 09:57:39 +0000 (11:57 +0200)
The creation was accidentally moved to the wrong hook, fix it by moving
it to the pre hook.

Fixes: e5e5c3f5fd38 ("build: ensure PKG_INFO_DIR exists before trying to use it")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
include/kernel.mk

index f2d2a129d7f387d153d67051066c6cf5630b61f0..d620fdc0c648c25ba2dcc094281563af8b23206e 100644 (file)
@@ -126,6 +126,7 @@ endif
 PKG_EXTMOD_SUBDIRS ?= .
 
 define populate_module_symvers
+       @mkdir -p $(PKG_INFO_DIR)
        cat /dev/null > $(PKG_INFO_DIR)/$(PKG_NAME).symvers; \
        for subdir in $(PKG_EXTMOD_SUBDIRS); do \
                cat $(PKG_INFO_DIR)/*.symvers 2>/dev/null > $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers; \
@@ -133,7 +134,6 @@ define populate_module_symvers
 endef
 
 define collect_module_symvers
-       @mkdir -p $(PKG_INFO_DIR)
        for subdir in $(PKG_EXTMOD_SUBDIRS); do \
                grep -F $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
        done; \