4 # internal, not normally used
5 DEPTH = $(depth)/$(package-depth)
8 #abs-srcdir := $(shell cd $(depth); pwd)
10 #topdir := $(abs-srcdir)
13 ## `which pwd` is to prevent symlink resolving intelligence
14 pwd:=$(shell `which pwd`)
15 current-relative-dir:=$(subst $(strip $(shell cd $(depth); `which pwd`)),,$(pwd))
24 abs-srcdir := $(shell cd $(src-depth); pwd)
25 topdir := $(abs-srcdir)
30 distdir = $(topdir)/$(outdir)/$(DIST_NAME)
31 DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
33 distname = $(package)-$(TOPLEVEL_VERSION)
35 doc-dir = $(src-depth)/Documentation
36 po-dir = $(src-depth)/po
38 # sort-out which of these are still needed
40 $(package)_bindir = $(depth)/bin
41 step-bindir = $(stepmake)/bin
43 group-dir = $(shell cd $(DEPTH);pwd)/..
44 release-dir = $(group-dir)/releases
45 patch-dir = $(group-dir)/patches
47 # i have in $HOME/.rpmrc
48 # topdir: /home/fred/usr/src/Redhat
50 rpm-sources = $(release-dir)
51 rpm-build = $(group-dir)/RedHat/BUILD
54 # package-icon=$(outdir)/$(package)-icon.gif
55 package-icon=$(outdir)/$(package)-icon.xpm
58 # need to be defined in local Makefiles:
63 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
64 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
66 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
69 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
70 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
72 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
79 ERROR_LOG = 2> /dev/null
80 SILENT_LOG = 2>&1 > /dev/null
81 date := $(shell date +%x) #duplicated?
83 INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
87 #replace to do stripping of certain objects
90 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)
91 DOCDIR=$(depth)/$(outdir)
93 STRIP=strip --strip-debug
95 # substitute $(STRIP) in Site.make if you want stripping
97 LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
99 # different redhat releases need different flags for etags. Just use defaults.
103 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
105 DEP_FILES := $(wildcard $(outdir)/*.dep)
107 IN_FILES := $(wildcard *.in)
108 SOURCE_FILES += $(IN_FILES)
110 # Preprocessed .in documentation _FILES:
111 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
113 ALL_SOURCES = $(SOURCE_FILES)
115 HOST_ARCH=$(shell $(CC) -dumpmachine)
116 ifeq ($(HOST_ARCH),i686-pc-cygwin)