]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
*** empty log message ***
[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 ifneq ($(configure-srcdir),.)
6 srcdir-build = 1
7 endif
8
9 ifndef srcdir-build
10 src-depth = $(depth)
11 else
12 src-depth = $(configure-srcdir)
13 endif
14
15 top-src-dir := $(shell cd $(src-depth); pwd)
16
17 ifndef srcdir-build
18 src-dir = .
19 else
20 src-dir = $(top-src-dir)$(tree-dir)
21 VPATH = $(src-dir)
22 endif
23
24 .UNEXPORT: build-dir src-dir tree-dir
25
26 src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1)))
27
28 ifeq ($(distdir),)
29   distdir = $(top-src-dir)/$(outdir)/$(DIST_NAME)
30   DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
31 endif
32 distname = $(package)-$(TOPLEVEL_VERSION)
33
34 doc-dir = $(src-depth)/Documentation
35 po-dir = $(src-depth)/po
36 step-bindir = $(stepmake)/bin
37
38 # stepmake package support.
39 DEPTH = $(depth)/$(package-depth)
40
41 INSTALLPY=$(PYTHON) $(step-bindir)/install.py -c
42 INSTALL=$(INSTALLPY)
43
44 group-dir = $(shell cd $(DEPTH);pwd)/..
45 release-dir = $(group-dir)/releases
46 patch-dir = $(group-dir)/patches
47 rpm-sources = $(release-dir)
48 rpm-build = $(group-dir)/RedHat/BUILD
49 package-icon = $(outdir)/$(package)-icon.xpm
50
51 ifneq ($(strip $(MY_PATCH_LEVEL)),)
52 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
53 else
54 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
55 endif
56
57 ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
58 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
59 else
60 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
61 endif
62
63
64 # no local settings in the build process.
65 LANG=
66 export LANG
67
68 # clean file lists:
69 #
70 ERROR_LOG = 2> /dev/null
71 SILENT_LOG = 2>&1 >  /dev/null
72 date := $(shell date +%x)       #duplicated?
73
74 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
75
76 M4 = m4
77
78 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(call src-wildcard,SConscript)
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 # Check if we are building for Cygwin
102 #
103 HOST_ARCH=$(shell $(CC) -dumpmachine)
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