-# title generic variables
-# file make/Variables.make
-#
-# do not change this file for site-wide extensions; please use
-# make/$(outdir)/Site.make;
-#
-# Any change in files in this directory (make/) would be distributed, if
-# you do make dist
-
# directory names:
# depth from group-dir
-# not eh, normally used
+# internal, not normally used
DEPTH = $(depth)/$(package-depth)
-# topdir := $(shell cd $(depth); pwd)
+#ifeq ($(topdir),)
+#abs-srcdir := $(shell cd $(depth); pwd)
+##deprecated
+#topdir := $(abs-srcdir)
+#endif
+pwd := $(shell pwd)
+
+ifeq ($(srcdir),.)
+src-depth = $(depth)
+else
+src-depth = $(srcdir)
+endif
+
ifeq ($(topdir),)
-topdir := $(shell cd $(depth); pwd)
+abs-srcdir := $(shell cd $(src-depth); pwd)
+topdir := $(abs-srcdir)
endif
-pwd := $(shell pwd)
# derived names
ifeq ($(distdir),)
-# distdir = $(depth)/$(outdir)/$(DIST_NAME)
-# must be absolute for 'make dist' with installed stepmake
distdir = $(topdir)/$(outdir)/$(DIST_NAME)
DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
endif
distname = $(package)-$(TOPLEVEL_VERSION)
-# obsolete?
-makeout = $(depth)/make/$(outdir)
-docout = $(depth)/Documentation/$(outdir)
-binout = $(depth)/bin/$(outdir)
-
-doc-dir = $(depth)/Documentation
-po-dir = $(depth)/po
+doc-dir = $(src-depth)/Documentation
+po-dir = $(src-depth)/po
# sort-out which of these are still needed
#
$(package)_bindir = $(depth)/bin
step-bindir = $(stepmake)/bin
-# deprecated
-# abs-step-bindir = $(topdir)/$(stepmake)/bin
-#
+
group-dir = $(shell cd $(DEPTH)/..; pwd)
release-dir = $(group-dir)/releases
patch-dir = $(group-dir)/patches
rpm-build = $(group-dir)/RedHat/BUILD
#
+# package-icon=$(outdir)/$(package)-icon.gif
+package-icon=$(outdir)/$(package)-icon.xpm
+
# need to be defined in local Makefiles:
#
SILENT_LOG = 2>&1 > /dev/null
date := $(shell date +%x) #duplicated?
-# compile and link options:
-#
-ARFLAGS = ru
-
-INCLUDES = $(depth) include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
-
-# urg: for windows ?
-# LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
-#
+INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
-# macro compiler:
-#
M4 = m4
-#
-
-#
-LD_COMMAND = $(LD) $(LDFLAGS) -o $@
-#
-
-# dependencies:
-#
-depfile = $(outdir)/$(subst .o,.dep,$(notdir $@))#
-DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
-#
-
-
-# generic target names:
-#
-ifdef NAME
-EXECUTABLE = $(outdir)/$(NAME)$(EXE)
-else
-EXECUTABLE =
-endif
-
-EXECUTABLES = $(notdir $(EXECUTABLE))
-
-
-#
#replace to do stripping of certain objects
STRIPDEBUG=true
DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)
DOCDIR=$(depth)/$(outdir)
-
STRIP=strip --strip-debug
-ifdef stablecc
- STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
-endif
# substitute $(STRIP) in Site.make if you want stripping
DO_STRIP=true
-LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) -C $(i) $@ &&) true
+LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
+
+# different redhat releases need different flags for etags. Just use defaults.
+ETAGS_FLAGS= # -CT
+CTAGS_FLAGS=-h
+
+makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
+
+DEP_FILES := $(wildcard $(outdir)/*.dep)
+
+IN_FILES := $(wildcard *.in)
+SOURCE_FILES += $(IN_FILES)
+
+# Preprocessed .in documentation _FILES:
+OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
+
+ALL_SOURCES = $(SOURCE_FILES)
-include $(stepdir)/files.make