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