1 top-build-dir = $(shell cd $(depth) && pwd)
2 build-dir = $(shell cd . && pwd)
3 tree-dir = $(subst $(top-build-dir),,$(build-dir))
5 ifneq ($(configure-srcdir),.)
12 src-depth = $(configure-srcdir)
15 top-src-dir := $(shell cd $(src-depth); pwd)
20 src-dir = $(top-src-dir)$(tree-dir)
24 .UNEXPORT: build-dir src-dir tree-dir
26 src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1)))
29 distdir = $(top-src-dir)/$(outdir)/$(DIST_NAME)
30 DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
32 distname = $(package)-$(TOPLEVEL_VERSION)
34 doc-dir = $(src-depth)/Documentation
35 po-dir = $(src-depth)/po
36 step-bindir = $(stepmake)/bin
38 # stepmake package support.
39 DEPTH = $(depth)/$(package-depth)
41 INSTALLPY=$(PYTHON) $(step-bindir)/install.py -c
44 group-dir = $(shell cd $(DEPTH);pwd)/..
45 release-dir = $(group-dir)/releases
46 patch-dir = $(group-dir)/patches
47 rpm-sources = $(release-dir)
48 rpm-build = $(group-dir)/RedHat/BUILD
49 package-icon = $(outdir)/$(package)-icon.xpm
51 ifneq ($(strip $(MY_PATCH_LEVEL)),)
52 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
54 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
57 ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
58 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
60 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
64 # no local settings in the build process.
70 ERROR_LOG = 2> /dev/null
71 SILENT_LOG = 2>&1 > /dev/null
72 date := $(shell date +%x) #duplicated?
74 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
78 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(call src-wildcard,SConscript)
79 DOCDIR=$(depth)/$(outdir)
83 STRIP=strip --strip-debug
86 LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
91 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
93 IN_FILES := $(call src-wildcard,*.in)
94 SOURCE_FILES += $(IN_FILES)
96 # Preprocessed .in documentation _FILES:
97 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
99 ALL_SOURCES = $(SOURCE_FILES)
101 # Check if we are building for Cygwin
103 HOST_ARCH=$(shell $(CC) -dumpmachine)
104 ifeq ($(HOST_ARCH),i686-pc-cygwin)
107 ifeq ($(HOST_ARCH),i686-cygwin)
111 ifeq ($(HOST_ARCH),i586-mingw32msvc)
114 ifeq ($(HOST_ARCH),i386-mingw32)
117 ifeq (darwin,$(findstring darwin,$(HOST_ARCH)))