4 # internal, not normally used
5 DEPTH = $(depth)/$(package-depth)
8 abs-srcdir := $(shell cd $(depth); pwd)
10 topdir := $(abs-srcdir)
14 # $(depth) is deprecated, for most cases you'll want $(src-depth)
16 # Well, on second thought.
17 # It can do no harm, but using src-depth iso depth is only necessary
18 # for broken rules that do
19 # cd $(outdir) && foo $(depth) ...
20 src-depth = $(depth)/$(srcdir)
24 distdir = $(topdir)/$(outdir)/$(DIST_NAME)
25 DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
27 distname = $(package)-$(TOPLEVEL_VERSION)
30 #makeout = $(depth)/make/$(outdir)
31 #docout = $(depth)/Documentation/$(outdir)
32 #binout = $(depth)/bin/$(outdir)
34 doc-dir = $(src-depth)/Documentation
35 po-dir = $(src-depth)/po
37 # sort-out which of these are still needed
39 $(package)_bindir = $(depth)/bin
40 step-bindir = $(stepmake)/bin
42 group-dir = $(shell cd $(DEPTH)/..; pwd)
43 release-dir = $(group-dir)/releases
44 patch-dir = $(group-dir)/patches
46 # i have in $HOME/.rpmrc
47 # topdir: /home/fred/usr/src/Redhat
49 rpm-sources = $(release-dir)
50 rpm-build = $(group-dir)/RedHat/BUILD
53 # package-icon=$(outdir)/$(package)-icon.gif
54 package-icon=$(outdir)/$(package)-icon.xpm
57 # need to be defined in local Makefiles:
62 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
63 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
65 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
68 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
69 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
71 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
78 ERROR_LOG = 2> /dev/null
79 SILENT_LOG = 2>&1 > /dev/null
80 date := $(shell date +%x) #duplicated?
82 INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
86 #replace to do stripping of certain objects
89 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)
90 DOCDIR=$(depth)/$(outdir)
92 STRIP=strip --strip-debug
94 # substitute $(STRIP) in Site.make if you want stripping
96 LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
98 # different redhat releases need different flags for etags. Just use defaults.
102 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
104 DEP_FILES := $(wildcard $(outdir)/*.dep)
106 IN_FILES := $(wildcard *.in)
107 SOURCE_FILES += $(IN_FILES)
109 # Preprocessed .in documentation _FILES:
110 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
112 ALL_SOURCES = $(SOURCE_FILES)