I created a Buidroot package with the both following files :
.mk
AVM_VERSION = $(BR2_PACKAGE_AVM_TARGET)-V00.00.01
AVM_SITE_METHOD = git
AVM_SITE = ssh://git@myownserver.com/App/AVM.git
AVM_INSTALL_TARGET = YES
define AVM_BUILD_CMDS
$(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/AVM $(@D)/avm.c
endef
define AVM_INSTALL_STAGING_CMDS
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
endef
define AVM_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/AVM $(TARGET_DIR)/usr/bin/avm
endef
$(eval $(generic-package))
Config.in
config BR2_PACKAGE_AVM
bool "AVM"
help
Application for embedded platform.
config BR2_PACKAGE_AVM_TARGET
string "AVM package target"
depends on BR2_PACKAGE_AVM
help
Define board
I succedded in compiling the package by using the above .mk file. However, because I wanted to modify the source code into output/build I note the following behavior (After removing only .stamp_built) :
$ make AVM
>>> AVM v00.00.01 Extracting
>>> AVM v00.00.01 Patching
>>> AVM v00.00.01 Configuring
>>> AVM v00.00.01 Building
I obtain a new Extracting, Patching, Configuring, Building even if no .stamp removed…
What’s wrong ?
EDIT :
The problem seems to come from the AVM_VERSION definition. When I exchange $(BR2_PACKAGE_AVM_TARGET)
by its value I am getting make: Nothing to do for « AVM ».
This variable, named $(BR2_PACKAGE_AVM_TARGET), has been defined into the defconfig file associated to the board as BR2_PACKAGE_AVM_TARGET="AVM2.3"
Advertisement
Answer
You did not qstrip
BR2_PACKAGE_AVM_TARGET
, so as far as make is concerned, the quotes are part of the version. make looks for the file output/build/AVM-"AVM2.3"-V00.00.01/.stamp_extracted
but that file doesn’t exist, so the extraction step will be executed again. Same for all other steps. Note that the download step is skipped because the tarball exists in the dl directory.
To fix, use
AVM_VERSION = $(call qstrip, $(BR2_PACKAGE_AVM_TARGET))-V00.00.01