Update THANKS.
[lilypond.git] / stepmake / stepmake / generic-vars.make
blob834a527409384fbc542e81f76f10f93254905297
1 top-build-dir = $(shell cd $(depth) && pwd)
2 build-dir = $(shell cd . && pwd)
3 tree-dir = $(subst $(top-build-dir),,$(build-dir))
5 absdir = $(shell cd $(1) ; pwd)
8 ifneq ($(configure-srcdir),.)
9 srcdir-build = 1
10 endif
12 ifndef srcdir-build
13 src-depth = $(depth)
14 else
15 src-depth = $(configure-srcdir)
16 endif
18 top-src-dir := $(shell cd $(src-depth); pwd)
20 ifndef srcdir-build
21 src-dir = .
22 else
23 src-dir = $(top-src-dir)$(tree-dir)
24 VPATH = $(src-dir)
25 endif
27 .UNEXPORT: build-dir src-dir tree-dir
29 src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1)))
31 ifeq ($(distdir),)
32 distdir = $(top-build-dir)/$(outdir)/$(DIST_NAME)
33 DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
34 endif
35 distname = $(package)-$(TOPLEVEL_VERSION)
37 doc-dir = $(src-depth)/Documentation
38 po-dir = $(src-depth)/po
39 step-bindir = $(stepmake)/bin
41 # stepmake package support.
42 DEPTH = $(depth)/$(package-depth)
44 INSTALLPY=$(PYTHON) $(step-bindir)/install.py -c
45 INSTALL=$(INSTALLPY)
47 group-dir = $(shell cd $(DEPTH);pwd)/..
48 patch-dir = $(group-dir)/patches
49 rpm-sources = $(release-dir)
50 rpm-build = $(group-dir)/RedHat/BUILD
51 package-icon = $(outdir)/$(package)-icon.xpm
53 ifneq ($(strip $(MY_PATCH_LEVEL)),)
54 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
55 else
56 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
57 endif
59 ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
60 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
61 else
62 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
63 endif
66 # no local settings in the build process.
67 LANG=
68 export LANG
70 # clean file lists:
72 ERROR_LOG = 2> /dev/null
73 SILENT_LOG = 2>&1 > /dev/null
74 date := $(shell date +%x) #duplicated?
76 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
78 M4 = m4
80 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(call src-wildcard,SConscript)
81 DOCDIR=$(depth)/$(outdir)
84 STRIPDEBUG=true
85 STRIP=strip --strip-debug
86 DO_STRIP=true
88 LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
90 ETAGS_FLAGS =
91 CTAGS_FLAGS =
93 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
95 IN_FILES := $(call src-wildcard,*.in)
96 SOURCE_FILES += $(IN_FILES)
98 # Preprocessed .in documentation _FILES:
99 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
101 ALL_SOURCES = $(SOURCE_FILES)
103 ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH)))
104 CYGWIN_BUILD = yes
105 endif
107 ifeq (mingw,$(findstring mingw,$(HOST_ARCH)))
108 MINGW_BUILD = yes
109 endif
111 ifeq (darwin,$(findstring darwin,$(HOST_ARCH)))
112 DARWIN_BUILD = yes
113 endif