You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(58) |
Sep
(79) |
Oct
(41) |
Nov
(80) |
Dec
(23) |
---|
From: <sg...@us...> - 2003-12-10 21:14:42
|
Update of /cvsroot/libfunutil/libfunutil/toc/tests In directory sc8-pr-cvs1:/tmp/cvs-serv32211/toc/tests Modified Files: toc_make.sh Log Message: mass commit: an absolute boatload of build-related fixes. Index: toc_make.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/toc_make.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- toc_make.sh 10 Dec 2003 19:43:25 -0000 1.1 +++ toc_make.sh 10 Dec 2003 21:14:39 -0000 1.2 @@ -1,14 +1,22 @@ #!/do/not/bash -# toc_run_description = creating toc.make +# toc_run_description = creating included makefiles # Do not run this test manually: it is run by the toc core. TOC_MAKE=toc.make +TOC_QMAKE=toc.qmake + toc_add_make TOC_MAKE=${TOC_MAKE} +toc_add_make TOC_QMAKE=${TOC_QMAKE} +# set -x function toc_make_toc_make { # use a function because bash doesn't allow local vars outside of functions. + local usage="usage: arg1==target makefile basename. arg2=input template" + local themake=${1?$usage} + local themakein=${2?$usage} + echo "Creating $themake ... " local makeprops=${TOP_SRCDIR}/.toc.make.tmp toc_dump_make_properties > $makeprops local thedir @@ -16,9 +24,11 @@ local relpath local shortform local tocmakeprops - for d in $(find ${TOP_SRCDIR} -name Makefile -o -name GNUMakefile -o -name Makefile.toc | xargs grep -l "^include ${TOC_MAKE}" | sort); do + for d in $(find ${TOP_SRCDIR} -name Makefile -o -name GNUMakefile -o -name Makefile.toc -o -name '*.qmake' \ + | xargs grep -E -l "include.+${themake}" | sort -u); do + #echo "d=$d" >&2 thedir=$(dirname $d) - tocmake=${thedir}/${TOC_MAKE} + tocmake=${thedir}/$themake toc_makerelative $thedir relpath=${TOC_MAKERELATIVE} tocmake=${tocmake##$TOP_SRCDIR/} # make it short, for asthetic reasons :/ @@ -28,18 +38,36 @@ tocmakeprops=${cmake}.props cp $makeprops $tocmakeprops - cat <<EOF >> $tocmakeprops TOP_SRCDIR=${relpath##./} TOC_RELATIVE_DIR=${shortform##./} EOF - toc_atfilter_file $tocmakeprops ${TOC_HOME}/make/toc.make.at $tocmake \ - || toc_die $? "Error creating toc.make!" + toc_atfilter_file $tocmakeprops $themakein $tocmake \ + || toc_die $? "Error creating $themake!" rm $tocmakeprops touch $tocmake # required for proper auto-reconfigure :/ done } -toc_make_toc_make +toc_make_toc_make ${TOC_MAKE} ${TOC_HOME}/make/toc.make.at +err=$? +test $err != 0 && { + echo "Error creating ${TOC_MAKE} makefiles!" + return $err +} + +test -f ${TOP_SRCDIR}/toc.${PACKAGE_NAME}.qmake.at && { + toc_make_toc_make ${TOC_QMAKE} ${TOC_HOME}/make/toc.qmake.at + err=$? + test $err != 0 && { + echo "Error creating ${TOC_QMAKE} makefiles!" + return $err + } +} + +return $err + + + |
From: <sg...@us...> - 2003-12-10 21:14:42
|
Update of /cvsroot/libfunutil/libfunutil/toc/make In directory sc8-pr-cvs1:/tmp/cvs-serv32211/toc/make Modified Files: toc.qmake.at Log Message: mass commit: an absolute boatload of build-related fixes. Index: toc.qmake.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/make/toc.qmake.at,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- toc.qmake.at 28 Aug 2003 09:15:25 -0000 1.1 +++ toc.qmake.at 10 Dec 2003 21:14:39 -0000 1.2 @@ -1,6 +1,45 @@ # toc.qmake.at: template makefile for toc.qmake, part of the # toc build process. This is filtered at the end of the configure # process. toc.qmake may be included by your qmake files. +# +# many of the $$vars seen here come from toc.@PACKAGE_NAME@.make, +# and all @TOKENS@ are replaced at configure-time. -top_srcdir = @TOC_TOP_SRCDIR@ -include( @TOC_SHARED_QMAKEFILE@ ) +top_srcdir = @TOP_SRCDIR@ + +include( $$top_srcdir/toc.@PACKAGE_NAME@.configure.make ) + + + +QTDIR = @QTDIR@ +QTBINDIR = @QTBINDIR@ +QTINCDIR = @QTINCDIR@ +QTLIBDIR = @QTLIBDIR@ +# -lqt (or -lqt-mt?) if we have Qt, nothing if we don't. +LQT = @LQT@ +UIC = @UIC@ +MOC = @MOC@ +QMAKE = @QMAKE@ + + +############################ most of this comes from the gnu_cpp_tools toc test: +CC = @CC@ +INCLUDES += @INCLUDES@ +# C preprocessor flags, used in compiling C & C++ files. +CPPFLAGS += @CPPFLAGS@ +CPPFLAGS += $$INCLUDES -DHAVE_CONFIG_H=1 +# Optimization flags (-g or -On) used in compiling C & C++ files. +OPT = @OPT@ +# Warning flags (-Wall, -Werror, -woff, etc.) used in compiling C & C++ files. +WARN = @WARN@ +# C flags, used in compiling C files. Includes $$OPT and $$WARN. +QMAKE_CFLAGS += @CFLAGS@ +QMAKE_CFLAGS += $$OPT $$WARN +# C++ flags, used in compiling C++ files. Includes $$OPT and $$WARN. +QMAKE_CXXFLAGS += @CXXFLAGS@ +QMAKE_CXXFLAGS += $$OPT $$WARN +# ld flags, used in linking binaries. +QMAKE_LFLAGS += @LDFLAGS@ +########################### + +include( $$top_srcdir/toc.@PACKAGE_NAME@.qmake ) |
From: <sg...@us...> - 2003-12-10 21:14:42
|
Update of /cvsroot/libfunutil/libfunutil/lib/toolbox In directory sc8-pr-cvs1:/tmp/cvs-serv32211/lib/toolbox Modified Files: Makefile Log Message: mass commit: an absolute boatload of build-related fixes. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/toolbox/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 28 Nov 2003 01:35:49 -0000 1.4 +++ Makefile 10 Dec 2003 21:14:39 -0000 1.5 @@ -1,13 +1,19 @@ +#!/usr/bin/make include toc.make -# maintenance notes: -# imported via toc: +######################### +# Maintenance notes: +# expected via toc: # $(TOOLBOX_NAMESPACE) TOOLBOX_NAMESPACE ?= toolbox -NAMESPACE_PREFIX = src/ +################ the real sources are stored here: + NAMESPACE_PREFIX = src/ +################ and the namespace is filtered out via FILE_FILTERS. + +NAMESPACE = $(TOOLBOX_NAMESPACE) NS_SOURCES = $(addprefix $(NAMESPACE_PREFIX),\ argv_parser.cpp \ @@ -22,6 +28,7 @@ NS_HEADERS = $(addprefix $(NAMESPACE_PREFIX),\ + aliaser.h \ any.h \ argv_parser.h \ children_holder.h \ @@ -40,24 +47,51 @@ ) -#ifeq (1,$(configure_enable_zlib)) -NS_SOURCES += $(NAMESPACE_PREFIX)gzstream.cpp -NS_HEADERS += $(NAMESPACE_PREFIX)gzstream.h -#endif -#ifeq (1,$(configure_enable_bzlib)) -NS_SOURCES += $(NAMESPACE_PREFIX)bzstream.cpp -NS_HEADERS += $(NAMESPACE_PREFIX)bzstream.h -#endif +################################# got zlib? +configure_enable_zlib ?= $(HAVE_ZLIB) +GZ_CPP = $(NAMESPACE_PREFIX)gzstream.cpp +GZ_H = $(NAMESPACE_PREFIX)gzstream.h +ifeq (1,$(configure_enable_zlib)) +zlib: + @echo "FYI: zlib support is enabled." + NS_SOURCES += $(GZ_CPP) + NS_HEADERS += $(GZ_H) +else +zlib: + @echo "FYI: zlib support is DISABLED." + DIST_FILES += $(GZ_CPP) $(GZ_H) +endif +################################# /zlib + +################################## got bzip? +configure_enable_bzlib ?= $(HAVE_BZLIB) +BZ_CPP = $(NAMESPACE_PREFIX)bzstream.cpp +BZ_H = $(NAMESPACE_PREFIX)bzstream.h +ifeq (1,$(configure_enable_bzlib)) +bzlib: + @echo "FYI: bz2lib support is enabled." + NS_SOURCES += $(BZ_CPP) + NS_HEADERS += $(BZ_H) +else +bzlib: + @echo "FYI: bz2lib support is DISABLED." + DIST_FILES += $(BZ_CPP) $(BZ_H) +endif +################################# /bzip + SOURCES = $(patsubst $(NAMESPACE_PREFIX)%,%,$(NS_SOURCES)) HEADERS = $(patsubst $(NAMESPACE_PREFIX)%,%,$(NS_HEADERS)) -CLEAN_FILES += $(SOURCES) $(HEADERS) -NAMESPACE = $(TOOLBOX_NAMESPACE) -NAMESPACE_TOKEN = TOOLBOX_NAMESPACE -NAMESPACE_FILES = $(NS_SOURCES) $(NS_HEADERS) -include $(toc_makesdir)/NAMESPACE.make +FILE_FILTERS = namespace +namespace_FILTER_RULES = -e 's|TOOLBOX_NAMESPACE|$(TOOLBOX_NAMESPACE)|g' +namespace_FILTER_NAMESED = s,$(NAMESPACE_PREFIX),, +namespace_FILTER_SOURCES = $(NS_SOURCES) $(NS_HEADERS) +namespace-notice: + @echo "Package namespace is $(TOOLBOX_NAMESPACE)." +FILE_FILTERS: namespace-notice +include $(TOC_MAKESDIR)/FILE_FILTERS.make top_srcdir_absolute = $(shell cd $(top_srcdir) && pwd) @@ -74,16 +108,16 @@ "EDIT AT YOUR OWN RISK!\n" \ "***********************************************************************/" > $@ @echo "Creating printf implementations..." - $(PERL_BIN) ./makePrintf $(EPRINTF_COUNT) >> $@ + $(PERL_BIN) ./makePrintf $(EPRINTF_COUNT) $(TOOLBOX_NAMESPACE) >> $@ INSTALL_PACKAGE_HEADERS_DEST = $(prefix)/include/$(TOOLBOX_NAMESPACE) -INSTALL_PACKAGE_HEADERS = $(HEADERS) $(EPRINTF) +INSTALL_PACKAGE_HEADERS += $(HEADERS) $(EPRINTF) SYMLINK_HEADERS = $(INSTALL_PACKAGE_HEADERS) SYMLINK_HEADERS_DEST = $(top_srcdir)/include/$(TOOLBOX_NAMESPACE) -include $(toc_makesdir)/symlink_headers.make +include $(TOC_MAKESDIR)/symlink_headers.make OBJECTS = $(patsubst %.cpp,%.o,$(SOURCES)) @@ -91,10 +125,5 @@ DIST_FILES += $(NS_SOURCES) $(NS_HEADERS) makePrintf class_names -# DIST_FILES += LoadableClass.cpp LoadableClass.h LoadableSubClass.cpp - - -all: $(SOURCES) $(HEADERS) $(EPRINTF) symlink-headers $(OBJECTS) -# SHARED_LIBS -# $(ENM_NAMESFILE) +all: FILE_FILTERS $(EPRINTF) symlink-headers zlib bzlib $(OBJECTS) |
From: <sg...@us...> - 2003-12-10 21:14:42
|
Update of /cvsroot/libfunutil/libfunutil/lib/funUtil In directory sc8-pr-cvs1:/tmp/cvs-serv32211/lib/funUtil Modified Files: Makefile Log Message: mass commit: an absolute boatload of build-related fixes. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/funUtil/Makefile,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Makefile 29 Aug 2003 05:38:23 -0000 1.22 +++ Makefile 10 Dec 2003 21:14:38 -0000 1.23 @@ -46,7 +46,7 @@ all: headers qmake libs-static $(SUBDIRS) atparser = $(top_srcdir)/toc/bin/atsign_parse -fun-config.h: fun-config.h.in $(top_srcdir)/toc_shared.make +fun-config.h: fun-config.h.in $(top_srcdir)/toc.$(PACKAGE_NAME).make @$(call toc_atparse_file,fun-config.h.in,$@, \ FUN_UTIL_WITH_QT=$(FUN_UTIL_WITH_QT) \ FUN_API_QSTRING=$(FUN_API_QSTRING) \ |
From: <sg...@us...> - 2003-12-10 21:14:42
|
Update of /cvsroot/libfunutil/libfunutil/lib/cl/src In directory sc8-pr-cvs1:/tmp/cvs-serv32211/lib/cl/src Modified Files: class_loader.h Log Message: mass commit: an absolute boatload of build-related fixes. Index: class_loader.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/cl/src/class_loader.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- class_loader.h 10 Dec 2003 19:41:55 -0000 1.1 +++ class_loader.h 10 Dec 2003 21:14:38 -0000 1.2 @@ -459,8 +459,9 @@ See CLASSLOADER_REGISTER[1-5] if you want to customize the registration behaviour or register one class with multiple KeyT's. */ +#define CL_NAMESPACE_CLASSLOADER_REGISTER(BaseT,SubT) CL_NAMESPACE_CLASSLOADER_REGISTER2(BaseT,SubT) #ifndef CLASSLOADER_REGISTER -# define CLASSLOADER_REGISTER(BaseT,SubT) CLASSLOADER_REGISTER2(BaseT,SubT) +# define CLASSLOADER_REGISTER(BaseT,SubT) CL_NAMESPACE_CLASSLOADER_REGISTER(BaseT,SubT) #endif // CLASSLOADER_REGISTER[1-6]: |
From: <sg...@us...> - 2003-12-10 21:14:41
|
Update of /cvsroot/libfunutil/libfunutil/lib/cl In directory sc8-pr-cvs1:/tmp/cvs-serv32211/lib/cl Modified Files: Makefile Log Message: mass commit: an absolute boatload of build-related fixes. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/cl/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 29 Nov 2003 13:47:12 -0000 1.4 +++ Makefile 10 Dec 2003 21:14:38 -0000 1.5 @@ -52,7 +52,17 @@ NAMESPACE = $(CL_NAMESPACE) NAMESPACE_TOKEN = CL_NAMESPACE NAMESPACE_FILES = $(NS_SOURCES) $(NS_HEADERS) -include $(toc_makesdir)/NAMESPACE.make +# include $(TOC_MAKESDIR)/NAMESPACE.make + +FILE_FILTERS = namespace +namespace_FILTER_RULES = -e 's|CL_NAMESPACE|$(CL_NAMESPACE)|g' +namespace_FILTER_SOURCES = $(wildcard src/*.cpp src/*.h) +namespace_FILTER_NAMESED = s,src/,, +namespace-notice: + @echo "Package namespace is $(CL_NAMESPACE)." +FILE_FILTERS: namespace-notice +include $(TOC_MAKESDIR)/FILE_FILTERS.make + INSTALL_PACKAGE_HEADERS_DEST = $(prefix)/include/$(CL_NAMESPACE) @@ -60,7 +70,7 @@ ifeq (1,0) PRECOMPILED_HEADERS_CXX = $(HEADERS) - include $(toc_makesdir)/PCH.make + include $(TOC_MAKESDIR)/PCH.make ifeq (1,$(USE_PCH)) SYMLINK_HEADERS += $(addsuffix .gch,$(PRECOMPILED_HEADERS_CXX)) endif @@ -69,7 +79,7 @@ endif SYMLINK_HEADERS += $(INSTALL_PACKAGE_HEADERS) SYMLINK_HEADERS_DEST = $(top_srcdir)/include/$(CL_NAMESPACE) -include $(toc_makesdir)/symlink_headers.make +include $(TOC_MAKESDIR)/symlink_headers.make OBJECTS = $(addsuffix .o,class_loader path_finder) @@ -86,10 +96,9 @@ # LoadableClass_so_LDADD = $(LIBCL_CLIENT_LDADD) LoadableSubClass_so_OBJECTS = LoadableSubClass.o LoadableSubClass_so_LDADD = $(LIBCL_CLIENT_LDADD) -DIST_FILES += LoadableSubClass.cpp LoadableClass.h LoadableClass.cpp -include $(toc_makesdir)/SHARED_LIBS.make -include $(toc_makesdir)/STATIC_LIBS.make +include $(TOC_MAKESDIR)/SHARED_LIBS.make +include $(TOC_MAKESDIR)/STATIC_LIBS.make INSTALL_LIBEXECS = lib$(LIBCL_LIBNAME).so.$(lib$(LIBCL_LIBNAME)_so_VERSION) # ^^^ re-set the list to remove Loadable*.*, which are automatically added by SHARED_LIBS @@ -98,12 +107,12 @@ test_cl_bin_OBJECTS = cl_demo.o LoadableClass.o cl_demo_cpp_CPPFLAGS += -DCLASSLOADER_DEBUG=1 test_cl_bin_LDADD = $(LIBCL_CLIENT_LDADD) -include $(toc_makesdir)/BIN_PROGRAMS.make +include $(TOC_MAKESDIR)/BIN_PROGRAMS.make INSTALL_BINS = # ^^^ we don't want cl_demo installed, and BIN_PROGRAMS does that by default -all: NAMESPACE PCH symlink-headers deps $(OBJECTS) SHARED_LIBS STATIC_LIBS BIN_PROGRAMS +all: FILE_FILTERS PCH symlink-headers deps $(OBJECTS) SHARED_LIBS STATIC_LIBS BIN_PROGRAMS @echo "When running the test_cl binary be sure to set your LD_LIBRARY_PATH to include ${PWD}!" @echo "Running the 'test' target does this for you." # $(ENM_NAMESFILE) |
From: <sg...@us...> - 2003-12-10 21:14:41
|
Update of /cvsroot/libfunutil/libfunutil/build In directory sc8-pr-cvs1:/tmp/cvs-serv32211/build Modified Files: Makefile Log Message: mass commit: an absolute boatload of build-related fixes. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/build/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 5 Sep 2003 05:52:50 -0000 1.1 +++ Makefile 10 Dec 2003 21:14:38 -0000 1.2 @@ -9,7 +9,7 @@ DIST_FILES += Makefile.bt $(RPM_SPECFILE_IN) rpmmacros atparser = $(top_srcdir)/toc/bin/atsign_parse -$(RPM_SPECFILE): $(RPM_SPECFILE_IN) $(top_srcdir)/toc_shared.make +$(RPM_SPECFILE): $(RPM_SPECFILE_IN) $(top_srcdir)/toc.$(PACKAGE_NAME).make $(call toc_atparse_file,$@.in,$@, \ BT_PKG_NAME=$(PACKAGE_NAME) BT_PKG_VERSION=$(PACKAGE_VERSION) \ BT_PROG_PERL=$(PERL_BIN)) |
From: <sg...@us...> - 2003-12-10 21:14:41
|
Update of /cvsroot/libfunutil/libfunutil/include In directory sc8-pr-cvs1:/tmp/cvs-serv32211/include Modified Files: config.h.at Log Message: mass commit: an absolute boatload of build-related fixes. Index: config.h.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/include/config.h.at,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- config.h.at 14 Oct 2003 03:11:17 -0000 1.7 +++ config.h.at 10 Dec 2003 21:14:38 -0000 1.8 @@ -33,6 +33,6 @@ // ^^^^ from the bzlib test #define DEFAULT_DLLLOADER_PATH "@DEFAULT_DLLLOADER_PATH@" -#define S11N_LIBRARY_VERSION "@PACKAGE_VERSION@" +#define @S11N_NAMESPACE@_S11N_LIBRARY_VERSION "@PACKAGE_VERSION@" #endif // CONFIG_H_INCLUDED |
From: <sg...@us...> - 2003-12-10 21:14:41
|
Update of /cvsroot/libfunutil/libfunutil In directory sc8-pr-cvs1:/tmp/cvs-serv32211 Modified Files: Makefile configure.libfunutil toc.libfunUtil.make.at toc_shared.make.at toc_shared.qmake.at Log Message: mass commit: an absolute boatload of build-related fixes. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile 14 Oct 2003 03:11:17 -0000 1.14 +++ Makefile 10 Dec 2003 21:14:38 -0000 1.15 @@ -21,7 +21,7 @@ DISTCLEAN_FILES += *~ toc_shared.make toc_shared.qmake -DIST_FILES += configure toc_shared.make.at toc_shared.qmake.at +DIST_FILES += configure $(wildcard *.at) DIST_FILES += configure.$(PACKAGE_NAME) DIST_FILES += README README.bt README.toc COPYING CHANGES ifeq (1,$(configure_with_buildtool)) Index: configure.libfunutil =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/configure.libfunutil,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- configure.libfunutil 23 Nov 2003 19:04:37 -0000 1.23 +++ configure.libfunutil 10 Dec 2003 21:14:38 -0000 1.24 @@ -10,9 +10,9 @@ toc_add_config PACKAGE_COPYRIGHT="GNU General Public License, version 2. Copyright (c) 2000-2003 Rusty Ballinger (bo...@so...) and stephan beal (sg...@us...)." -INCLUDES="$INCLUDES -I\$(top_srcdir)/include" +# INCLUDES="$INCLUDES -I\$(top_srcdir)/include" # XXX this one is temporary -LDFLAGS="$LDFLAGS -L\$(top_srcdir)/lib/fun" +# LDFLAGS="$LDFLAGS -L\$(top_srcdir)/lib/funUtil" toc_run_fail gnu_cpp_tools @@ -76,6 +76,6 @@ echo ============================================================== toc_run_fail toc_project_makefile - +toc_run_fail toc_project_makefile toc.${PACKAGE_NAME}.qmake return 0 Index: toc.libfunUtil.make.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc.libfunUtil.make.at,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- toc.libfunUtil.make.at 19 Nov 2003 22:40:09 -0000 1.2 +++ toc.libfunUtil.make.at 10 Dec 2003 21:14:38 -0000 1.3 @@ -1,10 +1,45 @@ #!/do/not/make #^^^ only to help emacs out. +INCLUDES += -I$(top_srcdir)/include + CLEAN_FILES += $(wildcard *.o *~) configure_enable_s11n = @configure_enable_s11n@ ifeq (1,$(configure_enable_s11n)) include $(top_srcdir)/toc.s11n.make -endif \ No newline at end of file +endif + +SET_LD_LIBRARY_PATH = LD_LIBRARY_PATH="$(top_srcdir)/lib/funUtil:$$LD_LIBRARY_PATH" + +# enable/disable 'buildtool'. This is here because i can't do +# a make dist because some BT-related files are missing. ;) +configure_with_buildtool = @configure_with_buildtool@ +ifeq (1,$(configure_with_buildtool)) +BUILDTOOL_BIN = @BUILDTOOL_BIN@ +else +BUILDTOOL_BIN = +endif + +# Qt stuff. +QTDIR = @QTDIR@ +QTBINDIR = @QTBINDIR@ +QTINCDIR = @QTINCDIR@ +QTLIBDIR = @QTLIBDIR@ +# -lqt (or -lqt-mt?) if we have Qt, nothing if we don't. +LQT = @LQT@ +UIC = @UIC@ +MOC = @MOC@ +QMAKE = @QMAKE@ + +# fun API stuff. Well, not fun as in the fun kind of fun. +FUN_UTIL_WITH_QT = @FUN_UTIL_WITH_QT@ +FUN_API_QSTRING = @FUN_API_QSTRING@ +FUN_API_STD_STRING = @FUN_API_STD_STRING@ + + + +DISTCLEAN_FILES += @TOC_MAKEFILE@ @TOC_DISTCLEAN_FILES@ toc.qmake moc_*.cpp *.moc.cpp +CLEAN_FILES += *~ $(OBJECTS) +DIST_FILES += Makefile Index: toc_shared.make.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc_shared.make.at,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- toc_shared.make.at 17 Nov 2003 20:27:18 -0000 1.25 +++ toc_shared.make.at 10 Dec 2003 21:14:38 -0000 1.26 @@ -1,123 +1,8 @@ #!/usr/bin/make # ^^^ this is only to help emacs -# toc_shared.make.at is the template file for toc_shared.make. -# The .at file is processed by the configure script -# to create toc_shared.make. Makefiles should have this line: -# -# include toc.make -# -# and configure will take care of getting toc_shared.make included. -# -# Note that toc.make is auto-generated and will create these vars before -# this file is include: -# -# top_srcdir = relative path to top of build tree -# TOC_SHARED_MAKEFILE = relative path to toc_shared.make. You normally shouldn't need this. -# -# Keep in mind that this is a real makefile, and may contain any makefile -# constructs. - -default: all -all: - -SHELL = @SHELL@ - -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_LICENSE = @PACKAGE_LICENSE@ -PACKAGE_COPYRIGHT = @PACKAGE_COPYRIGHT@ - -toc_tocdir = $(top_srcdir)/toc -# ^^^^ todo? assign this from toc_core.sh? - -top_includesdir = $(top_srcdir)/include -top_libdir = $(top_srcdir)/lib -top_bindir = $(top_srcdir)/bin -SET_LD_LIBRARY_PATH = LD_LIBRARY_PATH="$(top_srcdir)/lib/funUtil:$$LD_LIBRARY_PATH" - -# these are mainly for autotools compatibility: -prefix = @prefix@ -exec_prefix = ${prefix} -bindir = $(exec_prefix)/bin -sbindir = ${exec_prefix}/sbin -libexecdir = ${exec_prefix}/libexec -datadir = ${prefix}/share -sysconfdir = ${prefix}/etc -sharedstatedir = ${prefix}/com -localstatedir = ${prefix}/var -libdir = ${exec_prefix}/lib -infodir = ${prefix}/info -mandir = ${prefix}/man -includedir = ${prefix}/include -oldincludedir = /usr/include -pkgdatadir = $(datadir)/@PACKAGE_NAME@ -pkglibdir = $(libdir)/@PACKAGE_NAME@ -pkgincludedir = $(includedir)/@PACKAGE_NAME@ -pkgdocsdir = $(datadir)/doc/@PACKAGE_NAME@ - -toc_makesdir = $(toc_tocdir)/make - - -# enable/disable 'buildtool'. This is here because i can't do -# a make dist because some BT-related files are missing. ;) -configure_with_buildtool = @configure_with_buildtool@ -ifeq (1,$(configure_with_buildtool)) -BUILDTOOL_BIN = @BUILDTOOL_BIN@ -else -BUILDTOOL_BIN = -endif - - -CC = @CC@ -INCLUDES += @INCLUDES@ -# C preprocessor flags, used in compiling C & C++ files. -CPPFLAGS += @CPPFLAGS@ -CPPFLAGS += $(INCLUDES) -DHAVE_CONFIG_H=1 -# Optimization flags (-g or -On) used in compiling C & C++ files. -OPT = @OPT@ -# Warning flags (-Wall, -Werror, -woff, etc.) used in compiling C & C++ files. -WARN = @WARN@ -# C flags, used in compiling C files. Includes $(OPT) and $(WARN). -CFLAGS += @CFLAGS@ -CFLAGS += $(OPT) $(WARN) -# C++ flags, used in compiling C++ files. Includes $(OPT) and $(WARN). -CXXFLAGS += @CXXFLAGS@ -CXXFLAGS += $(OPT) $(WARN) -# ld flags, used in linking binaries. -LDFLAGS += @LDFLAGS@ - -AWK_BIN = @AWK@ -PERL_BIN = @PERL@ -SED_BIN = @SED@ -TAR_BIN = @TAR@ -GZIP_BIN = @GZIP@ -INSTALLER_BIN = @INSTALLER_BIN@ - -DOXYGEN_BIN = @DOXYGEN_BIN@ - -# Qt stuff. -QTDIR = @QTDIR@ -QTBINDIR = @QTBINDIR@ -QTINCDIR = @QTINCDIR@ -QTLIBDIR = @QTLIBDIR@ -# -lqt (or -lqt-mt?) if we have Qt, nothing if we don't. -LQT = @LQT@ -UIC = @UIC@ -MOC = @MOC@ -QMAKE = @QMAKE@ - -# fun API stuff. Well, not fun as in the fun kind of fun. -FUN_UTIL_WITH_QT = @FUN_UTIL_WITH_QT@ -FUN_API_QSTRING = @FUN_API_QSTRING@ -FUN_API_STD_STRING = @FUN_API_STD_STRING@ - - +# obsoleted by the new dump-everything approach toc takes for config vars. +# Project-specific code should go in toc.$(PACKAGE_NAME).make.at -DISTCLEAN_FILES += @TOC_MAKEFILE@ @TOC_DISTCLEAN_FILES@ toc.qmake moc_*.cpp *.moc.cpp -CLEAN_FILES += *~ $(OBJECTS) -DIST_FILES += Makefile -include $(toc_makesdir)/toc_mainincludes.make -include $(toc_makesdir)/tests.make Index: toc_shared.qmake.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc_shared.qmake.at,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- toc_shared.qmake.at 29 Aug 2003 10:40:17 -0000 1.6 +++ toc_shared.qmake.at 10 Dec 2003 21:14:38 -0000 1.7 @@ -1,44 +1,2 @@ +# OBSOLETE. Use toc.$(PACKAGE_NAME).qmake.at instead. -INCLUDEPATH += $$top_srcdir/include - -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACKAGE_NAME = @PACKAGE_NAME@ - -FUN_LIB_DIR = $$top_srcdir/lib/funUtil -FUN_LIB_SO = $$FUN_LIB_DIR/libfunUtil.so - -CONFIG += qt warn_off debug - -QTDIR = @QTDIR@ -QTBINDIR = @QTBINDIR@ -QTINCDIR = @QTINCDIR@ -QTLIBDIR = @QTLIBDIR@ -# -lqt (or -lqt-mt?) if we have Qt, nothing if we don't. -LQT = @LQT@ -UIC = @UIC@ -MOC = @MOC@ -QMAKE = @QMAKE@ - -CC = @CC@ -INCLUDES += @INCLUDES@ -# C preprocessor flags, used in compiling C & C++ files. -CPPFLAGS += @CPPFLAGS@ -CPPFLAGS += $$INCLUDES -DHAVE_CONFIG_H=1 -# Optimization flags (-g or -On) used in compiling C & C++ files. -OPT = @OPT@ -# Warning flags (-Wall, -Werror, -woff, etc.) used in compiling C & C++ files. -WARN = @WARN@ -# C flags, used in compiling C files. Includes $$OPT and $$WARN. -QMAKE_CFLAGS += @CFLAGS@ -QMAKE_CFLAGS += $$OPT $$WARN -# C++ flags, used in compiling C++ files. Includes $$OPT and $$WARN. -QMAKE_CXXFLAGS += @CXXFLAGS@ -QMAKE_CXXFLAGS += $$OPT $$WARN -# ld flags, used in linking binaries. -LDFLAGS += @LDFLAGS@ - - -exists( $$QTDIR/lib/libqt-mt* ) { - # message( "Configuring for multi-threaded Qt..." ) - CONFIG += thread -} |
From: <sg...@us...> - 2003-12-10 21:13:35
|
Update of /cvsroot/libfunutil/libfunutil In directory sc8-pr-cvs1:/tmp/cvs-serv31927 Added Files: toc.libfunUtil.qmake.at Log Message: egg --- NEW FILE: toc.libfunUtil.qmake.at --- FUN_LIB_DIR = $$top_srcdir/lib/funUtil FUN_LIB_SO = $$FUN_LIB_DIR/libfunUtil.so INCLUDEPATH += $$top_srcdir/include CONFIG += qt warn_off debug QMAKE_LFLAGS += -L$$FUN_LIB_DIR SET_LD_LIBRARY_PATH = LD_LIBRARY_PATH="$$top_srcdir/lib/funUtil:$$LD_LIBRARY_PATH" exists( $$QTDIR/lib/libqt-mt* ) { # message( "Configuring for multi-threaded Qt..." ) CONFIG += thread } |
From: <sg...@us...> - 2003-12-10 19:57:09
|
Update of /cvsroot/libfunutil/libfunutil/lib/toolbox/src In directory sc8-pr-cvs1:/tmp/cvs-serv16731/lib/toolbox/src Added Files: aliaser.h Log Message: egg --- NEW FILE: aliaser.h --- #ifndef TOOLBOX_NAMESPACE_ALIASER_H_INCLUDED #define TOOLBOX_NAMESPACE_ALIASER_H_INCLUDED 1 #include <map> #include <string> #include <TOOLBOX_NAMESPACE/debuggering_macros.h> // COUT/CERR namespace TOOLBOX_NAMESPACE { /** aliaser is a helper class for mapping single-token aliases to arbitrary strings, e.g., similarly to typical Unix shell alias support. Parameterized on: - ContextType: all aliasers with the same ContextType share the same aliases map. This class was written to support the creation of a command-line-interface framework, thus it is designed to allow disparate shell components to get at the same aliases easily, without having to track an instance all around the world. */ template <typename ContextType> struct aliaser { typedef ContextType context_type; typedef std::map<std::string,std::string> map_type; typedef aliaser<ContextType> ThisType; /** Returns the map of aliases-to-expansions. */ static map_type & map() { static map_type bob; return bob; } /** Aliases <code>al</code> as a shortcut for <code>expanded</code>. al should be exactly one token. */ static void alias( const std::string & al, const std::string & expanded ) { // CERR << "alias("<<al<<",["<<expanded<<"])"<<std::endl; if( expanded.empty() ) { map_type::iterator it = map().find( al ); if( map().end() != it ) { map().erase( it ); } return; } map()[al] = expanded; } /** Works similarly to Unix shells' alias expansion: Expands the input token as an alias. This expansion continues until the token can no longer be expanded to a new string. It returns the expanded string, which may be identical to the input. input should be exactly one token. */ static std::string expand( const std::string & input ) { if( input.empty() ) return input; string arg = input.substr( 0, input.find_first_of(" \t\n") ); map_type::const_iterator it = map().find( arg ); if( map().end() == it ) { return input; } string code = (*it).second; if( code == arg ) { return arg; } string tmp = code + ( (arg.size() == input.size()) ? string() : input.substr( arg.size() ) ); // skip the first token // CERR << "alias resolution for ["<<input<<"] = ["<<tmp<<"]"<<std::endl; // not thread safe: static unsigned int loopblocker = 0; if( ++loopblocker > 9 ) { CERR << "******************** WARNING ********************\n" << "expand() has been through "<<loopblocker << " iterations. That's probably too many, so we're aborting alias expansion. " << "You probably have aliases which expand to each other. Please check this content for possible problems: ["<<input<<"]." << "\nIf you believe this to be a bug, please fix it in " << __FILE__ <<", line " <<__LINE__<<"." << endl; loopblocker = 0; return tmp; } tmp = expand( tmp ); --loopblocker; return tmp; } private: aliaser(){} ~aliaser(){} aliaser & operator=( const aliaser & ); // not implemented aliaser( const aliaser & ); // not implemented }; } // namespace TOOLBOX_NAMESPACE #endif // TOOLBOX_NAMESPACE_ALIASER_H_INCLUDED |
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)') ###################################################################### |
Update of /cvsroot/libfunutil/libfunutil/toc/tests In directory sc8-pr-cvs1:/tmp/cvs-serv14493/toc/tests Modified Files: Makefile check_dist_md5s.sh doxygen.sh gcc_build_and_run.sh gcc_try_compile.sh gnu_cpp_tools.sh libltdl.sh lyxport.sh qt.sh toc_core_tests.sh Log Message: mass commit: fixes/changes from toc/s11n/cl trees. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 27 Sep 2003 22:34:03 -0000 1.2 +++ Makefile 10 Dec 2003 19:45:20 -0000 1.3 @@ -1,6 +1,6 @@ +SUBDIRS = cpp c include toc.make -SUBDIRS = cpp DIST_FILES += $(wildcard *.sh) all: subdirs Index: check_dist_md5s.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/check_dist_md5s.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- check_dist_md5s.sh 31 Aug 2003 21:38:57 -0000 1.1 +++ check_dist_md5s.sh 10 Dec 2003 19:45:20 -0000 1.2 @@ -15,7 +15,7 @@ md5=${TOC_FIND_RESULT} tmp=.toc.checkmd5.foo ret=0 -$md5 --check $fn > $tmp || { +$md5 -c $fn > $tmp || { grep FAILED $tmp echo "md5 check failed! Your distribution does not seem to be an unmodified copy of ${PACKAGE_NAME}!" ret=1 Index: doxygen.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/doxygen.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- doxygen.sh 29 Aug 2003 05:30:58 -0000 1.4 +++ doxygen.sh 10 Dec 2003 19:45:20 -0000 1.5 @@ -11,19 +11,18 @@ fi if test "x${configure_with_doxygen}" = x || test "x${configure_with_doxygen}" = x1; then - toc_find_in_path doxygen $PATH > /dev/null - DOXYGEN_BIN=$TOC_FIND_RESULT + toc_find_in_path doxygen "$PATH" && DOXYGEN_BIN=${TOC_FIND_RESULT} elif test "x${configure_with_doxygen}" = x0; then - DOXYGEN_BIN= + DOXYGEN_BIN= else - if test -x ${configure_with_doxygen}; then - DOXYGEN_BIN="${configure_with_doxygen}" + if test -x ${configure_with_doxygen}; then + DOXYGEN_BIN="${configure_with_doxygen}" else - # I hate shell scripts!! - echo '--with-doxygen "'"${configure_with_doxygen}"'" isn'"'t executable!" - toc_add_make DOXYGEN_BIN= - return 1 - fi + # I hate shell scripts!! + echo '--with-doxygen "'"${configure_with_doxygen}"'" isn'"'t executable!" + toc_add_make DOXYGEN_BIN= + return 1 + fi fi toc_add_make DOXYGEN_BIN="$DOXYGEN_BIN" return 0 Index: gcc_build_and_run.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/gcc_build_and_run.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gcc_build_and_run.sh 14 Oct 2003 03:13:48 -0000 1.1 +++ gcc_build_and_run.sh 10 Dec 2003 19:45:20 -0000 1.2 @@ -1,4 +1,4 @@ -# toc_run_description = trying to build $@ +# toc_run_description = $@ # # toc_begin_help = # Index: gcc_try_compile.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/gcc_try_compile.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gcc_try_compile.sh 27 Sep 2003 22:34:39 -0000 1.1 +++ gcc_try_compile.sh 10 Dec 2003 19:45:20 -0000 1.2 @@ -1,4 +1,4 @@ -# toc_run_description = trying to compile $@ +# toc_run_description = $@ # # toc_begin_help = # Index: gnu_cpp_tools.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/gnu_cpp_tools.sh,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gnu_cpp_tools.sh 9 Oct 2003 22:20:54 -0000 1.12 +++ gnu_cpp_tools.sh 10 Dec 2003 19:45:20 -0000 1.13 @@ -18,6 +18,7 @@ # - INCLUDES probably empty # - CPPFLAGS probably empty # - OPT -g or -O2 (or some other value specified by --enable-debug) +# CFLAGS_OPT - same as OPT (prefered for naming's sake) # - WARN -Wall (or some other value specified by --enable-warn or --enable-werror) # - CFLAGS probably empty (or maybe -pipe) # - CXXFLAGS probably empty (or maybe -pipe) @@ -60,7 +61,9 @@ # They specified some flags. OPT="$configure_enable_debug" fi + toc_add_make OPT="$OPT" +toc_add_make CFLAGS_OPT="$OPT" if test "$configure_enable_warn" = 1; then WARN="-Wall $WARN" Index: libltdl.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/libltdl.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- libltdl.sh 17 Nov 2003 18:23:28 -0000 1.1 +++ libltdl.sh 10 Dec 2003 19:45:20 -0000 1.2 @@ -17,13 +17,13 @@ toc_add_config LDADD_LIBLTDL= err=1 -toc_run_failok gcc_build_and_run toc/tests/c/check_for_ltdlopen_and_friends.c -export-dynamic -lltdl && { +toc_run_failok gcc_build_and_run ${TOC_HOME}/tests/c/check_for_ltdlopen_and_friends.c -export-dynamic -lltdl && { err=0 toc_add_config HAVE_LIBLTDL=1 toc_add_config LDADD_LIBLTDL=-lltdl } -toc_run_failok gcc_build_and_run toc/tests/c/check_for_dlopen_and_friends.c -export-dynamic -ldl && { +toc_run_failok gcc_build_and_run ${TOC_HOME}/tests/c/check_for_dlopen_and_friends.c -export-dynamic -ldl && { err=0 toc_add_config HAVE_LIBDL=1 toc_add_config LDADD_LIBDL=-ldl Index: lyxport.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/lyxport.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- lyxport.sh 30 Aug 2003 19:20:31 -0000 1.4 +++ lyxport.sh 10 Dec 2003 19:45:20 -0000 1.5 @@ -18,14 +18,14 @@ return 1 } configure_with_lyxport=${configure_with_lyxport-0} -path=${PATH}:${TOC_TOCDIR}/bin +path=${PATH}:${TOC_HOME}/bin toc_find_failok lyxport $path || { echo "lyxport not found. You can possibly find lyxport at http://www-hep.colorado.edu/~fperez/lyxport" return 1 } lyxport=${TOC_FIND_RESULT} -lyxport_makefile=${TOC_TOCDIR}/make/lyxport.make +lyxport_makefile=${TOC_HOME}/make/lyxport.make toc_find_failok $lyxport_makefile || { echo "lyxport requires $lyxport_makefile" return 1 Index: qt.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/qt.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- qt.sh 30 Aug 2003 19:19:35 -0000 1.6 +++ qt.sh 10 Dec 2003 19:45:20 -0000 1.7 @@ -1,4 +1,4 @@ -# toc_run_description = looking for Qt libraries and headers +# toc_run_description = looking for Qt $1 # toc_begin_help = # Calls toc_add_make for the following: # - QTINCDIR directory containing Qt headers Index: toc_core_tests.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/toc_core_tests.sh,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- toc_core_tests.sh 27 Sep 2003 22:34:03 -0000 1.10 +++ toc_core_tests.sh 10 Dec 2003 19:45:20 -0000 1.11 @@ -1,3 +1,4 @@ +#!/do/not/bash # toc_run_description = Looking for required build components... # toc_begin_help = # To be sourced from toc_core.sh. This is the core sanity checker for @@ -31,11 +32,12 @@ return 1 } -toc_find_fail install-sh ${TOC_TOCDIR}/bin -toc_add_make INSTALLER_BIN="\$(top_srcdir)/${TOC_FIND_RESULT##${PWD}/}" +toc_find_fail install-sh ${TOC_HOME}/bin +# toc_add_make INSTALLER_BIN="\$(top_srcdir)/${TOC_FIND_RESULT##${PWD}/}" +toc_add_make INSTALLER_BIN="${TOC_FIND_RESULT}" -toc_find_fail makedist ${TOC_TOCDIR}/bin -toc_add_make TOC_MAKEDIST_BIN="\$(top_srcdir)/${TOC_FIND_RESULT##${PWD}/}" +toc_find_fail makedist ${TOC_HOME}/bin +toc_add_make TOC_MAKEDIST_BIN="${TOC_FIND_RESULT}" # it's very arguable to make makedist a required component :/ for x in \ |
From: <sg...@us...> - 2003-12-10 19:45:24
|
Update of /cvsroot/libfunutil/libfunutil/toc/sbin In directory sc8-pr-cvs1:/tmp/cvs-serv14493/toc/sbin Modified Files: toc_core.sh toconfigure Log Message: mass commit: fixes/changes from toc/s11n/cl trees. Index: toc_core.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/sbin/toc_core.sh,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- toc_core.sh 19 Nov 2003 22:15:09 -0000 1.30 +++ toc_core.sh 10 Dec 2003 19:45:20 -0000 1.31 @@ -1,46 +1,54 @@ -# This file is sourced by configure. Do not run it standalone. +# This file is sourced by configure. Do not run it standalone: +# it is designed to be sources from the toconfigure script. +# # It contains the implementation of the toc API. # - +# # All global vars defined in this file are, unless otherwise noted, # considered private - configure is not supposed to touch them # directly, nor are test scripts. +# +# Sourcing this file from anywhere other than toconfigure will have undefined +# results. +# -# Sourcing this file from anywhere other than configure will have undefined -# results. :/ - -export prefix=${prefix-${TOC_PREFIX-/usr/local}} -# prefix will be overridden by the command-line arg --prefix=/path +######################################################################## +# maintenance notes: +# +# vars expected from toconfigure: +# TOC_HOME - path to toc's top dir +# TOP_SRCDIR - directory we want to configure from (e.g., top-most +# dir of a source tree). TOC_QUIET=${TOC_QUIET-0} TOC_LOUD=${TOC_LOUD-0} -TOC_TOPDIR=${TOC_TOPDIR-${PWD}} -TOC_INCLUDESDIR=${TOC_TOPDIR}/include - -TOC_TOCDIR=${TOC_TOPDIR}/toc -PATH=${TOC_TOCDIR}/bin:${PATH} -TOC_TESTSDIR=${TOC_TOCDIR}/tests -TOC_MAKEFILES_DIR=$TOC_TOCDIR/make +export prefix=${prefix-${TOC_PREFIX-/usr/local}} +# prefix will be overridden by the command-line arg --prefix=/path +TOC_INCLUDESDIR=${TOP_SRCDIR}/include +TOC_TESTSDIR=${TOC_HOME}/tests +TOC_MAKEFILES_DIR=$TOC_HOME/make -TOC_ATSIGN_PARSER=$TOC_TOCDIR/bin/atsign_parse # utility to replace @TOKENS_LIKE_THIS_ONE@ in streams. +TOC_ATSIGN_PARSER=$TOC_HOME/bin/atsign_parse # utility to replace @TOKENS_LIKE_THIS_ONE@ in streams. TOC_DEBUG=${TOC_DEBUG-0} TOC_SHARED_MAKEFILE=toc_shared.make +# TOC_SHARED_MAKEFILE is obsolete, and should Go Away. Use toc.${PACKAGE_NAME}.make.at +# and ${TOC_HOME}/make/toc.make.at instead. -declare -a CONFIG_DOT_MAKE_ARRAY # array holds key=val strings for toc_shared.make.at +declare -a CONFIG_DOT_MAKE_ARRAY # array holds key=val strings for makefiles declare -a CONFIG_DOT_H_ARRAY # array holds key=val strings for config.h.at TOC_DELETE_TEMP="test 1 = 1" # set to a false condition to disable deletion of some temp files (for debuggering) -TOC_TIMESTAMP=${TOC_TOPDIR}/.toc.configtimestamp +TOC_TIMESTAMP=${TOP_SRCDIR}/.toc.configtimestamp touch ${TOC_TIMESTAMP} # TOC_VERBOSE_WARNINGS=${TOC_VERBOSE_WARNINGS-0} # spits out the debug file contents -#TOC_CACHE=${TOC_TOPDIR}/configure.last +#TOC_CACHE=${TOP_SRCDIR}/configure.last #test -f ${TOC_CACHE} && rm ${TOC_CACHE} # echo $0 $@ >> ${TOC_CACHE}# loses quoted args' quotes @@ -118,6 +126,11 @@ { # outputs $@ if ${TOC_QUIET} = 0 # returns 1 if it does not output anything + # It it is passed no parameters it reads in from stdin, + # thus you can: + # toc_quietly <<EOF + # blah blah blah + # EOF test "x${TOC_QUIET-0}" != "x0" && return 1 test -n "$1" && { echo "$@" @@ -126,10 +139,16 @@ cat return 0 } + function toc_loudly { # outputs $@ if ${TOC_LOUD} != 0 # returns 1 if it does not output anything + # It it is passed no parameters it reads in from stdin, + # thus you can: + # toc_loudly <<EOF + # blah blah blah + # EOF test "x${TOC_LOUD-0}" = "x0" && return 1 test -n "$1" && { echo "$@" @@ -141,13 +160,23 @@ function toc_dump_make_properties -{ # Dumps the current properties from the makefile array to $1 - propsfile=$1 - i=0 +{ # Dumps the current properties from the makefile array to stdout + local i=0 while test $i -lt ${#CONFIG_DOT_MAKE_ARRAY[@]}; do echo ${CONFIG_DOT_MAKE_ARRAY[$i]} i=$((i + 1)) - done > $propsfile + done + return 0 +} + +function toc_dump_config_h_properties +{ # Dumps the current properties from the config.h array to stdout + local i=0 + while test $i -lt ${#CONFIG_DOT_H_ARRAY[@]}; do + echo ${CONFIG_DOT_H_ARRAY[$i]} + i=$((i + 1)) + done + return 0 } function toc_get_make @@ -181,7 +210,7 @@ TOC_GET_MAKE="$theval" test "x$2" = "x1" && echo ${TOC_GET_MAKE} test "x$2" = "x2" && echo $arg="${TOC_GET_MAKE}" - toc_debug toc_get_make "$arg=$theval" + toc_debug toc_get_make "$@": "$arg=$theval" return $ret } @@ -192,63 +221,37 @@ local tmpl=$1 local target=$2 local tmpfile=.toc.atfilter_as_makefile - toc_dump_make_properties $tmpfile + toc_dump_make_properties > $tmpfile toc_atfilter_file $tmpfile $tmpl $target local err=$? rm $tmpfile return $err } + function toc_create_make -{ # writes out toc_shared.make using the options set via toc_add_make and creates toc.make - #echo "Creating ${TOC_SHARED_MAKEFILE} and it's friends... " +{ + # todo: completely refactor this func, splitting it up into + # several functions. + # + # Writes out toc_shared.make using the options set via toc_add_make and creates toc.make + # echo "Creating ${TOC_SHARED_MAKEFILE} and it's friends... " + # set some must-be-set-last vars here: - toc_add_make TOC_SHARED_MAKEFILE=${TOC_SHARED_MAKEFILE} - local toc_shared_qmakefile=${TOC_SHARED_MAKEFILE%%.make}.qmake - toc_add_make TOC_SHARED_QMAKEFILE=${toc_shared_qmakefile} - TOC_SHARED_MAKEFILE_AT=${TOC_SHARED_MAKEFILE}.at - toc_add_make TOC_SHARED_MAKEFILE_AT=${TOC_SHARED_MAKEFILE_AT} - TOC_GENDMAKE_OUT=toc.make - toc_add_make TOC_MAKEFILE=$TOC_GENDMAKE_OUT # so we can add this to DISTCLEAN :/ +# toc_add_make TOC_SHARED_MAKEFILE=${TOC_SHARED_MAKEFILE} +# local toc_shared_qmakefile=${TOC_SHARED_MAKEFILE%%.make}.qmake +# toc_add_make TOC_SHARED_QMAKEFILE=${toc_shared_qmakefile} +# TOC_SHARED_MAKEFILE_AT=${TOC_SHARED_MAKEFILE}.at +# toc_add_make TOC_SHARED_MAKEFILE_AT=${TOC_SHARED_MAKEFILE_AT} +# TOC_GENDMAKE_OUT=toc.make +# toc_add_make TOC_MAKEFILE=$TOC_GENDMAKE_OUT # so we can add this to DISTCLEAN :/ # create toc.make for everyone who looks like they need it: #echo "${TOC_GENDMAKE_OUT}: " + toc_run_failok toc_make | toc_die $? "Error creating toc.make!" - local makeprops=${TOC_TOPDIR}/.toc.make.properties.tmp - toc_dump_make_properties $makeprops - local tocmakeprops - for d in $(find ${TOC_TOPDIR} -name Makefile -o -name GNUMakefile | xargs grep -l "^include ${TOC_GENDMAKE_OUT}" ); do - thedir=${d%%/Makefile} - cmake=${thedir}/${TOC_GENDMAKE_OUT} - toc_makerelative $thedir - relpath=${TOC_MAKERELATIVE} - cmake=${cmake##$TOC_TOPDIR/} # make it short, for asthetic reasons :/ -# echo "cmake=$cmake relpath=$relpath" - shortform=${thedir##${PWD}/} - test "$shortform" = "$PWD" && shortform= # top-most dir - - tocmakeprops=${cmake}.props - cp $makeprops $tocmakeprops - cat <<EOF >> $tocmakeprops -TOC_TOP_SRCDIR=${relpath##./} -prefix=${prefix} -TOC_RELATIVE_DIR=${shortform##./} -TOC_SHARED_MAKEFILE=${TOC_SHARED_MAKEFILE} -TOC_EMOTICON_OKAY=${TOC_EMOTICON_OKAY} -TOC_EMOTICON_WARNING= ${TOC_EMOTICON_WARNING} -TOC_EMOTICON_ERROR=${TOC_EMOTICON_ERROR} -EOF - toc_atfilter_file $tocmakeprops ${TOC_TOCDIR}/make/toc.make.at $cmake || { - err=$? - echo "Error creating toc.make!" - exit $err - } - rm $tocmakeprops # >/dev/null 2>&1 - # toc_replace_file $cmake $tmpfile && echo "created" || echo "up to date" - done - #echo ${TOC_EMOTICON_OKAY} - { # .qmake support + test 0 = 1 && { # .qmake support qtat=${toc_shared_qmakefile}.at test -f "$qtat" && { toc_atfilter_as_makefile $qtat ${qtat%%.at} || { @@ -258,12 +261,12 @@ qmakeout=toc.qmake #echo "$qmakeout: " - local files=$(find ${TOC_TOPDIR} -name Makefile -o -name "*.qmake" | xargs grep -l "^include(.*$qmakeout.*)" ) + local files=$(find ${TOP_SRCDIR} -name Makefile -o -name "*.qmake" | xargs grep -l "^include(.*$qmakeout.*)" ) lastdir= test -n "$files" && for d in $files; do cmake=${d%/*}/${qmakeout} - cmake=${cmake##$TOC_TOPDIR/} # make it a relative path, for asthetic reasons :/ + cmake=${cmake##$TOP_SRCDIR/} # make it a relative path, for asthetic reasons :/ toc_makerelative $d relpath=${TOC_MAKERELATIVE} test "$lastdir" = "$cmake" && continue @@ -277,7 +280,7 @@ include( \$\$TOC_SHARED_QMAKEFILE ) EOF # echo -n " $cmake ... " - toc_atfilter_file $tocmakeprops ${TOC_TOCDIR}/make/toc.qmake.at $cmake || { + toc_atfilter_file $tocmakeprops ${TOC_HOME}/make/toc.qmake.at $cmake || { err=$? echo "Error creating toc.qmake!" exit $err @@ -288,40 +291,17 @@ } # test -f "$qtat" } # end qmake support - #echo -n "${TOC_SHARED_MAKEFILE##${TOC_TOPDIR}/}: " + #echo -n "${TOC_SHARED_MAKEFILE##${TOP_SRCDIR}/}: " - toc_atfilter_as_makefile ${TOC_SHARED_MAKEFILE_AT} ${TOC_SHARED_MAKEFILE} || { - toc_die $? "Error filtering ${TOC_SHARED_MAKEFILE_AT}" - } +# toc_atfilter_as_makefile ${TOC_SHARED_MAKEFILE_AT} ${TOC_SHARED_MAKEFILE} || { +# toc_die $? "Error filtering ${TOC_SHARED_MAKEFILE_AT}" +# } #set +x #echo " ${TOC_EMOTICON_OKAY}" - rm $makeprops +# rm $makeprops return 0 } # end function toc_create_make -function toc_create_config_h -{ # writes out config.h using the options set via toc_add_make - local configh=${TOC_INCLUDESDIR}/config.h - configh=${configh##${TOC_TOPDIR}/} - local tmpl=$configh.at - test -f $tmpl || { - echo "Note: no $tmpl found, so $configh will not be created." - return 0 - } - - local propsfile=.config.h.properties - local tmpfile=.config.h.tmp - i=0 - test -f $propsfile && rm $propsfile - while test $i -lt ${#CONFIG_DOT_H_ARRAY[@]}; do - echo ${CONFIG_DOT_H_ARRAY[$i]} - i=$((i + 1)) - done >> $propsfile - toc_atfilter_file $propsfile $tmpl $configh - ${TOC_DELETE_TEMP} && test -f $propsfile && rm $propsfile - return 0 -} - { # function toc_find_in_path: shell function to find an app in a given path # usage: @@ -438,14 +418,14 @@ { # function toc_run test_name [args to pass to test] - # sources include/configure/test_name.test - # and returns it's exit code, or 0 on success. + # Runs a test and returns it's return code. # # If $1 is an existing file, that file is treated - # as the test, and sourced. + # as the test, and sourced, otherwise a lookup + # algorithm is used to find test_name.sh. # - # Do not call toc_run directly: it is meant to - # be used by toc_run_* + # Normally clients should use toc_run_fail{,ok} + # this function. TOC_CONFIG_LOG=.toc.run.log TOC_RUN_DEPTH=0 test -f ${TOC_CONFIG_LOG} && rm ${TOC_CONFIG_LOG} @@ -460,7 +440,9 @@ local desc= toc_find_test $testname && { path=${TOC_FIND_RESULT} - desc=$(sed -ne 's|\#.*toc_run_description.*= *\(.*\)|\1|p' ${TOC_FIND_RESULT}); + desc=$(sed -ne 's|\#.*toc_run_description.*= *\(.*\)|\1|p;' ${TOC_FIND_RESULT}); + # note: ^^^ sed expr should end with 'q', but then i can only read the top-most line, + # and i like to have a shebang as the top-most line to help out emacs :/ } || { toc_die 127 toc_run cannot find script for test $testname. } @@ -527,16 +509,32 @@ return 0 } + function toc_source_test + { # sources the given test script and returns it's error code. + # it accepts a filename or X, where X resolves to is ${TOC_HOME}/tests/X.sh. + local test=$1 + shift + local tmpfile=.toc.${test##*/}.output + local sh=${TOC_TESTSDIR}/$test.sh + test -f $test && sh=$test + test -f "$sh" || toc_die 1 "toc_source_test $test: $sh not found!" + local err=0 + toc_debug "toc_source_test sourcing [$sh $@]" + source $sh "$@" + err=$? + return $err + } + function toc_find_failok { - # toc_find_failok works like toc_run, but searches for the passed-in app ($1) - # in ${2-${PATH}. It returns 1 if it finds no file, else zero. - # It "returns" the found file in ${TOC_FIND_RESULT}. - local bin=$1 + # toc_find_failok works like toc_run_failok, but searches for the app $1 + # in path ${2-${PATH}}. It returns 1 if it finds no file, else zero. + # It "returns" the found file in the global var ${TOC_FIND_RESULT}. + local bin="$1" shift local path="${@-${PATH}}" - toc_quietly -n "? find $bin ..." - toc_find_in_path $bin $path || { + toc_quietly -n -e "? find $bin\t" + toc_find_in_path $bin "$path" || { toc_quietly "not found ${TOC_EMOTICON_WARNING}" return 1 } @@ -546,28 +544,14 @@ test -n "$str" && echo " $str" return 0 } + function toc_find_fail - { # See toc_find_failok(), except this one exits on error + { # Same as toc_find_failok(), except this one exits on error toc_find_failok "$@" || toc_die $? toc_find_fail "$@" return 0 } - function toc_source_test - { # sources the given test script and returns it's error code. - # it accepts a filename or X, where X resolves to is toc/tests/X.sh. - local test=$1 - shift - local tmpfile=.toc.${test##*/}.output - local sh=${TOC_TESTSDIR}/$test.sh - test -f $test && sh=$test - test -f "$sh" || toc_die 1 "toc_source_test $test: $sh not found!" - local err=0 - toc_debug "toc_source_test sourcing [$sh $@]" - source $sh "$@" - err=$? - return $err - } } # end toc_run functions @@ -588,28 +572,24 @@ # problem which needs to be addressed immediately. # # - local tgt=$1 - local tmp=$2 - #toc_boldecho toc_replace_file $tgt $tmp + local tgt="$1" + local tmp="$2" + toc_debug toc_replace_file $tgt $tmp test -f "$tmp" || { echo "toc_replace_file: argument 2 ($2): could not find file." exit 1 } - # fstate="created" - # test -f $tgt && fstate=updated if test -f "$tgt"; then if cmp -s "$tgt" "$tmp"; then toc_debug "toc_replace_file: $tgt is up to date. Deleting $tmp." #echo "toc_replace_file: $tgt fstate=up to date" - rm -f $tmp + rm -f "$tmp" return 1 fi - #fstate=updated fi - mv -f $tmp $tgt || { - toc_die 2 "toc_replace_file error: toc_replace_file: Could not move $tmp to $tgt!" + mv -f "$tmp" "$tgt" || { + toc_die 2 "toc_replace_file error: toc_replace_file: Could not move [$tmp] to [$tgt]!" } - #echo toc_replace_file 2>&1 fstate=$fstate return 0 } } # end toc_replace_file @@ -621,15 +601,15 @@ # It returns !0 only if $TOC_ATSIGN_PARSER throws an error. # $1 = file containing properties to @-filter. # $2 = input template (e.g. toc_shared.make.at) - # $3 = output file (e.g. toc_shared.make). Is only changed if - # needed, so it is dependency-safe. + # $3 = output file (e.g. toc_shared.make). It is only changed if + # needed, so it is dependencies-safe. local pfile="$1" local tmpl="$2" local ofile="$3" test -f "$pfile" || toc_die $? "toc_atfilter_file: \$1: file not found: $pfile" test -f "$tmpl" || toc_die $? "toc_atfilter_file: \$2: file not found: $tmpl" local tmpfile=$ofile.tmp.toc_atfilter_file - ${TOC_ATSIGN_PARSER} -f $pfile < $tmpl > $tmpfile || { + ${TOC_ATSIGN_PARSER} -f "$pfile" < "$tmpl" > "$tmpfile" || { local err=$? echo "toc_atfilter_file(): @-parsing failed: error $err " echo ${TOC_EMOTICON_ERROR} @@ -638,8 +618,8 @@ echo -n "$ofile ... " fstate="created" - test -f $ofile && fstate="updated" - toc_replace_file $ofile $tmpfile || fstate="up to date" + test -f "$ofile" && fstate="updated" + toc_replace_file "$ofile" "$tmpfile" || fstate="up to date" echo "$fstate" return 0 } @@ -648,34 +628,59 @@ function toc_makerelative -{ # usage: toc_makerelative /foo/bar/one/two /foo/bar - # sets global var TOC_MAKERELATIVE to the "return value". +{ # Makes a relative path from a pair of paths. + # Usage: toc_makerelative /foo/bar/one/two /foo/bar + # It tries to make a relative path from $1, which must + # be a sub-path (or the same as) of $2. + # Sets global var TOC_MAKERELATIVE to the "return value". # In the above example, it should = ./../.. - local startat=${1-$PWD} - local relto=${2-${TOC_TOPDIR}} - test -n "$relto" || $relto=$PWD - test -f $startat && startat=$(dirname $startat) + local startat="${1-$PWD}" + local relto="${2-${TOP_SRCDIR}}" + test -n "$relto" || $relto="$PWD" + test -f "$startat" && startat="$(dirname $startat)" local dn=$startat/bogus - local dn=${dn%*/*} + local dn="${dn%*/*}" local rel="." while test -n "$dn" -a "$dn" != "$relto" -a "$dn" != "/"; do rel="$rel/.." - dn=${dn%*/*} + dn="${dn%*/*}" done - TOC_MAKERELATIVE=${rel##./} + TOC_MAKERELATIVE="${rel##./}" } + +function toc_internal_format_endconfigure +{ +# internal helper to pretty up some output + perl -ane '$| = 1; + if( ! -f $F[0] ) { print; next; } + $fn = $F[0]; + $st = $_; + $st =~ s|.*\.\.\.\s+||; + write; +format STDOUT = + @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<< +$fn, $st +. +' + # come on... you gotta love perl! +} + function toc_endconfigure { # ends the configuration process, processing the files # which need to be @-parsed toc_boldecho "==== Creating configuration-dependent files..." { - toc_create_config_h - toc_create_make + toc_run_fail toc_make | toc_internal_format_endconfigure + toc_run_fail toc_config_h | toc_internal_format_endconfigure } local clean="$(ls .toc.* 2> /dev/null)" - test -n "$clean" && rm $clean + test "x$clean" != x && rm $clean + echo ========================================================================= + # maintenance note: the above =====... is formatted to line up with the output + # from toc_internal_format_endconfigure + return 0 } function toc_parseargs @@ -684,9 +689,12 @@ # mostly stolen from the qt 3.1.0 configure script :) local i=0 local -a passon # clone of $@ to pass on to TOC_PARSEARGS_CALLBACK - while [ "$#" -gt 0 ]; do - local arg="$1" - shift + local configure_args + local xtra= + echo "$@" | grep -q \\--prefix= || xtra="--prefix=${prefix}" +# while [ "$#" -gt 0 ]; do + for arg in ${xtra} "$@"; do +# local arg="$1"; shift passon[${i}]="$arg" i=$((i + 1)) local VAR= @@ -721,7 +729,7 @@ EOF # ^^^^ note usage of hard tabs in the cat data! - local help=${TOC_TOPDIR}/toc.${PACKAGE_NAME}.help + local help=${TOP_SRCDIR}/toc.${PACKAGE_NAME}.help test -f $help && { echo -e "\nHelp options specific to ${PACKAGE_NAME}:\n" local foo=$(head -1 $help) @@ -815,9 +823,11 @@ toc_debug "toc_parseargs: exporting [$VAR]=$VAL" export $VAR="$VAL" toc_add_config "$VAR=$VAL" +# foo=$(echo $VAL | sed -e "s,',\\\\',g") + configure_args="$configure_args --$VAR=\"$VAL\"" } done - + toc_add_config CONFIGURE_ARGUMENTS="$configure_args" # <---- !!!!experimental!!!! test "x${TOC_PARSEARGS_CALLBACK}" != "x" && { ${TOC_PARSEARGS_CALLBACK} "${passon[@]}" return $? @@ -829,7 +839,9 @@ # We do some initial sanity checking here, # but any tree-specific checks must be done from configure. -toc_parseargs --prefix=${prefix} "$@" +toc_parseargs "$@" +toc_get_make prefix || toc_add_config prefix=${prefix} + toc_loudly 'Loud mode enabled.' toc_source_test toc_tests_help || exit 0 @@ -847,7 +859,7 @@ it fails a test which it /needs/ to pass. EOF -# source ${TOC_TOCDIR}/tests/toc_core_tests.sh || { +# source ${TOC_HOME}/tests/toc_core_tests.sh || { toc_run_fail toc_core_tests || { err=$? echo "Core toc sanity test failed (err=$err). This tree is not toc-capable. ${TOC_EMOTICON_ERROR}" Index: toconfigure =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/sbin/toconfigure,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- toconfigure 27 Sep 2003 22:34:03 -0000 1.12 +++ toconfigure 10 Dec 2003 19:45:20 -0000 1.13 @@ -1,5 +1,7 @@ -#!/bin/bash -# Top-level config script, "toc" style. +#!/do/not/bash +# Source tree configure script, toc-style. +# The latest code is at http://toc.sourceforge.net/ +# # Do not run this directly: wrap it up in a script called 'configure', # stick it into your top-level build tree, set some environment vars, # and source it. See the configure from the toc distribution for a @@ -15,7 +17,7 @@ # Notes about this configure process: # Project-wide vars are currently defined in: # - this file -# - project_globals.make.at +# - toc.${PACKAGE_NAME}.make.at # - And check the top-level Makefile, to be certain :/ # # @@ -25,9 +27,11 @@ # # This tool still requires quite a few things, but it will not aim to be all things # to all projects. Customize as you see fit. +# +# Note: there are no guarantees that any exit codes mean anything specific! test -z "${PACKAGE_VERSION}" -a -z "${PACKAGE_NAME}" && { - echo "toconfigure: environment vars PACKAGE_NAME and PACKAGE_VERSION must be set" + echo "toconfigure: environment vars PACKAGE_NAME and PACKAGE_VERSION must be set." exit 1 } configure=configure @@ -36,34 +40,46 @@ exit 2 } -grep -q "toc[_/]" $configure || { +grep -i "toc" $configure > /dev/null || { # this is kind of a callback, actually, since we should only be # sourced from configure. echo "Your configure script does not appear to be toc-aware. It shouldn't be sourcing this file." exit 3 } +TOP_SRCDIR=${PWD} +TOC_HOME=${TOC_HOME-"${TOP_SRCDIR}/toc"} + +test -d "${TOC_HOME}" || { + echo "The toc home directory, TOC_HOME, not found. Set that variable to the top-most path to your toc installation, or unset it to use the default of ./toc" + exit 4 +} +export TOP_SRCDIR +export TOC_HOME +export PATH=${TOC_HOME}/bin:${PATH} + { # set up the core # todo: implement toc_find_in_path() here so we can use it to find toc_core.sh # for now assume we must source it from $(top_srcdir). - CORE_SH=toc/sbin/toc_core.sh + CORE_SH=${TOC_HOME}/sbin/toc_core.sh source ${CORE_SH} "$@" || { # core toc functions and initial sanity test - echo "toconfigure: Pain! Suffering! Loading toc_core.sh failed!" - exit 4 + echo "toconfigure: Pain! Suffering! Loading ${CORE_SH} failed!" + exit 5 } } -toc_add_config_h PACKAGE_NAME=${PACKAGE_NAME} -toc_add_make PACKAGE_NAME=${PACKAGE_NAME} -toc_add_config_h PACKAGE_VERSION=${PACKAGE_VERSION} -toc_add_make PACKAGE_VERSION=${PACKAGE_VERSION} - +toc_add_config PACKAGE_NAME="${PACKAGE_NAME}" +toc_add_config PACKAGE_VERSION="${PACKAGE_VERSION}" +toc_add_config TOC_HOME="${TOC_HOME}" toc_add_make configure_build_quietly=${build_quietly-0} +toc_add_make TOC_EMOTICON_OKAY=${TOC_EMOTICON_OKAY} +toc_add_make TOC_EMOTICON_ERROR=${TOC_EMOTICON_ERROR} +toc_add_make TOC_EMOTICON_WARNING=${TOC_EMOTICON_WARNING} # include package-specific configure script. This eases upgrading a project's toc: pkgconfig=${PACKAGE_CONFIGURE_SCRIPT-configure.${PACKAGE_NAME}} test -f $pkgconfig && { - . $pkgconfig + source $pkgconfig err=$? test $err -eq 0 || { echo "toconfigure: error: $pkgconfig returned [non-zero] error code $err." @@ -71,25 +87,29 @@ } } # toc_run_failok toc_project_makefile "Looking for toc.${PACKAGE_NAME}.make" -toc_add_make SHELL=$(which bash) +toc_add_config SHELL=$(which bash) # toc_run_fail toc_configure_finalcheck # toc_configre_finalcheck is arguable :/ -# end the configuration process and write out our files... -toc_endconfigure | perl -ane '$| = 1; - if( ! -f $F[0] ) { print; next; } - $fn = $F[0]; - $st = $_; - $st =~ s|.*\.\.\.\s+||; - write; -format STDOUT = - @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<< -$fn, $st -. -' -# come on... you gotta love perl! + +##### end the configuration process and write out our files... +toc_endconfigure + + +# if $POSTCONFIG exists it is run as our final step: +POSTCONFIG=${TOP_SRCDIR}/postconfig.${PACKAGE_NAME} +test -f ${POSTCONFIG} && { + source ${POSTCONFIG} || { + err=$? + echo "${POSTCONFIG} returned non-zero exit status: $?" + return $err + } +} + +package_configure=${TOP_SRCDIR}/toc.${PACKAGE_NAME}.configure.make +toc_dump_make_properties | perl -pe 's|^(\w+)=|$1 = |' > ${package_configure} cat <<-EOF ========================================================================= @@ -97,6 +117,5 @@ Be sure to read any messages from the tests run by configure. ========================================================================= EOF - # note the intentional use of hard tabs in the cat <<-EOF, above. +# ^^^^ note the intentional use of hard tabs in the cat <<-EOF, above. -# call toc_endconfigure to finalize the generated makefile and config.h |
From: <sg...@us...> - 2003-12-10 19:45:23
|
Update of /cvsroot/libfunutil/libfunutil/toc/bin In directory sc8-pr-cvs1:/tmp/cvs-serv14493/toc/bin Modified Files: makedist mkdep.c relativePathToSharedMakefile Log Message: mass commit: fixes/changes from toc/s11n/cl trees. Index: makedist =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/bin/makedist,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- makedist 31 Aug 2003 20:28:58 -0000 1.4 +++ makedist 10 Dec 2003 19:45:20 -0000 1.5 @@ -4,9 +4,10 @@ # # todo: add some wildcard support to the file lists. # -# sg...@us... +# st...@s1... # -# +# Note that is implicitely filters out some file names, +# to simplify use of the toc client-side install code. $verbose = 0; $dieonerror = 1; @@ -31,6 +32,8 @@ foreach $l (@list) { next if $l =~ /^#/; next if $l =~ m|^(.*/)?toc.q?make$|; + next if $l =~ m|\.o$|; + next if $l =~ m|.*/CVS(/.*)?|; chomp( $l ); next unless $l =~ /\w/; @@ -51,7 +54,7 @@ #print STDOUT "thelist=",join( "\n", @thelist ),"\n"; print "File count: ".@thelist."\n" if $verbose; -$tarargs = "--exclude='*.o' --exclude='CVS' --exclude='toc.make' --files-from=$tarfileslist"; +$tarargs = "--files-from=$tarfileslist"; execcmd( "tar cf - $tarargs | tar xf - -C \"$basename\"" ); @@ -64,7 +67,7 @@ # execcmd( "cd $basename; for x in \$(find . -type f); do md5sum \$x >> MD5SUMS.$basename; done" ); execcmd( "for x in \$(cat $tarfileslist); do md5sum \$x; done > $md5file" ) } else { - print STDERR "Warning: no md5sum found, so not including md5 info.\n"; + print STDERR "Warning: no md5sum binary found, so not including md5 info.\n"; } Index: mkdep.c =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/bin/mkdep.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mkdep.c 1 Sep 2003 00:18:58 -0000 1.5 +++ mkdep.c 10 Dec 2003 19:45:20 -0000 1.6 @@ -29,7 +29,7 @@ * defaults. Only -I is supported, no attempt is made to handle -idirafter, * -isystem, -I- etc. * - * Aug 2003: stephan beal <sg...@us...> + * Aug 2003: stephan beal <st...@s1...> * - removed HPATH requirement for use in the toc project (toc.sourceforge.net) * * Aug 2003: rusty <bo...@us...> Index: relativePathToSharedMakefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/bin/relativePathToSharedMakefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- relativePathToSharedMakefile 5 Aug 2003 09:27:43 -0000 1.1.1.1 +++ relativePathToSharedMakefile 10 Dec 2003 19:45:20 -0000 1.2 @@ -15,7 +15,7 @@ # prints a relative path from the starting dir to that path, or no output if # '$shared_makefile' is not found. # -# stephan - sg...@us... +# stephan - st...@s1... $configure = $shared_makefile; $topdir = "/"; |
From: <sg...@us...> - 2003-12-10 19:43:28
|
Update of /cvsroot/libfunutil/libfunutil/toc/tests In directory sc8-pr-cvs1:/tmp/cvs-serv14171/toc/tests Added Files: ssh_tools.sh toc_config_h.sh toc_make.sh Log Message: egg --- NEW FILE: ssh_tools.sh --- #!/do/not/bash # toc_run_description = looking for ssh and scp # toc_begin_help = # Looks for ssh and scp in ${PATH}. Optionally accepts: # --with-ssh=/path/to/ssh # --with-scp=/path/to/scp # # Returns non-zero if either of them is not found, and zero # if both are found. # = toc_end_help err=0 toc_find_failok ${configure_with_ssh-ssh} && toc_add_config SSH_BIN=${TOC_FIND_RESULT} || { err=$? toc_add_config SSH_BIN= echo "ssh not found. Try using --with-ssh=/path/to/ssh" } toc_find_failok ${configure_with_scp-scp} && toc_add_config SCP_BIN=${TOC_FIND_RESULT} || { err=$? toc_add_config SCP_BIN= echo "scp not found. Try using --with-scp=/path/to/scp" } return $err --- NEW FILE: toc_config_h.sh --- #!/do/not/bash # toc_run_description = creating config.h # toc_begin_help = # Creates a config.h from config.h.at. # Accepts optional $1 naming a target config.h-like # file. The file $1.at must exist for this to work. # = toc_end_help function toc_config_h { # $1 = target file. $1.at must exist. # todo: add support for multiple input files. # i use a function so i can use local vars local propsfile=.config.h.properties local configh=$1 configh=${configh##${TOP_SRCDIR}/} local tmpl=$configh.at test -f $tmpl || { echo "Note: no $tmpl found, so $configh will not be created." return 0 } i=0 test -f "$propsfile" && rm "$propsfile" toc_dump_config_h_properties > $propsfile toc_atfilter_file $propsfile $tmpl $configh rm $propsfile return 0 } files="$@" test -z "$files" && files=${TOC_INCLUDESDIR}/config.h toc_config_h "$files" return $? --- NEW FILE: toc_make.sh --- #!/do/not/bash # toc_run_description = creating toc.make # Do not run this test manually: it is run by the toc core. TOC_MAKE=toc.make toc_add_make TOC_MAKE=${TOC_MAKE} function toc_make_toc_make { # use a function because bash doesn't allow local vars outside of functions. local makeprops=${TOP_SRCDIR}/.toc.make.tmp toc_dump_make_properties > $makeprops local thedir local tocmake local relpath local shortform local tocmakeprops for d in $(find ${TOP_SRCDIR} -name Makefile -o -name GNUMakefile -o -name Makefile.toc | xargs grep -l "^include ${TOC_MAKE}" | sort); do thedir=$(dirname $d) tocmake=${thedir}/${TOC_MAKE} toc_makerelative $thedir relpath=${TOC_MAKERELATIVE} tocmake=${tocmake##$TOP_SRCDIR/} # make it short, for asthetic reasons :/ shortform=${thedir##${PWD}/} test "$shortform" = "$PWD" && shortform= # top-most dir # echo "tocmake=$tocmake relpath=$relpath shortform=$shortform" tocmakeprops=${cmake}.props cp $makeprops $tocmakeprops cat <<EOF >> $tocmakeprops TOP_SRCDIR=${relpath##./} TOC_RELATIVE_DIR=${shortform##./} EOF toc_atfilter_file $tocmakeprops ${TOC_HOME}/make/toc.make.at $tocmake \ || toc_die $? "Error creating toc.make!" rm $tocmakeprops touch $tocmake # required for proper auto-reconfigure :/ done } toc_make_toc_make |
Update of /cvsroot/libfunutil/libfunutil/lib/toolbox/src In directory sc8-pr-cvs1:/tmp/cvs-serv13925/lib/toolbox/src Modified Files: children_holder.h class_name.h file_util.cpp string_util.cpp string_util.h type_traits.h Log Message: mass commit: mainly build-related fixes, plus some code stuff from the cl/s11n trees. Index: children_holder.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/toolbox/src/children_holder.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- children_holder.h 29 Nov 2003 13:47:13 -0000 1.2 +++ children_holder.h 10 Dec 2003 19:42:24 -0000 1.3 @@ -9,12 +9,6 @@ #include <vector> //#include <deque> // causes crashes in some cases where vector does not :/ -#ifndef TYPENAME -#define TYPENAME typename -// gcc 3.x handles typenames "properly" and gcc 2.95.3 does not, so we must do -DTYPENAME= -// for gcc 2.95.3. -#endif - namespace TOOLBOX_NAMESPACE { /** @@ -116,7 +110,7 @@ { if ( !parent ) return false; static ThisType::map_type & cmap = parentChildMap(); - TYPENAME ThisType::map_type::iterator it = cmap.find( parent ); + typename ThisType::map_type::iterator it = cmap.find( parent ); if ( it == cmap.end() ) return false; cmap.erase( parent ); return true; @@ -136,20 +130,20 @@ if ( !parent ) return false; static ThisType::map_type & cmap = parentChildMap(); - TYPENAME ThisType::map_type::iterator it = cmap.find( parent ); + typename ThisType::map_type::iterator it = cmap.find( parent ); if ( it == cmap.end() ) { // we were probably just never registed because children() was never called. return false; } - TYPENAME ThisType::list_type * li = ( *it ).second; + typename ThisType::list_type * li = ( *it ).second; if ( !unmap_parent( parent ) ) { return false; } - TYPENAME ThisType::list_type::iterator vit; - TYPENAME ThisType::child_type * child = 0; - for ( vit = li->begin(); li->begin() != li->end() ) + typename ThisType::list_type::iterator vit; + typename ThisType::child_type * child = 0; + for ( vit = li->begin(); li->begin() != li->end(); ) { child = ( *vit ); li->erase( vit ); Index: class_name.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/toolbox/src/class_name.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- class_name.h 28 Nov 2003 00:56:03 -0000 1.1 +++ class_name.h 10 Dec 2003 19:42:24 -0000 1.2 @@ -41,8 +41,8 @@ /** returns the class name for class T. */ static const char * name() { - assert( 0 /* this class_name<> is unspecialized! */ ); - return "error::class_name<unspecialized>"; + assert( 0 && "this class_name<> is unspecialized!" ); + return "class_name<unspecialized>"; } /** returns the class name for class T. */ Index: file_util.cpp =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/toolbox/src/file_util.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- file_util.cpp 28 Nov 2003 00:56:03 -0000 1.1 +++ file_util.cpp 10 Dec 2003 19:42:24 -0000 1.2 @@ -9,9 +9,11 @@ #if HAVE_CONFIG_H -# include "config.h" +#include "config.h" // expected: HAVE_ZLIB, HAVE_BZLIB #endif + #include <fstream> + #if HAVE_ZLIB # include "gzstream.h" #endif Index: string_util.cpp =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/toolbox/src/string_util.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- string_util.cpp 28 Nov 2003 00:56:03 -0000 1.1 +++ string_util.cpp 10 Dec 2003 19:42:24 -0000 1.2 @@ -72,13 +72,13 @@ - unsigned long strip_slashes( std::string &str ) + unsigned long strip_slashes( std::string &str, const char slash ) { std::string::size_type osz; if( str.empty() || ((osz = str.size()) < 2 ) ) return 0; std::string::size_type pos = 0; unsigned long count = 0; - pos = str.find( "\\" ); + pos = str.find( slash ); if( pos == str.npos ) return 0; if( osz < 2 ) return 0; @@ -88,7 +88,7 @@ while( pos > 2 ) { char c = str[pos]; - if( '\\' == c && (str[pos-1] != '\\') ) + if( slash == c && (str[pos-1] != slash) ) { ++count; search = str.find_first_not_of( " \t\n", pos +1 ); @@ -102,17 +102,17 @@ --pos; } - pos = str.find( "\\" ); + pos = str.find( slash ); while( !( (pos == std::string::npos) || (pos > str.size()-2) ) ) { // todo: search from the end, going backwards. This should be faster in terms of string's required workload. ++count; str.erase( pos, 1 ); - if( '\\' != str[pos+1] ) + if( slash != str[pos+1] ) { pos += 1; } else pos += 2; - pos = str.find( "\\", pos ); + pos = str.find( slash, pos ); } return count; @@ -135,14 +135,14 @@ - std::string trim_string( const std::string &str, int policy ) + std::string trim_string( const std::string &str, TrimPolicy policy ) { std::string foo = str; trim_string( foo, policy ); return foo; } - unsigned int trim_string( std::string &str, int policy ) + unsigned int trim_string( std::string &str, TrimPolicy policy ) { if( str.empty() ) return 0; static const std::string space(" \t\n\r"); Index: string_util.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/toolbox/src/string_util.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- string_util.h 29 Nov 2003 13:47:13 -0000 1.2 +++ string_util.h 10 Dec 2003 19:42:24 -0000 1.3 @@ -52,12 +52,12 @@ Trims leading and trailing whitespace from the input string and returns the number of whitespace characters removed. */ - unsigned int trim_string( std::string &, int = TrimAll ); + unsigned int trim_string( std::string &, TrimPolicy = TrimAll ); /** Trims leading and trailing whitespace from the input string and returns the trimmed string. */ - std::string trim_string( const std::string &, int = TrimAll ); + std::string trim_string( const std::string &, TrimPolicy = TrimAll ); /** @@ -65,8 +65,10 @@ Removes backslash-escaped newlines from the input string, including any whitespace immediately following each backslash. + + The optional slash parameter defines the escape character. */ - unsigned long strip_slashes( std::string &str ); + unsigned long strip_slashes( std::string &str, const char slash = '\\' ); /** Adds an escape sequence in front of any characters in Index: type_traits.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/toolbox/src/type_traits.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- type_traits.h 29 Nov 2003 13:47:13 -0000 1.2 +++ type_traits.h 10 Dec 2003 19:42:24 -0000 1.3 @@ -37,15 +37,12 @@ Equivalent to (const type &) */ typedef const type & const_reference; - private: - type_traits(); // unimplemented - ~type_traits(); // unimplemented }; /** A specialization to treat (T *) as (T) for type_traits purposes. */ - template <> + template <typename T> struct type_traits<T *> : public type_traits<T> {}; } // namespace |
From: <sg...@us...> - 2003-12-10 19:42:27
|
Update of /cvsroot/libfunutil/libfunutil/lib/s11n/parsers In directory sc8-pr-cvs1:/tmp/cvs-serv13925/lib/s11n/parsers Modified Files: Makefile Log Message: mass commit: mainly build-related fixes, plus some code stuff from the cl/s11n trees. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/parsers/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 28 Nov 2003 01:35:49 -0000 1.6 +++ Makefile 10 Dec 2003 19:42:24 -0000 1.7 @@ -33,10 +33,11 @@ SOURCES_FLEX = $(addsuffix .flex.cpp,$(FLEXES)) NAMESPACE = $(S11N_NAMESPACE) -NAMESPACE_TOKEN = S11N_NAMESPACE -NAMESPACE_FILTERED_FILES = $(SOURCES) $(HEADERS) $(addsuffix .flex.at,$(FLEXES)) -namespace: $(NAMESPACE_FILTERED_FILES) -include $(toc_makesdir)/NAMESPACE.make +FILE_FILTERS = namespace +namespace_FILTER_RULES = -e 's|S11N_NAMESPACE|$(S11N_NAMESPACE)|g' +namespace_FILTER_NAMESED = s,$(NAMESPACE_PREFIX),, +namespace_FILTER_SOURCES = $(NS_SOURCES) $(NS_HEADERS) $(wildcard $(NAMESPACE_PREFIX)*.at) +include $(TOC_MAKESDIR)/FILE_FILTERS.make FLEXES_ARGS = -p -+ @@ -49,7 +50,7 @@ ifeq (0,$(enable_hexed)) hex_FLEXES_ARGS = -i -B -Phex endif -include $(toc_makesdir)/flex.make +include $(TOC_MAKESDIR)/flex.make COMMON_FLEX_DEFS = common_flex_definitions.at @@ -104,14 +105,14 @@ INSTALL_PACKAGE_HEADERS_DEST = $(prefix)/include/$(S11N_NAMESPACE) INSTALL_PACKAGE_HEADERS = $(HEADERS) -DIST_FILES += $(NS_SOURCES) $(NS_HEADERS) $(COMMON_FLEX_DEFS) +DIST_FILES += $(wildcard $(NAMESPACE_PREFIX)/*.* $(COMMON_FLEX_DEFS)) SYMLINK_HEADERS = $(INSTALL_PACKAGE_HEADERS) SYMLINK_HEADERS_DEST = $(top_srcdir)/include/$(S11N_NAMESPACE) -include $(toc_makesdir)/symlink_headers.make +include $(TOC_MAKESDIR)/symlink_headers.make -all: NAMESPACE flexes symlink-headers $(OBJECTS) +all: FILE_FILTERS flexes symlink-headers $(OBJECTS) COMMONS_DIR = $(ELIB_LIBDIR)/common |
From: <sg...@us...> - 2003-12-10 19:42:27
|
Update of /cvsroot/libfunutil/libfunutil/lib/s11n In directory sc8-pr-cvs1:/tmp/cvs-serv13925/lib/s11n Modified Files: Makefile Log Message: mass commit: mainly build-related fixes, plus some code stuff from the cl/s11n trees. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 28 Nov 2003 01:35:49 -0000 1.7 +++ Makefile 10 Dec 2003 19:42:24 -0000 1.8 @@ -36,6 +36,15 @@ s11n_globals.h \ ) +FILE_FILTERS = namespace +namespace_FILTER_RULES = -e 's|S11N_NAMESPACE|$(S11N_NAMESPACE)|g' +namespace_FILTER_NAMESED = s,$(NAMESPACE_PREFIX),, +namespace_FILTER_SOURCES = $(NS_SOURCES) $(NS_HEADERS) +namespace-notice: + @echo "Package namespace is $(S11N_NAMESPACE)." +FILE_FILTERS: namespace-notice +include $(TOC_MAKESDIR)/FILE_FILTERS.make + # Be careful with SOURCES/HEADERS, lest they be cleaned up when you don't # want them to be. Simplest is to put everything into NS_{HEADERS/SOURCES} and expect @@ -44,12 +53,6 @@ $(patsubst $(NAMESPACE_PREFIX)%,%,$(NS_SOURCES)) HEADERS = \ $(patsubst $(NAMESPACE_PREFIX)%,%,$(NS_HEADERS)) -CLEAN_FILES += $(SOURCES) $(HEADERS) - -NAMESPACE = $(S11N_NAMESPACE) -NAMESPACE_TOKEN = S11N_NAMESPACE -NAMESPACE_FILES = $(NS_SOURCES) $(NS_HEADERS) -include $(toc_makesdir)/NAMESPACE.make @@ -67,13 +70,13 @@ SYMLINK_HEADERS = $(INSTALL_PACKAGE_HEADERS) SYMLINK_HEADERS_DEST = $(top_srcdir)/include/$(S11N_NAMESPACE) -include $(toc_makesdir)/symlink_headers.make +include $(TOC_MAKESDIR)/symlink_headers.make #uninstall-local: # @$(call toc_make_uninstall,$(INSTALL_PACKAGE_HEADERS),$(INSTALL_PACKAGE_HEADERS_DEST)) -all: NAMESPACE symlink-headers subdir-parsers $(OBJECTS) +all: FILE_FILTERS symlink-headers subdir-parsers $(OBJECTS) # SHARED_LIBS STATIC_LIBS BIN_PROGRAMS # all: symlink-headers subdir-parsers $(OBJECTS) |
From: <sg...@us...> - 2003-12-10 19:39:57
|
Update of /cvsroot/libfunutil/libfunutil/client/s11nconvert In directory sc8-pr-cvs1:/tmp/cvs-serv13367/client/s11nconvert Modified Files: Makefile Log Message: moved sources to src/ Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 28 Nov 2003 01:35:48 -0000 1.7 +++ Makefile 10 Dec 2003 19:39:54 -0000 1.8 @@ -1,4 +1,5 @@ +default: all include toc.make ############################## expected from toc.make: S11N_NAMESPACE ?= s11n @@ -7,8 +8,8 @@ # CPPFLAGS += -DCLASSLOADER_DEBUG=1 -DIST_FILES += $(wildcard in.* *.cpp *.h) - +DIST_FILES += $(wildcard in.* src/*.cpp src/*.h) +CLEAN_FILES += src/*~ @@ -41,7 +42,7 @@ maser_cpp_CPPFLAGS = $(main_cpp_CPPFLAGS) BIN_PROGRAMS_LDADD += $(S11N_CLIENT_LDADD) -include $(toc_makesdir)/BIN_PROGRAMS.make +include $(TOC_MAKESDIR)/BIN_PROGRAMS.make INSTALL_BINS = s11nconvert @@ -55,7 +56,7 @@ # LoadableSubclass_so_OBJECTS = LoadableSubclass.o BigSO_so_OBJECTS = BarClass.o FooClass.o CLEAN_FILES += FooClass.so BarClass.so -include $(toc_makesdir)/SHARED_LIBS.make +include $(TOC_MAKESDIR)/SHARED_LIBS.make link-bigso: BigSO.so for i in FooClass BarClass; do ln -fs $< $$i.so; done @@ -71,15 +72,18 @@ install-BINS: strip-bins -NAMESPACE = $(S11N_NAMESPACE) -NAMESPACE_TOKEN = S11N_NAMESPACE -NAMESPACE_PREFIX = ns. -NAMESPACE_FILES = $(wildcard $(NAMESPACE_PREFIX)*) -include $(toc_makesdir)/NAMESPACE.make +FILE_FILTERS = namespace +namespace_FILTER_RULES = -e 's|S11N_NAMESPACE|$(S11N_NAMESPACE)|g' +NAMESPACE_PREFIX = src/ +namespace_FILTER_SOURCES = $(wildcard $(NAMESPACE_PREFIX)*.cpp $(NAMESPACE_PREFIX)*.h) +namespace_FILTER_NAMESED = s,$(NAMESPACE_PREFIX),, +include $(TOC_MAKESDIR)/FILE_FILTERS.make -all: NAMESPACE BIN_PROGRAMS SHARED_LIBS tip link-bigso +all: FILE_FILTERS BIN_PROGRAMS SHARED_LIBS tip link-bigso alt: clean ALTS11N=1 ${MAKE} + +foo: FILE_FILTERS |
From: <sg...@us...> - 2003-12-10 19:38:32
|
Update of /cvsroot/libfunutil/libfunutil/client/s11nconvert/src In directory sc8-pr-cvs1:/tmp/cvs-serv13045/client/s11nconvert/src Log Message: Directory /cvsroot/libfunutil/libfunutil/client/s11nconvert/src added to the repository |
From: <sg...@us...> - 2003-12-10 19:38:18
|
Update of /cvsroot/libfunutil/libfunutil/client/s11nconvert In directory sc8-pr-cvs1:/tmp/cvs-serv13021/client/s11nconvert Removed Files: ns.AltSerializable.cpp ns.AltSerializable.h ns.BarClass.cpp ns.BarClass.h ns.FooClass.cpp ns.FooClass.h ns.LoadableClass.h ns.LoadableSubclass.cpp ns.LoadableSubclass.h ns.main.cpp ns.maser.cpp Log Message: moved to src/ --- ns.AltSerializable.cpp DELETED --- --- ns.AltSerializable.h DELETED --- --- ns.BarClass.cpp DELETED --- --- ns.BarClass.h DELETED --- --- ns.FooClass.cpp DELETED --- --- ns.FooClass.h DELETED --- --- ns.LoadableClass.h DELETED --- --- ns.LoadableSubclass.cpp DELETED --- --- ns.LoadableSubclass.h DELETED --- --- ns.main.cpp DELETED --- --- ns.maser.cpp DELETED --- |
From: <sg...@us...> - 2003-12-09 21:22:51
|
Update of /cvsroot/libfunutil/libfunutil/toc/make In directory sc8-pr-cvs1:/tmp/cvs-serv22290 Modified Files: qmake2make.make Log Message: fixed some brain-dead target-propogation bugs caused when i (partially) replaced the eval-related code with non-eval equivalents (and left out a huge part, apparently). Index: qmake2make.make =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/make/qmake2make.make,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- qmake2make.make 5 Sep 2003 09:30:19 -0000 1.19 +++ qmake2make.make 9 Dec 2003 21:22:48 -0000 1.20 @@ -14,12 +14,12 @@ # to call the appropriate targets in the qmake-processed files. -QMAKE_QMAKE2MAKE_MAKE = $(toc_makesdir)/qmake2make.make +QMAKE_QMAKE2MAKE_MAKE = $(TOC_MAKESDIR)/qmake2make.make ifeq (,$(wildcard $(QTDIR))) $(error $(QMAKE_QMAKE2MAKE_MAKE) requires the QTDIR var. Maybe you need to run the qt test?) endif ifeq (,$(DEPSGEN_BIN)) -include $(toc_makesdir)/deps.make +include $(TOC_MAKESDIR)/deps.make endif MAKE_NO_PRINT_DIR = ${MAKE} --no-print-directory @@ -45,10 +45,11 @@ @test -f "$<" || exit 0; \ cmd="$(QMAKE) -o $@ $*$(QMAKEFILE_SUFFIX)"; echo $$cmd; $$cmd @echo "Collecting source dependencies for $@... "; \ - getter=$(toc_tocdir)/bin/getMakefileVar; \ + getter=$(TOC_HOME)/bin/getMakefileVar; \ + QTDIR=$(QTDIR); \ sources=$$($$getter SOURCES $@); \ - mocs=$$($$getter SRCMOC $@); \ - includes=$$($$getter INCPATH $@ | sed -e 's|$$(QTDIR)|$(QTDIR)|g'); \ + mocs=$$($$getter SRCMOC $@); \ + includes=$$($$getter INCPATH $@ | sed -e 's|$$(QTDIR)|$(QTDIR)|g'); \ test -z "$$sources" -a -z "$$includes" && exit 0; \ test -z "$$mocs" || { \ echo "Generating moc files... ";\ @@ -66,14 +67,14 @@ deps: $(QMAKED_MAKEFILES) # create targets for qmake-MAKEFILE-TARGET: -QMAKE_TARGETS_TO_PROPOGATE = first all install uninstall clean distclean staticlib mocables +# QMAKE_TARGETS_TO_PROPOGATE = first all install uninstall clean distclean staticlib mocables # simplified version, for compatibility with make 3.79.1 :( # note that i cannot make it depend on make.% because then it fucks up, refusing to accept targets # in the form qmake-X-Y. # i HATE that i can't use the $(eval) code, but make 3.79 (without # $(eval)) is common and it needs to be supported. -qmake-%: +qmake-%:# expects qmake-MAKEFILE_BASE_NAME_-TARGET, e.g. qmake-myproject-all @t=$*; head=$${t%%-*}; tail=$${t##*-}; \ mf=$(GNUMAKEFILE_PREFIX)$$head; \ test "$$head" = "$$tail" && tail=all; \ @@ -85,12 +86,16 @@ # tie in to the standard targets: install: $(patsubst %,qmake-%-install,$(QMAKES)) uninstall: $(patsubst %,qmake-%-uninstall,$(QMAKES)) +first: $(patsubst %,qmake-%-first,$(QMAKES)) +clean: $(patsubst %,qmake-%-clean,$(QMAKES)) +distclean: $(patsubst %,qmake-%-distclean,$(QMAKES)) +staticlib: $(patsubst %,qmake-%-staticlib,$(QMAKES)) +mocables: $(patsubst %,qmake-%-mocables,$(QMAKES)) -QMAKE_CLEANS = $(patsubst %,qmake-%-clean,$(QMAKES)) -QMAKE_DISTCLEANS = $(patsubst %,qmake-%-distclean,$(QMAKES)) -clean-.: $(QMAKE_CLEANS) -distclean-.: $(QMAKE_DISTCLEANS) +CLEAN_FILES += $(patsubst %,qmake-%-clean,$(QMAKES)) +DISTCLEAN_FILES = $(patsubst %,qmake-%-distclean,$(QMAKES)) qmake: $(patsubst %,qmake-%,$(QMAKES)) + DISTCLEAN_FILES += $(QMAKED_MAKEFILES) # ^^^ these /should/ be CLEAN_FILES, but that causes a lot of unneeded file rebuilding. |
From: <sg...@us...> - 2003-11-29 13:50:09
|
Update of /cvsroot/libfunutil/libfunutil/client/s11nconvert In directory sc8-pr-cvs1:/tmp/cvs-serv20597 Modified Files: ns.AltSerializable.h ns.main.cpp ns.maser.cpp Log Message: namespace/build-related fixes from the s11n tree Index: ns.AltSerializable.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/ns.AltSerializable.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ns.AltSerializable.h 19 Nov 2003 23:08:33 -0000 1.3 +++ ns.AltSerializable.h 29 Nov 2003 13:50:05 -0000 1.4 @@ -54,7 +54,7 @@ #if EASY_WAY SERIALIZABLE_ADAPTER(alts11n::AltSerializable,save_state,load_state); #else -CLASSLOADER_REGISTER(alts11n::AltSerializable,alts11n::AltSerializable); +S11N_NAMESPACE_CLASSLOADER_REGISTER(alts11n::AltSerializable,alts11n::AltSerializable); CLASS_NAME(alts11n::AltSerializable); namespace { typedef S11N_NAMESPACE::s11n_node node_type; Index: ns.main.cpp =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/ns.main.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 Index: ns.maser.cpp =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/ns.maser.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 |
From: <sg...@us...> - 2003-11-29 13:48:31
|
Update of /cvsroot/libfunutil/libfunutil/lib/cl In directory sc8-pr-cvs1:/tmp/cvs-serv20387 Removed Files: LoadableClass.cpp LoadableClass.h LoadableSubClass.cpp Log Message: moved to src/ --- LoadableClass.cpp DELETED --- --- LoadableClass.h DELETED --- --- LoadableSubClass.cpp DELETED --- |