4 # internal, not normally used
5 DEPTH = $(depth)/$(package-depth)
8 topdir := $(shell cd $(depth); pwd)
12 # $(depth) is deprecated, for most cases you'll want $(src-depth)
14 # Well, on second thought.
15 # It can do no harm, but using src-depth iso depth is only necessary
16 # for broken rules that do
17 # cd $(outdir) && foo $(depth) ...
18 src-depth = $(depth)/$(srcdir)
22 distdir = $(topdir)/$(outdir)/$(DIST_NAME)
23 DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
25 distname = $(package)-$(TOPLEVEL_VERSION)
28 #makeout = $(depth)/make/$(outdir)
29 #docout = $(depth)/Documentation/$(outdir)
30 #binout = $(depth)/bin/$(outdir)
32 doc-dir = $(src-depth)/Documentation
33 po-dir = $(src-depth)/po
35 # sort-out which of these are still needed
37 $(package)_bindir = $(depth)/bin
38 step-bindir = $(stepmake)/bin
40 group-dir = $(shell cd $(DEPTH)/..; pwd)
41 release-dir = $(group-dir)/releases
42 patch-dir = $(group-dir)/patches
44 # i have in $HOME/.rpmrc
45 # topdir: /home/fred/usr/src/Redhat
47 rpm-sources = $(release-dir)
48 rpm-build = $(group-dir)/RedHat/BUILD
51 # package-icon=$(outdir)/$(package)-icon.gif
52 package-icon=$(outdir)/$(package)-icon.xpm
55 # need to be defined in local Makefiles:
60 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
61 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
63 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
66 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
67 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
69 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
76 ERROR_LOG = 2> /dev/null
77 SILENT_LOG = 2>&1 > /dev/null
78 date := $(shell date +%x) #duplicated?
80 INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
84 #replace to do stripping of certain objects
87 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)
88 DOCDIR=$(depth)/$(outdir)
90 STRIP=strip --strip-debug
92 # substitute $(STRIP) in Site.make if you want stripping
94 LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
96 # different redhat releases need different flags for etags. Just use defaults.
100 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
102 DEP_FILES := $(wildcard $(outdir)/*.dep)
104 IN_FILES := $(wildcard *.in)
105 SOURCE_FILES += $(IN_FILES)
107 # Preprocessed .in documentation _FILES:
108 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
110 ALL_SOURCES = $(SOURCE_FILES)