Get rid of repeated copy of 'customize'
authorUlf Samuelsson <ulf.samuelsson@atmel.com>
Mon, 16 Jul 2007 07:55:50 +0000 (07:55 -0000)
committerUlf Samuelsson <ulf.samuelsson@atmel.com>
Mon, 16 Jul 2007 07:55:50 +0000 (07:55 -0000)
package/customize/customize.mk

index ed50f8f3a1bc39502cde568d83f8aea492bdfcd3..4f8e4b27d6bc44896de3961471524ffb8642ed60 100644 (file)
@@ -5,8 +5,23 @@
 #############################################################
 CUST_DIR:=package/customize/source
 
-customize:
-       -cp -af $(CUST_DIR)/* $(TARGET_DIR)/
+$(BUILD_DIR)/.customize:
+       rm -f $(PROJECT_BUILD_DIR)/series
+       (cd $(CUST_DIR) ; \
+        /bin/ls -d * > $(PROJECT_BUILD_DIR)/series || \
+        touch $(PROJECT_BUILD_DIR)/series )
+       for f in `cat $(PROJECT_BUILD_DIR)/series` ; do         \
+               cp -af $(CUST_DIR)/$$f $(TARGET_DIR)/$$f ;      \
+       done
+       rm -f $(PROJECT_BUILD_DIR)/series
+       touch $@
+
+customize: $(BUILD_DIR)/.customize
+
+customize-clean:
+       rm -f $(BUILD_DIR)/.customize
+
+.PHONY:        customize
 #############################################################
 #
 # Toplevel Makefile options