Remove / after $(PKG)_DIR_PREFIX
PATCH 1/1 Remove / after $(PKG)_DIR_PREFIX
From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>
With the automatic derivation of the package directory, the $(PKG)_DIR_PREFIX variable already contains a final /. Therefore there is no need to have an additional / after the uses of this variable.
--- package/Makefile.package.in | 16 ++++++++-------- package/dhrystone/dhrystone.mk | 2 +- package/libgtk2/libgtk2.mk | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-)
package/Makefile.package.in +8 -8
@@ -310,17 +310,17 @@ endif # prefix of the patches $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) $(BUILD_DIR)/%/.stamp_patched: - @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)") + @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)$(RAWNAME)") $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) $(if $($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_PATCH)) $(Q)( \ - if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \ - if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \ - support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \ + if test -d $($(PKG)_DIR_PREFIX)$(RAWNAME); then \ + if test "$(wildcard $($(PKG)_DIR_PREFIX)$(RAWNAME)/$(NAMEVER)*.patch*)"; then \ + support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \ else \ - support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \ - if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER); then \ - support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \ + support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \ + if test -d $($(PKG)_DIR_PREFIX)$(RAWNAME)/$(NAMEVER); then \ + support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \ fi; \ fi; \ fi; \
@@ -482,7 +482,7 @@ $(2)_DEPENDENCIES ?= $(2)_INSTALL_STAGING ?= NO $(2)_INSTALL_IMAGES ?= NO $(2)_INSTALL_TARGET ?= YES -$(2)_DIR_PREFIX = $(if $(4),$(4),$(TOP_SRCDIR)/package) +$(2)_DIR_PREFIX = $(4) # define sub-target stamps $(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed
package/dhrystone/dhrystone.mk +1 -1
@@ -10,7 +10,7 @@ DHRYSTONE_SITE = http://www.netlib.org/benchmark/ define DHRYSTONE_EXTRACT_CMDS (cd $(@D) && $(SHELL) $(DL_DIR)/$($(PKG)_SOURCE)) - $(Q)cp $($(PKG)_DIR_PREFIX)/dhrystone/Makefile $(@D)/ + $(Q)cp $($(PKG)_DIR_PREFIX)dhrystone/Makefile $(@D)/ endef define DHRYSTONE_BUILD_CMDS
package/libgtk2/libgtk2.mk +1 -1
@@ -139,7 +139,7 @@ HOST_LIBGTK2_CONF_OPT = \ --disable-debug define HOST_LIBGTK2_PATCH_REDUCE_DEPENDENCIES_HOOK - support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) host-*.patch + support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)$(RAWNAME) host-*.patch endef HOST_LIBGTK2_POST_PATCH_HOOKS += HOST_LIBGTK2_PATCH_REDUCE_DEPENDENCIES_HOOK
Signature · 1 line
1.7.6.3
PATCH 1/1 Remove / after $(PKG)_DIR_PREFIX
Hello,
Le Sun, 2 Oct 2011 01:43:46 +0200,
"Arnout Vandecappelle (Essensium/Mind)" <[email protected]> a ?crit :
Quoted 3 lines
With the automatic derivation of the package directory, the $(PKG)_DIR_PREFIX variable already contains a final /. Therefore there is no need to have an additional / after the uses of this variable.
For the "package: fix bootloader building" patch I posted a few days ago, I hesitated between :
* Ensuring that pkgparentdir returns a string with no final /
or
* Changing the test for bootloaders from "boot" to "boot/".
The latter was the simplest solution, so it's the one I did. But seeing your patch, I think the former solution would be better, because I don't really like the fact of not having a / between $($(PKG)_DIR_PREFIX) and the rest of the path.
I'll rework my pkg-infra-urgent branch to take this into account.
Regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 Remove / after $(PKG)_DIR_PREFIX
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Thomas> The latter was the simplest solution, so it's the one I Thomas> did. But seeing your patch, I think the former solution would Thomas> be better, because I don't really like the fact of not having a Thomas> / between $($(PKG)_DIR_PREFIX) and the rest of the path.
FYI, I agree with Thomas.
Signature · 1 line
Bye, Peter Korsgaard