]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
release commit
[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 group-dir = $(shell cd $(DEPTH);pwd)/..
42 release-dir = $(group-dir)/releases
43 patch-dir = $(group-dir)/patches
44 rpm-sources = $(release-dir)
45 rpm-build = $(group-dir)/RedHat/BUILD
46 package-icon = $(outdir)/$(package)-icon.xpm
47
48 ifneq ($(strip $(MY_PATCH_LEVEL)),)
49 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
50 else
51 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
52 endif
53
54 ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
55 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
56 else
57 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
58 endif
59
60
61 # no local settings in the build process.
62 LANG=
63 export LANG
64
65 # clean file lists:
66 #
67 ERROR_LOG = 2> /dev/null
68 SILENT_LOG = 2>&1 >  /dev/null
69 date := $(shell date +%x)       #duplicated?
70
71 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
72
73 M4 = m4
74
75 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(src-wildcard,SConscript) $(wildcard SConscript)
76 DOCDIR=$(depth)/$(outdir)
77
78 #?
79 STRIPDEBUG=true 
80 STRIP=strip --strip-debug
81 DO_STRIP=true
82
83 LOOP=$(foreach i,  $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
84
85 ETAGS_FLAGS =
86 CTAGS_FLAGS = 
87
88 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
89
90 IN_FILES := $(call src-wildcard,*.in)
91 SOURCE_FILES += $(IN_FILES)
92
93 # Preprocessed .in documentation _FILES:
94 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
95
96 ALL_SOURCES = $(SOURCE_FILES)
97
98 # Check if we are building for Cygwin
99 #
100 HOST_ARCH=$(shell $(CC) -dumpmachine)
101 ifeq ($(HOST_ARCH),i686-pc-cygwin)
102 CYGWIN_BUILD = yes
103 endif
104 ifeq ($(HOST_ARCH),i686-cygwin)
105 CYGWIN_BUILD = yes
106 endif