build: allow creating empty package feeds
[openwrt/openwrt.git] / package / Makefile
index d5212f09a84fd0867fc2498439b2b9de93bec59f..94b807f5d54757c63f60d26fbb626ef894282058 100644 (file)
@@ -138,8 +138,8 @@ endif
 $(curdir)/index: FORCE
        @echo Generating package index...
        @for d in $(PACKAGE_SUBDIRS); do ( \
-               [ -d $(PACKAGE_DIR)/$$d ] && \
-                       cd $(PACKAGE_DIR)/$$d || continue; \
+               mkdir -p $(PACKAGE_DIR)/$$d; \
+               cd $(PACKAGE_DIR)/$$d || continue; \
                $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \
                        gzip -9c Packages > Packages.gz; \
        ); done