1 top-build-dir := $(realpath $(depth) )
2 build-dir := $(realpath . )
4 tree-dir = $(subst $(top-build-dir),,$(build-dir))
6 ifneq ($(configure-srcdir),.)
13 src-depth = $(configure-srcdir)
16 top-src-dir := $(realpath $(src-depth))
21 src-dir = $(top-src-dir)$(tree-dir)
25 abs-src-dir = $(top-src-dir)$(tree-dir)
27 .UNEXPORT: build-dir src-dir tree-dir
29 src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1)))
32 distdir = $(top-build-dir)/$(outdir)/$(DIST_NAME)
33 DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
35 distname = $(package)-$(TOPLEVEL_VERSION)
37 doc-dir = $(src-depth)/Documentation
38 po-srcdir = $(src-depth)/po
39 po-outdir = $(depth)/po/$(outdir)
41 # stepmake package support.
42 DEPTH = $(depth)/$(package-depth)
44 INSTALLPY=$(buildscript-dir)/install -c
47 package-icon = $(outdir)/$(package)-icon.xpm
49 ifneq ($(strip $(MY_PATCH_LEVEL)),)
50 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
52 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
55 ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
56 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
58 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
62 # no locale settings in the build process.
67 INFO_DIRECTORIES = Documentation
71 ERROR_LOG = 2> /dev/null
72 SILENT_LOG = 2>&1 > /dev/null
73 date := $(shell date +%x) #duplicated?
75 INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
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 ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH)))
105 ifeq (mingw,$(findstring mingw,$(HOST_ARCH)))
109 ifeq (darwin,$(findstring darwin,$(HOST_ARCH)))