]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
Merge remote-tracking branch 'origin/translation' into staging
[lilypond.git] / stepmake / stepmake / generic-vars.make
1 top-build-dir := $(realpath $(depth) )
2 build-dir := $(realpath  . )
3
4 tree-dir = $(subst $(top-build-dir),,$(build-dir))
5
6 ifneq ($(configure-srcdir),.)
7 srcdir-build = 1
8 endif
9
10 ifndef srcdir-build
11 src-depth = $(depth)
12 else
13 src-depth = $(configure-srcdir)
14 endif
15
16 top-src-dir := $(realpath $(src-depth))
17
18 ifndef srcdir-build
19 src-dir = .
20 else
21 src-dir = $(top-src-dir)$(tree-dir)
22 VPATH = $(src-dir)
23 endif
24
25 abs-src-dir = $(top-src-dir)$(tree-dir)
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-build-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-srcdir = $(src-depth)/po
39 po-outdir = $(depth)/po/$(outdir)
40
41 # stepmake package support.
42 DEPTH = $(depth)/$(package-depth)
43
44 INSTALLPY=$(buildscript-dir)/install -c
45 INSTALL=$(INSTALLPY)
46
47 package-icon = $(outdir)/$(package)-icon.xpm
48
49 ifneq ($(strip $(MY_PATCH_LEVEL)),)
50 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
51 else
52 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
53 endif
54
55 ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
56 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
57 else
58 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
59 endif
60
61
62 # no locale settings in the build process.
63 LANG=
64 export LANG
65
66
67 INFO_DIRECTORIES = Documentation
68
69 # clean file lists:
70 #
71 ERROR_LOG = 2> /dev/null
72 SILENT_LOG = 2>&1 >  /dev/null
73 date := $(shell date +%x)       #duplicated?
74
75 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
76
77 M4 = m4
78
79 DOCDIR=$(depth)/$(outdir)
80
81 #?
82 STRIPDEBUG=true
83 STRIP=strip --strip-debug
84 DO_STRIP=true
85
86 LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
87
88 ETAGS_FLAGS =
89 CTAGS_FLAGS =
90
91 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
92
93 IN_FILES := $(call src-wildcard,*.in)
94 SOURCE_FILES += $(IN_FILES)
95
96 # Preprocessed .in documentation _FILES:
97 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
98
99 ALL_SOURCES = $(SOURCE_FILES)
100
101 ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH)))
102 CYGWIN_BUILD = yes
103 endif
104
105 ifeq (mingw,$(findstring mingw,$(HOST_ARCH)))
106 MINGW_BUILD = yes
107 endif
108
109 ifeq (darwin,$(findstring darwin,$(HOST_ARCH)))
110 DARWIN_BUILD = yes
111 endif