Index: pgadmin/frm/module.mk =================================================================== --- pgadmin/frm/module.mk (revision 8441) +++ pgadmin/frm/module.mk (working copy) @@ -36,5 +36,3 @@ EXTRA_DIST += \ $(srcdir)/frm/module.mk - - Index: pgadmin/ver_svn.sh =================================================================== --- pgadmin/ver_svn.sh (revision 8441) +++ pgadmin/ver_svn.sh (working copy) @@ -1,14 +1,19 @@ #!/bin/sh OV=unknown -if [ -d .svn ]; then +if [ -d .svn -o -d ../.git ]; then if [ -f include/svnversion.h ]; then OV=$(cat include/svnversion.h | sed -e 's/#define VERSION_SVN "\(.*\)"/\1/') fi fi -NV=$(svnversion ..) +if [ -d .svn ]; then + NV=$(svnversion ..) +elif [ -d ../.git ]; then + NV=$(git describe --always) +fi + if [ "$OV" != "$NV" ]; then echo Refreshing svnversion.h echo "#define VERSION_SVN \"$NV\"" > include/svnversion.h Index: pgadmin/Makefile.deps =================================================================== --- pgadmin/Makefile.deps (revision 0) +++ pgadmin/Makefile.deps (revision 0) @@ -0,0 +1,5 @@ +frmAbout.o: $(srcdir)/include/svnversion.h +$(srcdir)/include/svnversion.h: fake-update-svn-target + ./ver_svn.sh + +fake-update-svn-target: Index: pgadmin/Makefile.am =================================================================== --- pgadmin/Makefile.am (revision 8441) +++ pgadmin/Makefile.am (working copy) @@ -12,7 +12,6 @@ bin_PROGRAMS = pgadmin3 pgadmin3_SOURCES = \ - $(srcdir)/include/svnversion.cpp \ $(srcdir)/pgAdmin3.cpp EXTRA_DIST = \ @@ -20,14 +19,11 @@ $(srcdir)/precomp.cpp \ $(srcdir)/pgAdmin3.rc \ $(srcdir)/ver_svn.bat - -# Generate svnversion.h every time, but only if repo version has changed. -.PHONY: $(srcdir)/include/svnversion.cpp -$(srcdir)/include/svnversion.cpp: - test -f $(srcdir)/include/svnversion.cpp || touch $(srcdir)/include/svnversion.cpp - test -d $(srcdir)/.svn && ( V=`svnversion $(srcdir)/..` && OV=`cat $(srcdir)/include/svnversion.h | cut -d' ' -f3|tr -d '"'` ; if [ "$$V" != "$$OV" ]; then echo "#define VERSION_SVN \"$$V\"" > $(srcdir)/include/svnversion.h ; fi ) || true - test -f $(srcdir)/include/svnversion.h -o -d $(srcdir)/.git/svn || echo "#define VERSION_SVN \"$$(git svn info | grep Revision: | sed -e 's/Revision: //'):$$(git svn info | grep Last\ Changed\ Rev: | sed -e 's/Last Changed Rev: //')\"" > $(srcdir)/include/svnversion.h - test -f $(srcdir)/include/svnversion.h || echo "#define VERSION_SVN \"unknown\"" > $(srcdir)/include/svnversion.h + +# Make sure we always have these dependencies, even if dependency tracking +# is turend off. The leading dash keeps automake from trying to process this. +-include Makefile.deps + TMP_ui = # Include all the sub-Makefiles