]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/substitute-vars.make
release: 1.1.43
[lilypond.git] / stepmake / stepmake / substitute-vars.make
1 # Substitute.make
2
3 sed-endline = sed 's!$$!\\!'
4 sed-newline = sed 's!$$!\n!'
5 sed-quotes = sed "s!\'!\\\&!g"
6 sed-quote-line = sed 's!.*$$!\"&\"!'
7
8 date := $(shell date '+%d%b%y'|tr '[a-z]' '[A-Z]' )
9 DATE = $(date)
10
11 # for all FILE in AT_FILES:
12 # substitute occurrences of @FILE@ with contents $(at-dir)BLA$(at-ext)
13 sed-atfiles = -e '' $(foreach i, $(AT_FILES), \
14   -e '/@$i@/r $(at-dir)$i$(at-ext)' -e 's%@$i@%%g')
15
16 # for all VAR in ATVARIABLES
17 # substitute occurrences of @VAR@ with $(VAR)
18 sed-atvariables = -e '' $(foreach i, $(ATVARIABLES), -e 's!@$i@!$($i)!g')
19
20 # these are obsolete
21 # use ATVARIABLES
22 sed-date=sed 's!@DATE@!${date}!g'
23 sed-PACKAGE = sed 's!@PACKAGE@!${PACKAGE}!g'
24 sed-bash = sed 's!@BASH@!$(BASH)!'
25 sed-dir-datadir = sed 's!@DIR_DATADIR@!$(DIR_DATADIR)!'
26 sed-package=sed 's!@package@!${package}!g'
27 sed-perl = sed 's!@PERL@!$(PERL)!'
28 sed-python = sed 's!@PYTHON@!$(PYTHON)!'
29 sed-sh = sed 's!@SH@!$(SH)!'
30 sed-shell = sed 's!@SH@!$(SHELL)!' | sed 's!@BASH@!$(BASH)!'
31 sed-version= sed 's!@TOPLEVEL_VERSION@!${TOPLEVEL_VERSION}!g'
32 sed-step-bindir = sed 's!@STEP_BINDIR@!$(pwd)/$(step-bindir)!'
33