[Buildroot] [PATCH] Makefile: target-purgelocales: add dependencies

Peter Korsgaard jacmet at uclibc.org
Mon Apr 28 09:36:15 UTC 2014


>>>>> "Arnout" == Arnout Vandecappelle <arnout at mind.be> writes:

Hi,

 >> What is the more appropriate solution? The easiest and fastest one is
 >> the first, but i'm not sure if those targets can be executed in
 >> parallel.

 >  My personal preference is to have a single rule (e.g. target-finalize)
 > that performs everything that is post-targets and pre-rootfs. There isn't
 > much that needs to be done so parallelisation doesn't make sense. And I
 > think it's much easier to understand which steps are executed and in
 > which order if they are all put together in a single rule rather than
 > spread out over several.

 >  To make things more readable, we can put the commands into separate
 > variables. For instance:

 > define TARGET_PURGE_LOCALES
 > 	rm -f $(LOCALE_WHITELIST)
 > 	...
 > endef

 > define TARGET_PURGE_DEVFILES
 > 	rm -rf $(TARGET_DIR)/usr/include ...
 > ...
 > endef

 > ifneq ($(BR2_PACKAGE_GDB),y)
 > define TARGET_PURGE_GDB
 >         rm -rf $(TARGET_DIR)/usr/share/gdb
 > endef
 > endif

 > target-finalize: $(TARGETS)
 > 	$(TARGET_PURGE_LOCALES)
 > 	$(TARGET_PURGE_DEVFILES)
 > 	$(TARGET_PURGE_GDB)
 > 	$(TARGET_PURGE_DOC)
 > ...

Yes, that looks nice and clear to me too.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list