#============================================================================= # # Maintainer stuff, you don't want to mess with this. # # In order to use this as-is, you'll need the following utilities: # # GNU make # GNU which-2.x # GNU date # awk # rpm-4.1 (RedHat-8) # rcs2log # cut # grep # egrep # test # sed # # This maintainer Makefile provides the following functionality: # # Targets # ------- # # - rpm # Generates the $(TARGET).rpm and src.rpm files. # # - reconfig # Reconfigure the source tree using the same options as last time. # This can be used to switch compiler versions by issuing for example: # make CC="gcc-2.95.3" CXX="g++-2.95.3" reconfig # # - full-check # Iterate over multiple configurations and compiler versions, # running the test suite for every combination. # # - doc # Does a `make' in doc/. # # - syncwww # Synchronizes on-line web sites with current documentation. # # The remaining targets can be used to test a part of the distribution process, # but are not really useful on their own otherwise. # # - ChangeLog # Generates the `ChangeLog' file from the CVS repository logs. # # - test-values # Print debugging info about variables used in this file. # RPMDIR=$(top_builddir)/rpm TARGET=@TARGET@ SPECFILE=@SPECFILE@ REL=1 TAG:=${shell echo "V@VERSION@" | sed -e 's/\./_/g'} PREVTAG:=${shell test -f .prevtag && cat .prevtag} CVSREADACCESS:=${shell if test -f $(srcdir)/CVS/Entries; then echo "yes"; else echo "no"; fi} CVSWRITEACCESS:=${shell if test x"$$LIBCW_WRITE_ACCESS" = "xyes"; then echo $(CVSREADACCESS); else echo "no"; fi} AWK=@AWK@ test-values: @echo "srcdir = \"$(srcdir)\"" @echo "RPMDIR = \"$(RPMDIR)\"" @echo "PACKAGE = \"@PACKAGE@\"" @echo "VERSION = \"@VERSION@\"" @echo "SPECFILE = \"$(SPECFILE)\"" @echo "TARGET = \"$(TARGET)\"" @echo "REL = \"$(REL)\"" @echo "CVSREADACCESS = \"$(CVSREADACCESS)\"" @echo "CVSWRITEACCESS = \"$(CVSWRITEACCESS)\"" @echo "TAG = \"$(TAG)\"" @echo "PREVTAG = \"$(PREVTAG)\"" ## Make sure the ChangeLog is up to date in maintainer mode .PHONY: tar rpm ChangeLog reconfig doc rpm: dist mv @PACKAGE@-@VERSION@.tar.gz $(RPMDIR)/SOURCES cd rpm; rpmbuild --rcfile=/usr/lib/rpm/rpmrc:rpmrc --sign --clean -ba ../$(SPECFILE) reconfig: $(top_builddir)/config.status $(top_builddir)/config.status --recheck $(top_builddir)/config.status ChangeLog: if test $(CVSREADACCESS) = yes; then \ echo "`which --skip-dot cvs` \`echo \"\$$*\" | sed -e 's%1970%1990%'\`" > cvs; \ chmod 755 cvs; \ here=`pwd`; \ (cd $(srcdir); PATH="$$here:$$PATH" rcs2log) > ChangeLog; \ rm cvs; \ else \ touch ChangeLog; \ fi # '--enable-maintainer-mode --enable-debugm --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ # '--enable-maintainer-mode --enable-debugt --enable-debugm --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ # '--enable-maintainer-mode --enable-debugm --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ # '--enable-maintainer-mode --enable-debugm --compilers=3.1,3.0.4,2.96,2.95.3' \ # '--enable-maintainer-mode --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ # '--enable-maintainer-mode --enable-debugt --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ # '--enable-maintainer-mode --enable-debugm --enable-debug --compilers=3.1,3.0.4,2.96,2.95.3' \ # '--enable-maintainer-mode --enable-debugt --enable-debugm --enable-debug --compilers=3.1,3.0.4,2.96,2.95.3' \ # '--enable-maintainer-mode --compilers=3.1,3.0.4,3.0.3,3.0.2,3.0.1,2.96,2.95.3,2.95.2' \ full-check: Makefile @( \ for c in \ '--enable-maintainer-mode --enable-debugm --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ '--enable-maintainer-mode --enable-debugt --enable-debugm --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ '--enable-maintainer-mode --enable-debugm --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ '--enable-maintainer-mode --enable-debugm --compilers=3.1,3.0.4,2.96,2.95.3' \ '--enable-maintainer-mode --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ '--enable-maintainer-mode --enable-debugt --enable-debug --disable-debug-output --compilers=3.1,3.0.4,2.96,2.95.3' \ '--enable-maintainer-mode --enable-debugm --enable-debug --compilers=3.1,3.0.4,2.96,2.95.3' \ '--enable-maintainer-mode --enable-debugt --enable-debugm --enable-debug --compilers=3.1,3.0.4,2.96,2.95.3' \ '--enable-maintainer-mode --compilers=3.1,3.0.4,3.0.3,3.0.2,3.0.1,2.96,2.95.3,2.95.2' \ ; do \ config=`echo $$c | sed -e 's/ --compilers=.*$$//'`; \ case "$$c" in \ *--disable-debug-output*) check=check ;; \ *--enable-debug\ *) check=run ;; \ *) check=check ;; \ esac; \ compilers=`echo $$c | sed -e 's/.* --compilers=//' -e 's/,/ /g'`; \ echo "*** CONFIGURATION OPTIONS: \"$$config\" (with compilers \"$$compilers\")"; \ for v in `echo $$compilers`; do \ echo "*** COMPILER VERSION: \"$$v\""; \ echo -n "Configuring... "; \ if eval "CC=\"gcc-$$v\" CXX=\"g++-$$v\" ./configure $$config >/dev/null"; then \ echo "done"; \ else \ echo "failed" && exit -1; \ fi; \ echo -n "Compiling... "; \ if make >/dev/null; then \ echo "done"; \ else \ echo "failed" && exit -1; \ fi; \ cd testsuite >/dev/null; \ echo -n "Running \`make $$check'... "; \ if if make RUNTESTFLAGS="" $$check 2>/dev/null; then \ echo "done"; \ else \ echo "*** FAILURE FOR \"$$config\" USING g++-$$v" && exit -1; \ fi | egrep '(FAIL|ERROR)'; then exit -1; else echo "ok"; fi; \ cd .. >/dev/null; \ done; \ done; \ ) doc: $(MAKE) -C doc syncwww: doc @echo "Synchronizing with libecc.sourceforge.net..." rsync -rlptz -e /usr/bin/ssh --delete --exclude-from=$(srcdir)/doc/www/exclude --delete-excluded \ $(top_builddir)/doc/ libecc-shell:"~/libecc.www/htdocs" @echo "Synchronizing with www.xs4all.nl..." rsync -rlptz -e /usr/bin/ssh --delete --exclude-from=$(srcdir)/doc/www/exclude --delete-excluded \ $(top_builddir)/doc/ xs2:"~/WWW/libecc"