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