[Buildroot] customize package: odd copy construction
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Thu Jan 5 15:36:48 UTC 2012
Le Thu, 5 Jan 2012 16:23:23 +0100,
Thomas De Schampheleire <patrickdepinguin+buildroot at gmail.com> a écrit :
> The customize uses an odd copy construction that I can't really explain:
>
> rm -f $(BUILD_DIR)/series
> (cd $(CUST_DIR); \
> /bin/ls -d * > $(BUILD_DIR)/series || \
> touch $(BUILD_DIR)/series )
> for f in `cat $(BUILD_DIR)/series`; do \
> cp -af $(CUST_DIR)/$$f $(TARGET_DIR); \
> done
> rm -f $(BUILD_DIR)/series
>
> This was changed from:
> -cp -af $(CUST_DIR)/* $(TARGET_DIR)/
>
> in the following commit:
> http://git.buildroot.org/buildroot/commit/?id=06cc62f9cfbe43e9d31a07667a6af905b5f34a42
>
> Why would you create a series file first if you're removing it
> immediately afterwards?
> Doesn't the original copy statement do exactly the same?
I don't know, but I'm not sure this customize package is good example
these days. It should probably be removed, or changed to something
saner that uses the package infrastructure.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
More information about the buildroot
mailing list