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