[Buildroot] [PATCH 18/74] usbutils: convert old-style hook to new-style hook

Peter Korsgaard jacmet at uclibc.org
Sun Sep 12 21:30:01 UTC 2010


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
 Thomas> ---
 Thomas>  package/usbutils/usbutils.mk |   30 +++++++++++++++++++++++-------
 Thomas>  1 files changed, 23 insertions(+), 7 deletions(-)

 Thomas>  	rm -f $(TARGET_DIR)/usr/share/pkgconfig/usbutils.pc
 Thomas> -ifeq ($(BR2_PACKAGE_USBUTILS_ZLIB),y)
 Thomas> +endef
 Thomas> +
 Thomas> +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_TARGET_CLEANUP
 Thomas> +
 Thomas> +define USBUTILS_REMOVE_UNCOMPRESSED_IDS
 Thomas>  	rm -f $(TARGET_DIR)/usr/share/usb.ids
 Thomas> -else
 Thomas> +endef
 Thomas> +
 Thomas> +define USBUTILS_REMOVE_COMPRESSED_IDS
 Thomas>  	rm -f $(TARGET_DIR)/usr/share/usb.ids.gz
 Thomas> +endef
 Thomas> +
 Thomas> +ifeq ($(BR2_PACKAGE_USBUTILS_ZLIB),y)
 Thomas> +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_UNCOMPRESSED_IDS
 Thomas> +else
 Thomas> +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_COMPRESSED_IDS
 Thomas>  endif

I know this was how it was done before as well, but are you sure this is
correct? It would make more sense if the .gz was used when the ZLIB
support was enabled.

Perhaps we should just simplify it and use
rm -f $(TARGET_DIR)/usr/share/usb.ids*

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list