diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2009-01-13 02:27:04 +0000 |
|---|---|---|
| committer | tweenk <tweenk@users.sourceforge.net> | 2009-01-13 02:27:04 +0000 |
| commit | a3648f82f9e66ecc2dd355e9d0c5b2f3e66b9b50 (patch) | |
| tree | 9efdab733f1ae2b3580143a0e1c91a934a020712 /src/Makefile_insert | |
| parent | Latest set of tango icons (by jEsuSdA 8) ) (diff) | |
| download | inkscape-a3648f82f9e66ecc2dd355e9d0c5b2f3e66b9b50.tar.gz inkscape-a3648f82f9e66ecc2dd355e9d0c5b2f3e66b9b50.zip | |
Improved version reporting. Add SVN revision and custom status to
version string on Linux.
(bzr r7123)
Diffstat (limited to 'src/Makefile_insert')
| -rw-r--r-- | src/Makefile_insert | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/Makefile_insert b/src/Makefile_insert index 6668600d3..6eba8897d 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -289,17 +289,12 @@ libinkpost_a_SOURCES = \ # Additional dependencies desktop.$(OBJEXT): helper/sp-marshal.h -document.$(OBJEXT): helper/sp-marshal.h inkscape_version.h -extension/internal/latex-pstricks.$(OBJEXT): inkscape_version.h -extension/internal/ps.$(OBJEXT): inkscape_version.h -inkscape.$(OBJEXT): helper/sp-marshal.h inkscape_version.h +document.$(OBJEXT): helper/sp-marshal.h +inkscape.$(OBJEXT): helper/sp-marshal.h knot.$(OBJEXT): helper/sp-marshal.h -main.$(OBJEXT): inkscape_version.h selection.$(OBJEXT): helper/sp-marshal.h sp-object.$(OBJEXT): helper/sp-marshal.h -sp-root.$(OBJEXT): inkscape_version.h view.$(OBJEXT): helper/sp-marshal.h -help.$(OBJEXT): inkscape_version.h # ################################################ @@ -316,8 +311,30 @@ inkscape_LDFLAGS = --export-dynamic $(kdeldflags) inkview_SOURCES = inkview.cpp $(win32_sources) inkview_LDADD = $(all_libs) -inkscape_version.h: ../configure.ac - echo '#define INKSCAPE_VERSION "$(VERSION)"' > inkscape_version.h +libinkversion_a_SOURCES = inkscape-version.cpp + +# Hack: make inkscape-version.cpp a phony target. +# Create the version file every time "make" is invoked. Overwrite it only +# if it changes. Watch the backslashes! +inkscape-version.cpp: + VER_PREFIX="$(VERSION)"; \ + if test -x "$(srcdir)/.svn"; then \ + VER_SVNREV=" r`svn info $(srcdir) | sed -n -e '/^Revision:/s/Revision: \(.*\)/\1/p'`"; \ + if test ! -z "`svn status -q $(srcdir)`"; then \ + VER_CUSTOM=" custom"; \ + fi; \ + fi; \ + VERSION="$$VER_PREFIX$$VER_SVNREV$$VER_CUSTOM"; \ + echo "namespace Inkscape { " \ + "char const *version_string = \"$$VERSION\"; " \ + "}" > inkscape-version.new.cpp; \ + if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \ + rm inkscape-version.new.cpp; \ + else \ + mv inkscape-version.new.cpp inkscape-version.cpp; \ + fi; \ + echo $$VERSION +.PHONY: inkscape-version.cpp # ###################### # ### CxxTest stuff #### |
