]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / stepmake / stepmake / generic-vars.make
1 top-build-dir = $(shell cd $(depth) && pwd)
2 build-dir = $(shell cd . && pwd)
3 tree-dir = $(subst $(top-build-dir),,$(build-dir))
4
5 absdir = $(shell cd $(1) ; pwd)
6
7
8 ifneq ($(configure-srcdir),.)
9 srcdir-build = 1
10 endif
11
12 ifndef srcdir-build
13 src-depth = $(depth)
14 else
15 src-depth = $(configure-srcdir)
16 endif
17
18 top-src-dir := $(shell cd $(src-depth); pwd)
19
20 ifndef srcdir-build
21 src-dir = .
22 else
23 src-dir = $(top-src-dir)$(tree-dir)
24 VPATH = $(src-dir)
25 endif
26
27 .UNEXPORT: build-dir src-dir tree-dir
28
29 src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1)))
30
31 ifeq ($(distdir),)
32   distdir = $(top-src-dir)/$(outdir)/$(DIST_NAME)
33   DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
34 endif
35 distname = $(package)-$(TOPLEVEL_VERSION)
36
37 doc-dir = $(src-depth)/Documentation
38 po-dir = $(src-depth)/po
39 step-bindir = $(stepmake)/bin
40
41 # stepmake package support.
42 DEPTH = $(depth)/$(package-depth)
43
44 INSTALLPY=$(PYTHON) $(step-bindir)/install.py -c
45 INSTALL=$(INSTALLPY)
46
47 group-dir = $(shell cd $(DEPTH);pwd)/..
48 release-dir = $(group-dir)/releases
49 patch-dir = $(group-dir)/patches
50 rpm-sources = $(release-dir)
51 rpm-build = $(group-dir)/RedHat/BUILD
52 package-icon = $(outdir)/$(package)-icon.xpm
53
54 ifneq ($(strip $(MY_PATCH_LEVEL)),)
55 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
56 else
57 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
58 endif
59
60 ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
61 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
62 else
63 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
64 endif
65
66
67 # no local settings in the build process.
68 LANG=
69 export LANG
70
71 # clean file lists:
72 #
73 ERROR_LOG = 2> /dev/null
74 SILENT_LOG = 2>&1 >  /dev/null
75 date := $(shell date +%x)       #duplicated?
76
77 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
78
79 M4 = m4
80
81 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(call src-wildcard,SConscript)
82 DOCDIR=$(depth)/$(outdir)
83
84 #?
85 STRIPDEBUG=true
86 STRIP=strip --strip-debug
87 DO_STRIP=true
88
89 LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
90
91 ETAGS_FLAGS =
92 CTAGS_FLAGS =
93
94 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
95
96 IN_FILES := $(call src-wildcard,*.in)
97 SOURCE_FILES += $(IN_FILES)
98
99 # Preprocessed .in documentation _FILES:
100 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
101
102 ALL_SOURCES = $(SOURCE_FILES)
103
104 ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH)))
105 CYGWIN_BUILD = yes
106 endif
107
108 ifeq (mingw,$(findstring mingw,$(HOST_ARCH)))
109 MINGW_BUILD = yes
110 endif
111
112 ifeq (darwin,$(findstring darwin,$(HOST_ARCH)))
113 DARWIN_BUILD = yes
114 endif