]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
Make distributed tarball from Git file list
[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 step-bindir = $(stepmake)/bin
43
44 # stepmake package support.
45 DEPTH = $(depth)/$(package-depth)
46
47 INSTALLPY=$(PYTHON) $(step-bindir)/install.py -c
48 INSTALL=$(INSTALLPY)
49
50 group-dir = $(shell cd $(DEPTH);pwd)/..
51 patch-dir = $(group-dir)/patches
52 rpm-sources = $(release-dir)
53 rpm-build = $(group-dir)/RedHat/BUILD
54 package-icon = $(outdir)/$(package)-icon.xpm
55
56 ifneq ($(strip $(MY_PATCH_LEVEL)),)
57 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
58 else
59 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
60 endif
61
62 ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
63 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
64 else
65 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
66 endif
67
68
69 # no locale settings in the build process.
70 LANG=
71 export LANG
72
73
74 INFO_DIRECTORIES = Documentation
75
76 # clean file lists:
77 #
78 ERROR_LOG = 2> /dev/null
79 SILENT_LOG = 2>&1 >  /dev/null
80 date := $(shell date +%x)       #duplicated?
81
82 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
83
84 M4 = m4
85
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 ALL_SOURCES = $(SOURCE_FILES)
107
108 ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH)))
109 CYGWIN_BUILD = yes
110 endif
111
112 ifeq (mingw,$(findstring mingw,$(HOST_ARCH)))
113 MINGW_BUILD = yes
114 endif
115
116 ifeq (darwin,$(findstring darwin,$(HOST_ARCH)))
117 DARWIN_BUILD = yes
118 endif