fuel-main/rules.mk
Vladimir Kozhukalov fa08b52fbd Switch to perestroika v5 repositories
Perestroika builds both rpm and deb fuel repos.
We use perestroika rpm repository to build fwm
repository which includes fuel packages as well
as those packages which are listed in requirements-rpm.txt.
Deb repository can be used directly.

Closes-Bug: #1479761
Change-Id: I236144759eb38e71977d175226f81772d23de9b3
2015-08-10 14:33:16 +00:00

47 lines
1.0 KiB
Makefile

define ACTION.COPY
@mkdir -p $(@D)
cp $< $@
endef
define ACTION.TOUCH
@mkdir -p $(@D)
touch $@
endef
# This macros is to make targets dependent on variables
# It writes variable value into temporary file varname.tmp,
# then it compares temporary file with the varname.dep file.
# If there is a difference between them, varname.dep will be updated
# and the target which depends on it will be rebuilt.
# Example:
# target: $(call depv,varname)
DEPV_DIR:=$(BUILD_DIR)/depv
define depv
$(shell mkdir -p $(DEPV_DIR))
$(shell echo "$($1)" > $(DEPV_DIR)/$1.tmp)
$(shell diff >/dev/null 2>&1 $(DEPV_DIR)/$1.tmp $(DEPV_DIR)/$1.dep \
|| mv $(DEPV_DIR)/$1.tmp $(DEPV_DIR)/$1.dep)
$(DEPV_DIR)/$1.dep
endef
define NEWLINE
endef
$(BUILD_DIR)/%/.dir:
mkdir -p $(@D)
@touch $@
assert-variable=$(if $($1),,$(error Variable $1 need to be defined))
find-files=$(shell test -e $1 && find $1 -type f 2> /dev/null)
# uppercase conversion routine
# usage: UPPER_VAR = $(call uc,$(VAR))
uc = $(shell echo $(1) | tr a-z A-Z)
comma:=,
space:=
space+=