+2012-09-25 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Defer generation of version.c until "make" time.
+
+ * version.c.in: Move it...
+ * src/version.c.in: ...to here.
+ (PACKAGE_NAME, PACKAGE_VERSION, COPYRIGHT_HOLDER, YEARS_OF_ISSUE):
+ Change substitution field marker character from "@" to "%".
+
+ * configure.ac (AC_CONFIG_FILES): Remove version.c
+
+ * Makefile.in (TAG_SCRIPT): New macro, factored out from...
+ (RC_SCRIPT): ...here, whence use it; also use it to implement...
+ (VERSION_SCRIPT): ...this further new macro; use it in...
+ (%.c): ...this generic template rule for version.c
+ (time-stamp, %.time, %.tagged.time, %.tag): New generic build
+ goals; use them to track package release progression via...
+ (build.tag): ...this new intermediate; make it a pre-requisite...
+ (guidata.OBJEXT, version.c): ...of these.
+
2012-09-21 Keith Marshall <keithmarshall@users.sourceforge.net>
Implement framework for GUI sash window layout controller.
RC = @RC@
RC_SCRIPT = tag=$(BUILD_TAG); \
- test "x$$tag" != x && tag="-$(GUI_RELEASE_CLASS)-$$tag"; sed \
- -e "s!%PACKAGE_NAME%!$(PACKAGE_TARNAME)!g" \
- -e "s!%PACKAGE_VERSION%!$(PACKAGE_VERSION)$$tag!g" \
- -e "s!%COPYRIGHT_HOLDER%!@COPYRIGHT_HOLDER@!g" \
- -e "s!%YEARS_OF_ISSUE%!@YEARS_OF_ISSUE@!g"
+ test "x$$tag" != x && tag="-$(GUI_RELEASE_CLASS)-$$tag"; \
+ $(TAG_SCRIPT)
+
+VERSION_SCRIPT = tag=$(BUILD_TAG); \
+ test "x$$tag" != x && tag="-$(CLI_RELEASE_CLASS)-$$tag"; \
+ $(TAG_SCRIPT)
+
+TAG_SCRIPT = sed \
+ -e "s!%PACKAGE_NAME%!$(PACKAGE_TARNAME)!g" \
+ -e "s!%PACKAGE_VERSION%!$(PACKAGE_VERSION)$$tag!g" \
+ -e "s!%COPYRIGHT_HOLDER%!@COPYRIGHT_HOLDER@!g" \
+ -e "s!%YEARS_OF_ISSUE%!@YEARS_OF_ISSUE@!g"
RC_INCLUDES = -I ${srcdir}/src -I ${srcdir}/icons
%.$(OBJEXT): %.ico
echo $* ICON $*.ico | $(RC) -I ${srcdir}/icons -o $@
+# Release tagging...
+#
+time-stamp:
+%.tagged.time: time-stamp
+ > $*.time
+
+%.time:
+ > $*.time
+
+%.tag: %.tagged.time
+ >> $@; tag=`date +%Y%m%d`; \
+ tag=`awk -F- -v today=$$tag ' \
+ BEGIN { tag = 1 } $$1 == today { tag += $$2 } \
+ END { print today "-" tag }' $@`; \
+ echo $$tag > $@
+
+%.c: %.c.in
+ $(VERSION_SCRIPT) $< > $@
+
+version.c: build.time
+guidata.$(OBJEXT): build.time
+
# Installation tools and directory paths...
#
mkinstalldirs = @MKDIR_P@
# Establish the product version banner, and create a makefile
#
- AC_CONFIG_FILES([version.c Makefile])
+ AC_CONFIG_FILES([Makefile])
MINGW_AC_OUTPUT
#
# $RCSfile$: end of file
/*
- * @configure_input@
+ * version.c
*
+ * File automatically generated -- do not edit in place!!!
+ *
+ * Generated from template:
* $Id$
*
*/
const char *version_identification =
-"@PACKAGE_NAME@ version @PACKAGE_VERSION@\n"
-"Copyright (C) @YEARS_OF_ISSUE@, @COPYRIGHT_HOLDER@\n"
+"%PACKAGE_NAME% version %PACKAGE_VERSION%\n"
+"Copyright (C) %YEARS_OF_ISSUE%, %COPYRIGHT_HOLDER%\n"
"\n"
"This is free software; see the product documentation, or source code,\n"
"for copying and redistribution conditions. There is NO WARRANTY; not\n"