]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
6a8729df5f670e847b0307cf3b1fc7b65bc80d49
[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 locale settings in the build process.
69 LANG=
70 export LANG
71
72
73 INFO_DIRECTORIES = Documentation
74
75 # clean file lists:
76 #
77 ERROR_LOG = 2> /dev/null
78 SILENT_LOG = 2>&1 >  /dev/null
79 date := $(shell date +%x)       #duplicated?
80
81 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
82
83 M4 = m4
84
85 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(call src-wildcard,SConscript)
86 DOCDIR=$(depth)/$(outdir)
87
88 #?
89 STRIPDEBUG=true
90 STRIP=strip --strip-debug
91 DO_STRIP=true
92
93 LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
94
95 ETAGS_FLAGS =
96 CTAGS_FLAGS =
97
98 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
99
100 IN_FILES := $(call src-wildcard,*.in)
101 SOURCE_FILES += $(IN_FILES)
102
103 # Preprocessed .in documentation _FILES:
104 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
105
106 # CSS source files are in a unique directory
107 CSS_DIRECTORY = $(top-src-dir)/Documentation/css
108 CSS_FILES := $(shell ls $(CSS_DIRECTORY)/*.css)
109 OUT_CSS_FILES = $(CSS_FILES:$(CSS_DIRECTORY)/%.css=$(outdir)/%.css)
110
111 ALL_SOURCES = $(SOURCE_FILES)
112
113 ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH)))
114 CYGWIN_BUILD = yes
115 endif
116
117 ifeq (mingw,$(findstring mingw,$(HOST_ARCH)))
118 MINGW_BUILD = yes
119 endif
120
121 ifeq (darwin,$(findstring darwin,$(HOST_ARCH)))
122 DARWIN_BUILD = yes
123 endif