Update of /cvsroot/libfunutil/libfunutil/toc/make
In directory sc8-pr-cvs1:/tmp/cvs-serv14493/toc/make
Modified Files:
BIN_PROGRAMS.make C_DEPS.make DOXYGEN.make INSTALL_XXX.make
Makefile NAMESPACE.make SHARED_LIBS.make STATIC_LIBS.make
lyxport.make makerules.SHARED_LIBS subdirs_traverser.make
toc.make.at toc_functions.make
Added Files:
FILE_FILTERS.make SCP.make makerules.FILE_FILTERS
makerules.SCP qt_if_enabled.sh
Log Message:
mass commit: fixes/changes from toc/s11n/cl trees.
--- NEW FILE: FILE_FILTERS.make ---
#!/do/not/make
# A toc snippet to provide generic file filtering support. (Originally
# written to filter a namespace name in some C++ code.)
# Depends on the script makerules.FILE_FILTERS, plus some toc-related
# conventions.
#
# st...@s1..., 1 Dec 2003
#
# Usage:
#
# Define:
# FILE_FILTERS = filterX filterY
# These are logical names for filter sets, and should be unique with a Makefile,
# especially, there should be no targets with the names in $(FILE_FILTERS).
#
# either:
# FILE_FILTERS_BIN = /path/to/filter/app + args
# or:
# filterX_FILTER_BIN = /path/to/filter/app + args (defaults to 'perl -p')
#
# filterX_FILTER_RULES = -e 's|rules for your filter|...|' (FILTER_BIN must accept this
# as a command-line argument)
#
# filterX_FILTER_SOURCES = list of input files, all of which must have some common prefix.
#
# filterX_FILTER_NAMESED = sed code to translate x_FILTER_SOURCES to target filenames. Gets
# applied to each name in x_FILTER_SOURCES. If this uses the $ pattern you must
# use $$ instead, e.g. s/$$/.out/. BE CAREFUL!
#
# filterX_FILTER_DEPS = optional list of extra deps. Automatically added are
# all input/control files used in creating the rules, including Makefile.
#
#
# Generated files:
# - are named .toc.FILE_FILTERS.*
# - are added to $(CLEAN_FILES)
# - are not changed unless out-of-date, so they are dependencies-safe.
# - get their own target names. This may cause collisions with other targets,
# but presumably only one target is responsible for creating any given
# file.
#
#
#########################################################################################
# BUG WARNING: BUG WARNING: BUG WARNING: BUG WARNING: BUG WARNING: BUG WARNING:
#
# It works by creating intermediary makefiles (.toc.FILE_FILTERS.*), so:
#
# When you remove/rename entries from FILE_FILTERS (as your project changes) you
# will need to 'rm .toc.FILE_FILTERS.*' in order to be able to run make again, as some
# pre-generated rules may become invalidated and generate now-bogus errors which will
# kill make before it can run any targets (e.g., clean).
#
#########################################################################################
# Sample usage:
# FILE_FILTERS = namespace filter2
# # optional: namespace_FILTER_BIN = $(PERL_BIN) -p
# namespace_FILTER_RULES = -e 's|PACKAGE_NAMESPACE|$(PACKAGE_NAMESPACE)|g'
# namespace_FILTER_SOURCES = $(wildcard src/*.cpp src/*.h)
# namespace_FILTER_NAMESED = s,src/,,
# ... similar for filter2_FILTER_XXX
# include $(TOC_MAKESDIR)/FILE_FILTERS.make
#
# That will filter src/*.{cpp,h} to *.{cpp,h}, replacing PACKAGE_NAMESPACE
# with $(PACKAGE_NAMESPACE)
#
# To process it, either:
# all: FILE_FILTERS mytarget othertarget
# or:
# all: filter-namespace mytarget filter-filter2 othertarget
# or:
# all: namespace mytarget filter2 othertarget
#
#########################################################################################
FILE_FILTERS_MAKEFILE = $(TOC_MAKESDIR)/FILE_FILTERS.make
ifeq (,$(FILE_FILTERS))
$(error $(FILE_FILTERS_MAKEFILE): you must define FILE_FILTERS, plus some other vars, before including this file! Read the docs in this file)
endif
FILE_FILTERS_BIN ?= $(PERL_BIN) -p
FILE_FILTERS_RULES_GENERATOR = $(TOC_MAKESDIR)/makerules.FILE_FILTERS
$(FILE_FILTERS_RULES_GENERATOR):
$(FILE_FILTERS_MAKEFILE):
FILE_FILTERS_INCFILE = .toc.FILE_FILTERS.make
CLEAN_FILES += $(FILE_FILTERS_INCFILE)
$(FILE_FILTERS_INCFILE): $(FILE_FILTERS_RULES_GENERATOR) $(FILE_FILTERS_MAKEFILE)
ifeq (1,$(MAKING_CLEAN))
@echo "$(MAKECMDGOALS): skipping FILE_FILTERS rules generation."
else
@echo "Generating FILE_FILTERS rules."; \
$(call toc_generate_rules,FILE_FILTERS,$(FILE_FILTERS)) > $@
endif
-include $(FILE_FILTERS_INCFILE)
FILE_FILTERS:
--- NEW FILE: SCP.make ---
#!/do/not/make
#
# a toc snippet to help provide support for uploading stuff over scp
# It expects $(SCP_BIN) to be set via the configure process.
#
# Author: stephan - sg...@us...
#
# Usage:
#
# Define:
#
# SCP_TARGETS = target1 [...targetN]
# optional: SCP_FLAGS = flags to pass to scp, like -C to enable compression
# optional: SCP_REMOTE_LOGIN = user@host
# optional: SCP_REMOTE_PATH = /destination/path/on/remote
#
# For each target in SCP_TARGETS you must define the following:
# target1_SCP_FILES = list of files
# optional: target1_REMOTE_LOGIN = user@host
# optional: target1_REMOTE_PATH = /destination/path/on/remote
#
# At least one of SCP_REMOTE_xxx or target_REMOTE_xxx must be set,
# and the target_REMOTE_xxx takes precedence.
#
# To run all SCP targets:
# make SCP
# To run one of them:
# make scp-targetname
# or
# make SCP-targetname
# (they're the same)
#
# When adding/removing SCP_TARGETS you may need to 'rm .toc.SCP.make'
# so some generated rules don't cause Make to break before, e.g.,
# the rules can be recreated.
#
# Tip: it is sometimes useful to do this before including
# SCP.make:
# SCP_BIN := echo $(SCP_BIN)
#
SCP_MAKEFILE = $(TOC_MAKESDIR)/SCP.make
ifeq (,$(SCP_BIN))
$(warning you must define SCP_BIN before using the SCP targets. Try running the ssh_tools toc test.)
SCP:
$(patsubst %,scp-%,$(SCP_TARGETS)):
else
SCP_RULES_GENERATOR = $(TOC_MAKESDIR)/makerules.SCP
$(SCP_RULES_GENERATOR):
$(SCP_MAKEFILE):
SCP_INCFILE = .toc.SCP.make
CLEAN_FILES += $(SCP_INCFILE)
$(SCP_INCFILE): $(SCP_RULES_GENERATOR) $(SCP_MAKEFILE) Makefile
ifeq (1,$(MAKING_CLEAN))
@echo "$(MAKECMDGOALS): skipping SCP rules generation."
else
@echo "Generating SCP rules."; \
$(call toc_generate_rules,SCP,$(SCP_TARGETS)) > $@
endif
-include $(SCP_INCFILE)
.PHONY: SCP
SCP:
endif
# ^^^ end no-scp guard
--- NEW FILE: makerules.FILE_FILTERS ---
#!/do/not/bash
# creates makefile rules for use with FILE_FILTERS.make
# usage: $0 filtername [filtername2 ...]
# where filternameN is a filter defined in a client
# Makefile's $(FILE_FILTERS) var.
# This code, my friends, contains some mind-bending, completely
# unmaintainable shell-within-make-within-shell stuff.
test 0 = ${#@} && {
echo "usage: $0 filtername [filtername2 ...]"
exit 1
}
thisapp="\$(TOC_MAKESDIR)/makerules.FILE_FILTERS"
filters_makefile="\$(TOC_MAKESDIR)/FILE_FILTERS.make"
cat <<EOF
############################## FILTER_FILES rules:
# doh: these will break if \$(TOC_HOME) is not under \$(top_srcdir)
# (bzw, wenn \${USER} nicht Schreibrechte hat...)
${thisapp}: ; @touch \$@
${filters_makefile}: ; @touch \$@
FILE_FILTERS_TMPFILE = .toc.FILE_FILTERS.tmp
EOF
error_prefix="${filters_makefile}:"
for f in $@; do
fprefix=FILTER_${f}
cat <<EOF
############################## FILTER_FILES: ${f}
${f}_FILTER_DEPS += Makefile ${thisapp} ${filters_makefile}
${f}_FILTER_BIN ?= \$(FILE_FILTERS_BIN)
ifeq (,\$(${f}_FILTER_NAMESED))
\$(error ${error_prefix} ${f}_FILTER_NAMESED must be set to a sed expression. e.g. s/^prefix//)
endif
ifeq (,\$(${f}_FILTER_SOURCES))
\$(error ${error_prefix} ${f}_FILTER_SOURCES must be set to a list of input source files)
endif
ifeq (,\$(${f}_FILTER_BIN))
\$(error ${error_prefix} ${f}_FILTER_BIN must be set to filter application. e.g. perl or sed)
endif
ifeq (,\$(${f}_FILTER_RULES))
\$(error ${error_prefix} ${f}_FILTER_RULES must be a set of rules passable to ${f}_FILTER_BIN. e.g. for perl: -e 's|\btoken\b|replacement|g')
endif
${fprefix}_FILE_FILTERS_MAKE = .toc.FILE_FILTERS.${f}.make
${fprefix}_CLEAN_FILES += \$(${fprefix}_FILE_FILTERS_MAKE)
\$(${fprefix}_FILE_FILTERS_MAKE): \$(FILE_FILTERS_MAKEFILE)
ifeq (1,\$(MAKING_CLEAN))
@echo "\$(MAKECMDGOALS): skipping ${f}_FILTER_SOURCES rules generation."
else
@echo "Generating ${f}_FILTER_SOURCES rules."; \\
for i in \$(${f}_FILTER_SOURCES); do \\
tgt="\$\$(echo \$\${i} | sed -e '\$(${f}_FILTER_NAMESED)')"; \\
test "\$\$tgt" = "\$\${i}" -o -z "\$\$tgt" && { \\
echo "${f}_FILTER_SOURCES: name translation for the output file failed: sed rule [\$(${f}_FILTER_NAMESED)] for [\$\${i}] --> [\$\${tgt}]" 1>&2; \\
exit 1; \\
}; \\
echo "${fprefix}_CLEAN_FILES += \$\${tgt}"; \\
echo "\$\${tgt}_INPUT = \$\${i}"; \\
echo "${fprefix}_OUTPUT_RULES += \$\${tgt}"; \\
echo "\$\${tgt}: \$\${i} \$(${f}_FILTER_DEPS)"; \\
done > \$@
endif
-include \$(${fprefix}_FILE_FILTERS_MAKE)
# This suddenly strikes me as odd: writing shell code to generate makefile code which will end
# generating makefile code which we then re-import into make.
# Thus all the confusion regarding the \ and $ characters.
\$(${fprefix}_OUTPUT_RULES): %:\$(%_INPUT)#<--- i can't believe this works!
@echo -n "FILE_FILTERS ruleset '${f}': "; \\
\$(${f}_FILTER_BIN) \$(${f}_FILTER_RULES) < \$< > \$(FILE_FILTERS_TMPFILE); \\
cmp -s \$(FILE_FILTERS_TMPFILE) \$@ && rm \$(FILE_FILTERS_TMPFILE); \\
test -f \$(FILE_FILTERS_TMPFILE) \\
&& { mv \$(FILE_FILTERS_TMPFILE) \$@; echo "[updated] \$@"; } \\
|| { echo "[up to date] \$@"; };
# Note: the above target will always run if some non-input-file
# dependency is newer. That happens, for example, as i edit this shell
# script ;). Since i am a big advocate of "better rebuild than wonder
# if we're building the newest code", we're limited to two choices:
#
# a) touch $@, engendering immediate always-rebuild behaviour
# on files which depend on our output files.
# b) do nothing, and *potentially* get always-rebuild behaviour.
#
# Since only build tree maintainers should actually trigger this case,
# i've decided on taking route (b). Clients who actually see this
# happen can fix it with a 'make clean' or simply removing the
# filtered files in question and allowing them to be recreated.
${f}: \$(${fprefix}_OUTPUT_RULES)
# if it turns out that ${f}: produces multiple-rule conflicts, we can
# fall back to:
filter-${f}: \$(${fprefix}_OUTPUT_RULES)
CLEAN_FILES += \$(${fprefix}_CLEAN_FILES)
FILE_FILTERS: filter-${f}
EOF
done
--- NEW FILE: makerules.SCP ---
#!/bin/sh
# Creates makefile rules for use with SCP.make
test 0 = ${#@} && {
echo "usage: $0 target1 [... targetN]"
exit 1
}
thisapp="\$(TOC_MAKESDIR)/makerules.SCP"
filters_makefile="\$(TOC_MAKESDIR)/SCP.make"
echo "############################## SCP rules:"
for t in "$@"; do
cat <<EOF
ifeq (,\$(${t}_REMOTE_LOGIN))
${t}_REMOTE_LOGIN = \$(SCP_REMOTE_LOGIN)
endif
ifeq (,\$(${t}_REMOTE_PATH))
${t}_REMOTE_PATH = \$(SCP_REMOTE_PATH)
endif
ifeq (,\$(${t}_REMOTE_LOGIN))
\$(error Neither SCP_REMOTE_LOGIN nor ${t}_REMOTE_LOGIN have been set!)
endif
ifeq (,\$(${t}_REMOTE_PATH))
\$(error Neither SCP_REMOTE_PATH nor ${t}_REMOTE_PATH have been set!)
endif
ifeq (,\$(${t}_SCP_FILES))
\$(error ${t}_SCP_FILES must be set to a list of files to scp!)
endif
.PHONY: scp-${t} SCP-${t}
scp-${t}:
\$(SCP_BIN) \$(SCP_FLAGS) \$(${t}_SCP_FILES) \$(${t}_REMOTE_LOGIN):\$(${t}_REMOTE_PATH)
SCP: scp-${t}
SCP-${t}: scp-${t}
EOF
done
echo "############################## end SCP rules"
--- NEW FILE: qt_if_enabled.sh ---
configure_with_qt=${configure_with_qt-0}
toc_add_config_h HAVE_QT=0
toc_add_make configure_with_qt=${configure_with_qt}
test "x${configure_with_qt}" = "x0" && {
toc_posttest_feedback "Qt support has been explicitely disabled."
return 0
}
use_qt=${configure_with_qt-0}
test "x${configure_with_QTDIR}" = "x" || {
thedir="${configure_with_QTDIR-${QTDIR}}"
test -d $thedir || {
echo "Specified QTDIR does not exist: ${configure_with_QTDIR}"
return 1
}
use_qt=1
}
#echo "configure_with_qt=${configure_with_qt}"
#echo "configure_with_QTDIR=${configure_with_QTDIR}"
#echo "use_qt=$use_qt"
if test "$use_qt" = "0"; then
toc_posttest_feedback "Neither a valid --with-QTDIR=... nor --with-qt have been set. Not including Qt checks.";
return 0
fi
qt_required_version=${qt_required_version-'3.x'}
qt_required_version_glob=${qt_required_version_glob-'3.*'}
toc_source_test qt || {
err=$?
echo "Qt $qt_required_version not found."
return $err
}
configure_with_qt=1
toc_add_make configure_with_qt=${configure_with_qt}
toc_add_config_h HAVE_QT=1
return 0
Index: BIN_PROGRAMS.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/BIN_PROGRAMS.make,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- BIN_PROGRAMS.make 14 Oct 2003 03:15:18 -0000 1.1
+++ BIN_PROGRAMS.make 10 Dec 2003 19:45:20 -0000 1.2
@@ -11,14 +11,14 @@
#
# Then include this file:
#
-# include $(toc_makesdir)/cpp_bins.make
+# include $(TOC_MAKESDIR)/cpp_bins.make
#
# and add 'bins' somewhere in your dependencies, e.g.:
#
# all: bins
-BIN_PROGRAMS_MAKEFILE = $(toc_makesdir)/BIN_PROGRAMS.make
+BIN_PROGRAMS_MAKEFILE = $(TOC_MAKESDIR)/BIN_PROGRAMS.make
ifeq (1,$(configure_with_CYGWIN))
BIN_PROGRAMS_LDADD += -lcygwin
@@ -45,14 +45,13 @@
BIN_PROGRAMS_COMMON_DEPS += Makefile $(BIN_PROGRAMS_MAKEFILE) $(BIN_PROGRAMS_OBJECTS)
$(BIN_PROGRAMS_DEPSFILE): Makefile $(BIN_PROGRAMS_RULES_GENERATOR) $(BIN_PROGRAMS_MAKEFILE)
-ifneq (,$(strip $(filter distclean clean,$(MAKECMDGOALS))))
+ifeq (1,$(MAKING_CLEAN))
@echo "$(MAKECMDGOALS): skipping BIN_PROGRAMS rules generation."
else
@echo "Generating BIN_PROGRAMS rules."; \
$(call toc_generate_rules,BIN_PROGRAMS,$(BIN_PROGRAMS)) > $@
-
--include $(BIN_PROGRAMS_DEPSFILE)
endif
+-include $(BIN_PROGRAMS_DEPSFILE)
deps: $(BIN_PROGRAMS_DEPSFILE)
Index: C_DEPS.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/C_DEPS.make,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- C_DEPS.make 14 Oct 2003 03:15:18 -0000 1.1
+++ C_DEPS.make 10 Dec 2003 19:45:20 -0000 1.2
@@ -1,3 +1,4 @@
+#!/do/not/make
# makefile snippet
# Usage:
# include path/to/this/file
@@ -9,11 +10,11 @@
DEPS_C_SOURCES_GLOB ?= *.cpp *.c *.c++ *.C *.cc *.moc
SOURCE_FILES_TO_DEP ?= $(sort $(wildcard $(DEPS_C_SOURCES_GLOB)))
-TOC_C_DEPS_MAKEFILE = $(toc_makesdir)/C_DEPS.make
+TOC_C_DEPS_MAKEFILE = $(TOC_MAKESDIR)/C_DEPS.make
-DEPSGEN_BIN = $(toc_tocdir)/bin/mkdep
+DEPSGEN_BIN = $(TOC_HOME)/bin/mkdep
$(DEPSGEN_BIN): $(TOC_C_DEPS_MAKEFILE)
- @echo "Building $@"; cd $(toc_tocdir)/bin; \
+ @echo "Building $@"; cd $(TOC_HOME)/bin; \
$(CC) -o mkdep mkdep.c
ifneq (,$(SOURCE_FILES_TO_DEP))
Index: DOXYGEN.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/DOXYGEN.make,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- DOXYGEN.make 17 Nov 2003 22:33:38 -0000 1.3
+++ DOXYGEN.make 10 Dec 2003 19:45:20 -0000 1.4
@@ -34,7 +34,7 @@
DOXYFILE = Doxyfile
-doxygen_outdir = ./doxygen
+DOXYGEN_HTML_OUTDIR ?= ./doxygen
DOXYGEN_IN = Doxyfile.at
DIST_FILES += $(DOXYGEN_IN) index.txt
@@ -45,14 +45,15 @@
DOXYGEN_ATPARSE_ARGS += \
- top_srcdir=${top_srcdir} \
- top_libdir=${top_libdir} \
- top_includesdir=${top_includesdir} \
+ top_srcdir="${top_srcdir}" \
+ top_libdir="${top_libdir}" \
+ top_includesdir="${top_includesdir}" \
PERL="$(PERL)" \
- PACKAGE_NAME=$(PACKAGE_NAME) \
- PACKAGE_VERSION=$(PACKAGE_VERSION)\
+ PACKAGE_NAME="$(PACKAGE_NAME)" \
+ PACKAGE_VERSION="$(PACKAGE_VERSION)" \
PREDEFINED="$(DOXYGEN_PREDEF)" \
- DOXYGEN_FILTER=$(DOXYGEN_FILTER)
+ DOXYGEN_FILTER="$(DOXYGEN_FILTER)" \
+ DOXYGEN_HTML_OUTDIR="$(DOXYGEN_HTML_OUTDIR)"
DOXYGEN_MAKE = $(toc_makesdir)/DOXYGEN.make
@@ -72,15 +73,20 @@
DISTCLEAN_FILES += $(DOXYFILE)
doxygen: clean-doxygen $(DOXYFILE)
$(DOXYGEN_BIN)
- @echo Output is in $(doxygen_outdir) and ./latex.
+ @echo HTML output is in $(DOXYGEN_HTML_OUTDIR).
clean-doxygen:
- -rm -fr $(doxygen_outdir) latex
+ -rm -fr $(DOXYGEN_HTML_OUTDIR) latex
doxygen_finaldest = $(INSTALL_DOCS_DEST)/$(DOXYGEN_INSTALL_DIRNAME)
install-doxygen: doxygen
- @-test -d $(doxygen_finaldest) && rm -fr $(doxygen_finaldest)
- @echo "Installing docs to $(INSTALL_DOCS_DEST)/$(DOXYGEN_INSTALL_DIRNAME)"
- @cp -r $(doxygen_outdir) $(INSTALL_DOCS_DEST)/$(DOXYGEN_INSTALL_DIRNAME)
+ @echo "Installing HTML docs to $(doxygen_finaldest)"
+ @test -d $(doxygen_finaldest) && exit 0; rm -fr $(doxygen_finaldest)
+ @test -d $(INSTALL_DOCS_DEST) && exit 0; mkdir -p $(INSTALL_DOCS_DEST)
+ @cp -r $(DOXYGEN_HTML_OUTDIR) $(doxygen_finaldest)
+uninstall-doxygen:
+ @echo "Uninstalling doxgen-generated docs: $(doxygen_finaldest)"
+ @-test -d $(doxygen_finaldest) || exit 0; rm -fr $(doxygen_finaldest)
+uninstall: uninstall-doxygen
# all: docs
Index: INSTALL_XXX.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/INSTALL_XXX.make,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- INSTALL_XXX.make 14 Oct 2003 03:15:18 -0000 1.1
+++ INSTALL_XXX.make 10 Dec 2003 19:45:20 -0000 1.2
@@ -1,11 +1,13 @@
-#!/bin/make -f
+#!/do/not/make
+#
# To be included from the shared toc makefile.
+# Creates un/install rules for sets of files.
#
# Sample usage:
# INSTALL_BINS = mybin myotherbin # installs to $(prefix)/bin
# INSTALL_LIBS = mylib.a myotherlib.a # installs to $(prefix)/lib
#
-# There's a whole lot more to know, if you wanna poke around the code.
+# There's a *whole lot* more to know, if you wanna poke around the code.
#
# Design note: the traditional xxx-local targets aren't really
# necessary. If someone wants to customize install they can simply do
@@ -27,18 +29,21 @@
# arguments $(INSTALL_X_INSTALL_FLAGS). All of these vars are
# set up by default, but may be customized:
#
-# INSTALL_BINS_DEST = $(prefix)/$(PACKAGE_NAME)/bin
-# INSTALL_BINS_INSTALL_FLAGS = -m 0775
-#
+# INSTALL_X_DEST = $(prefix)/$(PACKAGE_NAME)/bin
+# INSTALL_X_INSTALL_FLAGS = -m 0775
#
# Installation can be further customized by using the toc_make_xxx
-# call()able functions.
-
-TOC_INSTALL_TARGET_BASENAMES = BINS SBINS LIBS PACKAGE_LIBS LIBEXECS HEADERS PACKAGE_HEADERS PACKAGE_DATA DOCS
+# call()able functions defined below...
+#
+#
+# It is not possible to add new install groups by simply modifying
+# TOC_INSTALL_TARGET_BASENAMES. See the INSTALL_XXX_PATHS var
+# and understand what it does before adding new file groups.
ifeq (,$(wildcard $(INSTALLER_BIN)))
-$(error INSTALL_XXX.make requires that the variable INSTALLER_BIN point to a version of install which is vaguely compatible with GNU install.)
+$(error INSTALL_XXX.make requires that the variable INSTALLER_BIN point to a version of install which is vaguely compatible with GNU install. \
+ Normally it will be set by the toc_core_tests configure test.)
endif
#INSTALL_BINS_SUFFIX ?=
@@ -46,11 +51,7 @@
#INSTALL_BINS_SUFFIX = .exe
#endif
-# This whole echo/grep thing is to force it to work on some of my
-# older machines where more sane approaches don't seem to work.
-# TOC_MAKE_INSTALL_GREP_KLUDGE = test $(shell echo $(1) "" | grep -q '[a-zA-Z0-9]'; echo $$?) = 0 || exit 0
-TOC_MAKE_INSTALL_GREP_KLUDGE =
-
+############################################################
# toc_make_install call()able:
# $1=file list
# $2=destdir
@@ -63,6 +64,7 @@
cmd="$(INSTALLER_BIN) $(3) $$b $$target"; echo $$cmd; $$cmd || exit; \
done
+############################################################
# toc_make_install_update: identical to toc_make_install
# but does not update the target if it is the same as the source.
toc_make_install_update = test "x$(1)" = x && exit 0; \
@@ -74,6 +76,7 @@
cmd="$(INSTALLER_BIN) $(3) $$b $$target"; echo "$$cmd"; $$cmd || exit; \
done
+############################################################
# toc_make_uninstall call()able:
# removes all files listed in $(1) from target directory $(2)
toc_make_uninstall = test "x$(1)" = x && exit 0; \
@@ -83,6 +86,7 @@
cmd="rm $$fp"; echo $$cmd; $$cmd || exit $$?; \
done
+############################################################
# toc_make_install_symlink call()able:
# Works similarly to toc_make_install, but symlinks back to the install source,
# instead of copying. Arg $3 is ignored.
@@ -100,6 +104,7 @@
echo "Symlinking $$target"; ln -s -f "$$src" "$$target" || exit $$?; \
done
+############################################################
# toc_make_install_so: installs foo.so.X.Y.Z and symlinks foo.so, foo.so.X and foo.so.X.Y to it,
# in traditional/common Unix style.
# $1 = so name (foo.so)
@@ -127,14 +132,38 @@
# ln -fs $(1).$(2) $(1); \
# }
+############# some phony targets...
+.PHONY: install-. uninstall-.
+subdirs-install: # implemented elsewhere
+install: install-. install-subdirs
+install-update: install-.-update install-subdirs-update
+install-symlink: install-.-symlink install-subdirs-symlink
+install-subdirs: subdirs-install
+install-subdirs-symlink: subdirs-install-symlink
+install-subdirs-update: subdirs-install-update
+uninstall-subdirs: subdirs-uninstall
+uninstall: uninstall-. uninstall-subdirs
+# implement these to hook in to the start of the install. Untested. :/
+install-.:
+install-.-update:
+install-.-symlink:
+uninstall-.:
+#############
+
+
+TOC_INSTALL_TARGET_BASENAMES += BINS SBINS LIBS PACKAGE_LIBS LIBEXECS HEADERS PACKAGE_HEADERS PACKAGE_DATA DOCS
+
+
+
+############ internal shortcuts:
INSTALLER_BIN_FLAGS_BINS = -m 0755
INSTALLER_BIN_FLAGS_NONBINS = -m 0644
INSTALLER_BIN_FLAGS_LIBS = -m 0644
INSTALLER_BIN_FLAGS_LIBEXECS = -m 0755
+###########
-
-# default install flags for the installable file categories:
+################# default install flags for the installable file categories:
INSTALL_BINS_INSTALL_FLAGS ?= $(INSTALLER_BIN_FLAGS_BINS)
INSTALL_SBINS_INSTALL_FLAGS ?= $(INSTALLER_BIN_FLAGS_BINS)
INSTALL_LIBS_INSTALL_FLAGS ?= $(INSTALLER_BIN_FLAGS_LIBS)
@@ -144,50 +173,40 @@
INSTALL_PACKAGE_HEADERS_INSTALL_FLAGS ?= $(INSTALLER_BIN_FLAGS_NONBINS)
INSTALL_PACKAGE_INSTALL_FLAGS ?= $(INSTALLER_BIN_FLAGS_NONBINS)
INSTALL_DOCS_INSTALL_FLAGS ?= $(INSTALLER_BIN_FLAGS_NONBINS)
+#################
+################# paths, in the format expected by makerules.INSTALL_XXX
+INSTALL_XXX_PATHS += \
+ BINS=bin \
+ SBINS=sbin \
+ LIBS=lib \
+ PACKAGE_LIBS='lib/$(PACKAGE_NAME)' \
+ LIBEXECS=lib \
+ HEADERS=include \
+ PACKAGE_HEADERS='include/$(PACKAGE_NAME)' \
+ PACKAGE_DATA='share/$(PACKAGE_NAME)' \
+ DOCS='share/doc/$(PACKAGE_NAME)'
+# Note: LIBEXECS=lib is intentional: i figure that since there is no /usr/libexec
+# nor /libexec, the traditional usage of LIBEXEC is probably "broken".
+#################
-INSTALL_MAKEFILE = $(toc_makesdir)/INSTALL_XXX.make
-INSTALL_DEPS_FILE = $(toc_makesdir)/.toc.INSTALL_XXX.make
-INSTALL_XXX_GENERATOR = $(dir $(INSTALL_MAKEFILE))makerules.INSTALL_XXX
+################ Internal use:
# Set install paths for the installable file categories
# and create installation rules. With make 3.80 we can do this with $(eval),
# Make 3.79 is very common, but doesn't support $(eval).
-# todo? move this into the configure process?
+INSTALL_MAKEFILE = $(TOC_MAKESDIR)/INSTALL_XXX.make
+INSTALL_DEPS_FILE = $(top_srcdir)/.toc.INSTALL_XXX.make
+INSTALL_XXX_GENERATOR = $(TOC_MAKESDIR)/makerules.INSTALL_XXX
$(INSTALL_DEPS_FILE): $(INSTALL_MAKEFILE) $(INSTALL_XXX_GENERATOR)
-ifneq (,$(strip $(filter clean distclean,$(MAKECMDGOALS))))
-# @echo "$(MAKECMDGOALS): skipping INSTALL_XXX rules generation."
+ifeq (1,$(MAKING_CLEAN))
+ @echo "$(MAKECMDGOALS): skipping INSTALL_XXX rules generation."
else
@echo "Generating rules for INSTALL_XXX."; \
$(call toc_generate_rules,INSTALL_XXX,\
- BINS=bin \
- SBINS=sbin \
- LIBS=lib \
- PACKAGE_LIBS='lib/$$(PACKAGE_NAME)' \
- LIBEXECS=lib \
- HEADERS=include \
- PACKAGE_HEADERS='include/$$(PACKAGE_NAME)' \
- PACKAGE_DATA='share/$$(PACKAGE_NAME)' \
- DOCS='share/doc/$$(PACKAGE_NAME)' \
+ $(INSTALL_XXX_PATHS) \
) > $@
endif
-include $(INSTALL_DEPS_FILE)
deps: $(INSTALL_DEPS_FILE)
-
-.PHONY: install-. uninstall-.
-subdirs-install: # implemented elsewhere
-install: install-. install-subdirs
-install-update: install-.-update install-subdirs-update
-install-symlink: install-.-symlink install-subdirs-symlink
-install-subdirs: subdirs-install
-install-subdirs-symlink: subdirs-install-symlink
-install-subdirs-update: subdirs-install-update
-uninstall-subdirs: subdirs-uninstall
-
-uninstall: uninstall-. uninstall-subdirs
-
-# implement these to hook in to the start of the install. Untested. :/
-install-.:
-install-.-update:
-install-.-symlink:
-uninstall-.:
+#################
Index: Makefile
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/Makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Makefile 28 Sep 2003 16:00:39 -0000 1.6
+++ Makefile 10 Dec 2003 19:45:20 -0000 1.7
@@ -2,10 +2,5 @@
default: all
include toc.make
-DIST_FILES += $(wildcard *.make) toc.make.at toc.qmake.at
+DIST_FILES += $(wildcard *.make *.at makerules.*)
-DIST_FILES += makerules.STATIC_LIBS \
- makerules.BIN_PROGRAMS \
- makerules.SHARED_LIBS \
- makerules.INSTALL_XXX \
- makerules.C_BINS_FROM_SOURCES
Index: NAMESPACE.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/NAMESPACE.make,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- NAMESPACE.make 28 Nov 2003 01:08:38 -0000 1.6
+++ NAMESPACE.make 10 Dec 2003 19:45:20 -0000 1.7
@@ -1,5 +1,8 @@
#!/do/not/make
#
+# Don't use this: use FILTER_FILES.make instead. It's more generic
+# and easier to control/predict.
+#
# A snippet to help filter source code files to replace a namespace.
# Usage:
# define:
@@ -17,12 +20,16 @@
$(error You must set the variable NAMESPACE before including this file.)
endif
-NAMESPACE_MAKE = $(toc_makesdir)/NAMESPACE.make
+NAMESPACE_MAKE = $(TOC_MAKESDIR)/NAMESPACE.make
NAMESPACE_TMPFILE = .toc.NAMESPACE.tmp
NAMESPACE_FILTERED_FILES += $(patsubst $(NAMESPACE_PREFIX)%,%,$(NAMESPACE_FILES))
CLEAN_FILES += $(NAMESPACE_FILTERED_FILES)
-$(NAMESPACE_FILTERED_FILES): %: $(NAMESPACE_PREFIX)% Makefile $(top_srcdir)/toc.$(PACKAGE_NAME).make $(NAMESPACE_MAKE)
+# todo: use a makerules.NAMESPACE approach so deps can be set properly and
+# we can avoid using the filenames as the targets (it currently causes rules
+# conflicts with, e.g., C_DEPS).
+NAMESPACE_TARGETS = $(NAMESPACE_FILTERED_FILES)
+$(NAMESPACE_TARGETS): %: $(NAMESPACE_PREFIX)% Makefile $(top_srcdir)/toc.$(PACKAGE_NAME).make $(NAMESPACE_MAKE)
@nsf=$<; \
echo -ne "namespace $(NAMESPACE): "; \
sed -e 's,$(NAMESPACE_TOKEN),$(NAMESPACE),g' < $$nsf > $(NAMESPACE_TMPFILE); \
Index: SHARED_LIBS.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/SHARED_LIBS.make,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- SHARED_LIBS.make 14 Oct 2003 03:15:18 -0000 1.1
+++ SHARED_LIBS.make 10 Dec 2003 19:45:20 -0000 1.2
@@ -7,7 +7,7 @@
# foo_so_LDADD = # optional libraries passed to linker (e.g., -lstdc++)
# foo_so_LDFLAGS = # optional args to linker
# foo_so_VERSION = # optional Major.Minor.Patch # e.g. "1.0.1" it MUST match this format!
-# include $(toc_makesdir)/cpp_dynamic_libs.make
+# include $(TOC_MAKESDIR)/cpp_dynamic_libs.make
#
# If foo_so_VERSION is not set then no numbered symlinks will be created.
#
@@ -18,7 +18,7 @@
# Creates foo.so and foo.so<version> by linking $(foo_so_OBJECTS). It
# also sets up install/uninstall rules for handling the symlinks.
-SHARED_LIBS_MAKEFILE = $(toc_makesdir)/SHARED_LIBS.make
+SHARED_LIBS_MAKEFILE = $(TOC_MAKESDIR)/SHARED_LIBS.make
# toc_link_shared_lib
# $1 = basename
@@ -69,7 +69,7 @@
SHARED_LIBS_DEPSFILE = .toc.SHARED_LIBS.make
deps: $(SHARED_LIBS_INSTALL_RULES)
$(SHARED_LIBS_DEPSFILE): Makefile $(SHARED_LIBS_MAKEFILE) $(SHARED_LIBS_RULES_GENERATOR)
-ifneq (,$(strip $(filter distclean clean,$(MAKECMDGOALS))))
+ifeq (1,$(MAKING_CLEAN))
@echo "$(MAKECMDGOALS): skipping SHARED_LIBS rules generation."
else
@echo "Generating SHARED_LIBS rules."; \
Index: STATIC_LIBS.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/STATIC_LIBS.make,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- STATIC_LIBS.make 14 Oct 2003 03:15:18 -0000 1.1
+++ STATIC_LIBS.make 10 Dec 2003 19:45:20 -0000 1.2
@@ -16,7 +16,7 @@
#
# that creates foo.a and bar.a and adds those files to $(INSTALL_LIBS)
-STATIC_LIBS_MAKEFILE = $(toc_makesdir)/STATIC_LIBS.make
+STATIC_LIBS_MAKEFILE = $(TOC_MAKESDIR)/STATIC_LIBS.make
STATIC_LIBS_A = $(patsubst %,%.a,$(STATIC_LIBS))
CLEAN_FILES += $(STATIC_LIBS_A)
@@ -33,7 +33,7 @@
STATIC_LIBS:
$(STATIC_LIBS_DEPSFILE): Makefile $(STATIC_LIBS_MAKEFILE) $(STATIC_LIBS_RULES_GENERATOR)
-ifneq (,$(strip $(filter distclean clean,$(MAKECMDGOALS))))
+ifeq (1,$(MAKING_CLEAN))
@echo "$(MAKECMDGOALS): skipping STATIC_LIBS rules generation."
else
@echo "Generating STATIC_LIBS rules."; \
Index: lyxport.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/lyxport.make,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- lyxport.make 25 Aug 2003 18:24:26 -0000 1.2
+++ lyxport.make 10 Dec 2003 19:45:20 -0000 1.3
@@ -1,12 +1,15 @@
#!/usr/bin/make -f
-
+# Don't use this:
+# a) it requires GNU Make 3.80 or newer (to use $(eval)).
+# b) it needs to be rewritten, in any case.
+#
# usage:
# define:
# LXY_FILES = list of lyx files
#
# all lyx-pdf lyx-html lyx-ps
-LYX2X_MAKEFILE = $(toc_makesdir)/lyxport.make
+LYX2X_MAKEFILE = $(TOC_MAKESDIR)/lyxport.make
ifeq (,$(wildcard $(LYXPORT_BIN)))
$(error this makefile requires LYXPORT_BIN. Try running the lyxport test.)
endif
Index: makerules.SHARED_LIBS
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/makerules.SHARED_LIBS,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- makerules.SHARED_LIBS 14 Oct 2003 03:14:51 -0000 1.4
+++ makerules.SHARED_LIBS 10 Dec 2003 19:45:20 -0000 1.5
@@ -10,11 +10,14 @@
for t in $@; do
sofile=$t.so
cat <<EOF
-# ${t}_so_VERSION ?= 0.0.0
ifneq (,\$(${t}_so_VERSION))
${t}_so_MAJOR ?= \$(word 1,\$(subst ., ,\$(${t}_so_VERSION)))
${t}_so_MINOR ?= \$(word 2,\$(subst ., ,\$(${t}_so_VERSION)))
${t}_so_PATCH ?= \$(word 3,\$(subst ., ,\$(${t}_so_VERSION)))
+else
+${t}_so_MAJOR ?= 0
+${t}_so_MINOR ?= 0
+${t}_so_PATCH ?= 0
endif
${sofile}: \$(SHARED_LIBS_COMMON_DEPS) \$(${t}_so_OBJECTS)
Index: subdirs_traverser.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/subdirs_traverser.make,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- subdirs_traverser.make 14 Oct 2003 03:14:51 -0000 1.14
+++ subdirs_traverser.make 10 Dec 2003 19:45:20 -0000 1.15
@@ -1,5 +1,7 @@
-# makefile snippet
-# sample usage:
+#!/do/not/make
+# ^^^ help out emacs
+# Makefile snippet to traverse subdirs.
+# Sample usage:
# default: all
# SUBDIRS = foo bar
# include path/to/subdirs_traverser.make
@@ -11,8 +13,8 @@
# targets. Adding to the SUBDIRS var later doesn't affect which targets
# get created, but ARE necessary for targets like install-subdirs :/.
#
-# DO NOT put "." in the SUBDIRS!
-#
+# DO NOT put "." in the SUBDIRS! Instead, client Makefiles completely
+# control dir build order via dependencies.
# toc_make_subdirs call()able function:
@@ -26,9 +28,8 @@
tgt="$(2)"; test x = "x$$tgt" && tgt="all"; \
for b in $(1) "x"; do test "x" = "$$b" && break; \
pwd=$$(pwd); \
- echo "Making $$tgt in $$pwd/$${b}"; \
- cd $$pwd/$$b || exit; \
- ${MAKE} $(MAKE_NOP_ARG) $$tgt || exit; \
+ echo "Making $$tgt in $${b}"; \
+ ${MAKE} -C $${b} $(MAKE_NOP_ARG) $$tgt || exit; \
cd $$pwd || exit; \
done
Index: toc.make.at
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/toc.make.at,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- toc.make.at 31 Aug 2003 20:27:08 -0000 1.5
+++ toc.make.at 10 Dec 2003 19:45:20 -0000 1.6
@@ -3,23 +3,110 @@
# toc.make.at: template makefile for toc.make, a core concept of the
# toc build process. This is filtered at the end of the configure
# process. toc.make must be included by your Makefiles.
+#
+# All of the "at-vars" in this file are expected to come in
+# via the configure process, either from core tests or from
+# the core itself.
+#
+# Ideally this file should be free of project-specific code:
+# put that in $(top_srcdir)/toc.$(PACKAGE_NAME).make.at and
+# in $(top_srcdir)/configure.$(PACKAGE_NAME) run:
+# toc_run_fail toc_project_makefile
+
+
+SHELL = @SHELL@
default: all
all:
FORCE: ; @true
-prefix = @prefix@
-top_srcdir = @TOC_TOP_SRCDIR@
-toc_tocdir = $(top_srcdir)/toc
-toc_makesdir = $(toc_tocdir)/make
-toc_bindir = $(toc_tocdir)/bin
+ifneq (,$(strip $(filter distclean clean,$(MAKECMDGOALS))))
+ MAKING_CLEAN = 1
+else
+ MAKING_CLEAN = 0
+endif
-TOC_SHARED_MAKEFILE = $(top_srcdir)/@TOC_SHARED_MAKEFILE@
-include $(TOC_SHARED_MAKEFILE)
+#PACKAGE_VERSION = @PACKAGE_VERSION@
+#PACKAGE_NAME = @PACKAGE_NAME@
+
+top_srcdir = @TOP_SRCDIR@
+
+
+PACKAGE_NAME = @PACKAGE_NAME@
+##### include configure-created code:
+toc_config_vars = $(top_srcdir)/toc.$(PACKAGE_NAME).configure.make
+include $(toc_config_vars)
+###### ^^^^ this breaks if $(TOC_HOME) is not directly under $(top_srcdir) :/
+
+##### some conventional vars:
+prefix ?= @prefix@
+top_includesdir = $(top_srcdir)/include
+top_libdir = $(top_srcdir)/lib
+top_bindir = $(top_srcdir)/bin
+
+
+
+toc_project_makefile = $(wildcard $(top_srcdir)/toc.$(PACKAGE_NAME).make)
+toc_project_makefile_at = $(wildcard $(top_srcdir)/toc.$(PACKAGE_NAME).make.at)
+
+TOC_HOME ?= @TOC_HOME@
+# todo: check if this is under $(top_srcdir), so we can make this path relative.
+
+##### deprecated:
+toc_topdir ?= $(TOC_HOME)
+toc_makesdir ?= $(TOC_HOME)/make
+toc_bindir ?= $(TOC_HOME)/bin
+# replacements are below...
+#####
+
+TOC_MAKESDIR = $(TOC_HOME)/make
+TOC_BINDIR = $(TOC_HOME)/bin
+TOC_SBINDIR = $(TOC_HOME)/sbin
TOC_PWD_FROM_TOPSRC = @TOC_RELATIVE_DIR@
-DISTCLEAN_FILES += $(wildcard toc.make toc.qmake)
-CLEAN_FILES += $(wildcard .toc.*)
+# e.g., in lib/foo, TOC_PWD_FROM_TOPSRC == lib/foo
+
+TOC_MAKE = toc.make
+TOP_TOC_MAKE = $(top_srcdir)/$(TOC_MAKE)
+
+
+
+############################################################
+# Experimental: auto-run configure if we think we need to
+# Run configure with --enable-auto-reconfigure to get it.
+ifeq (1,$(configure_enable_auto_reconfigure))
+$(TOC_MAKE): $(TOC_MAKESDIR)/$(TOC_MAKE).at \
+ $(toc_project_makefile_at) \
+ $(top_srcdir)/configure $(top_srcdir)/configure.$(PACKAGE_NAME)
+ @echo "$@ dependencies updated: [$?]. Reconfiguring..."; \
+ touch $@; ${MAKE} toc-reconfigure
+toc-reconfigure: $(TOC_MAKE)
+ cd $(top_srcdir); ./configure $(CONFIGURE_ARGUMENTS)
+
+ifneq (,$(toc_config_vars))
+$(toc_config_vars): $(TOC_MAKE)
+endif
+endif
+# end autoreconfigure
+############################################################3
+
+
+##### some core utilities:
+AWK_BIN = @AWK@
+PERL_BIN = @PERL@
+SED_BIN = @SED@
+TAR_BIN = @TAR@
+GZIP_BIN = @GZIP@
+BZIP_BIN = @BZIP@
+ZIP_BIN = @ZIP@
+INSTALLER_BIN = @INSTALLER_BIN@
+TOC_MAKEDIST_BIN = @TOC_MAKEDIST_BIN@
+
+
+
+
+configure_build_quietly = @configure_build_quietly@
+# configure_build_quietly is a SUGGESTION for some code to be less verbose.
DIST_FILES += Makefile
@@ -27,14 +114,56 @@
TOC_EMOTICON_WARNING= @TOC_EMOTICON_WARNING@
TOC_EMOTICON_ERROR=@TOC_EMOTICON_ERROR@
-toc_project_makefile = $(wildcard $(top_srcdir)/toc.$(PACKAGE_NAME).make)
-ifneq (,$(toc_project_makefile))
-include $(toc_project_makefile)
+
+
+
+
+
+# TOC_SHARED_MAKEFILE is deprecated!
+TOC_SHARED_MAKEFILE = $(wildcard $(top_srcdir)/@TOC_SHARED_MAKEFILE@)
+ifneq (,$(TOC_SHARED_MAKEFILE))
+ include $(TOC_SHARED_MAKEFILE)
+endif
+
+CLEAN_FILES += $(wildcard .toc.* core *~)
+DISTCLEAN_FILES += $(wildcard \
+ $(TOC_MAKE) toc.qmake \
+ $(TOC_SHARED_MAKEFILE) toc_shared.qmake \
+ toc.$(PACKAGE_NAME).make \
+ )
+
+ifeq (.,$(top_srcdir))
+ DISTCLEAN_FILES += toc.$(PACKAGE_NAME).configure.make
endif
-# toc_include_make call()able function:
-# $1 = base name
-# toc_include_makefile = include $(top_srcdir)/toc/make/$(1).make
-# missing separator error on $(call)ing it???
+##################################################### some common C/C++ stuff:
+# C*FLAGS come from the gnu_cpp_tools toc test:
+CONFIG_H = $(wildcard $(top_includesdir)/config.h)
+INCLUDES += -I.
+
+ifneq (,$(CONFIG_H))
+ INCLUDES += -I$(top_srcdir)/include
+ CPPFLAGS += -DHAVE_CONFIG_H=1
+endif
+ifeq (1,$(configure_cpp_debug))
+ CPPFLAGS += -g
+endif
+CPPFLAGS += $(INCLUDES) $(WARN) $(CFLAGS_OPT)
+##################################################### end C/C++ stuff
+
+
+include $(TOC_MAKESDIR)/toc_functions.make
+include $(TOC_MAKESDIR)/cleaner.make
+include $(TOC_MAKESDIR)/subdirs_traverser.make
+include $(TOC_MAKESDIR)/C_DEPS.make
+include $(TOC_MAKESDIR)/INSTALL_XXX.make
+include $(TOC_MAKESDIR)/dist.make
+
+
+
+#### finally, get the project-specific code:
+ifneq (,$(toc_project_makefile))
+ include $(toc_project_makefile)
+endif
Index: toc_functions.make
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/make/toc_functions.make,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- toc_functions.make 27 Sep 2003 22:34:03 -0000 1.3
+++ toc_functions.make 10 Dec 2003 19:45:20 -0000 1.4
@@ -11,7 +11,7 @@
# $1 = input template
# $2 = output file
# $3 = list of properties, e.g. FOO=bar BAR=foo
-TOC_ATPARSER_BIN = $(toc_bindir)/atsign_parse
+TOC_ATPARSER_BIN = $(TOC_BINDIR)/atsign_parse
ifeq (,$(wildcard $(TOC_ATPARSER_BIN)))
$(error Could not find TOC_ATPARSER_BIN at $(TOC_ATPARSER_BIN)!)
endif
@@ -28,8 +28,8 @@
# Sample:
# .toc.foo.deps:
# $(toc_generate_rules,foo,arg1=val1 -arg2)
-# Executes script $(toc_makesdir)/makerules.foo, passing it $(2).
-toc_generate_rules = $(SHELL) $(toc_makesdir)/makerules.$(1) $(2)
+# Executes script $(TOC_MAKESDIR)/makerules.foo, passing it $(2).
+toc_generate_rules = $(SHELL) $(TOC_MAKESDIR)/makerules.$(1) $(2)
# the $(SHELL) prefix here is a kludge: systems where /bin/sh is Bourne
# fail to build, but the nature of the errors makes it quite difficult
# to track down where the failure is. The side-effect of this kludge
@@ -39,7 +39,7 @@
# toc_get_makefile_var call()able:
# $1 = VAR_NAME
# $2 = optional filename (defaults to Makefile)
-toc_get_makefile_var = $(shell $(toc_tocdir)/bin/getMakefileVar $(1) $(2))
+toc_get_makefile_var = $(shell $(TOC_HOME)/bin/getMakefileVar $(1) $(2))
#toc_get_makefile_var = $(shell fn=$(2); test -z "$$fn" && fn=Makefile; ${MAKE} -np -f $$fn | grep '^$(1)')
######################################################################
|