]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
Remove StepMake as a separate package
[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-srcdir = $(src-depth)/po
41 po-outdir = $(depth)/po/$(outdir)
42
43 # stepmake package support.
44 DEPTH = $(depth)/$(package-depth)
45
46 INSTALLPY=$(buildscript-dir)/install -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 DOCDIR=$(depth)/$(outdir)
86
87 #?
88 STRIPDEBUG=true
89 STRIP=strip --strip-debug
90 DO_STRIP=true
91
92 LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
93
94 ETAGS_FLAGS =
95 CTAGS_FLAGS =
96
97 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
98
99 IN_FILES := $(call src-wildcard,*.in)
100 SOURCE_FILES += $(IN_FILES)
101
102 # Preprocessed .in documentation _FILES:
103 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
104
105 ALL_SOURCES = $(SOURCE_FILES)
106
107 ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH)))
108 CYGWIN_BUILD = yes
109 endif
110
111 ifeq (mingw,$(findstring mingw,$(HOST_ARCH)))
112 MINGW_BUILD = yes
113 endif
114
115 ifeq (darwin,$(findstring darwin,$(HOST_ARCH)))
116 DARWIN_BUILD = yes
117 endif