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