fixes the year for fluxbox -version added a way to display the svn-revision-number in fluxbox -info
mathias mathias
2 files changed,
15 insertions(+),
3 deletions(-)
M
src/Makefile.am
→
src/Makefile.am
@@ -41,10 +41,19 @@ echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"' >> defaults.hh
echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"' >> defaults.hh echo '#define DEFAULT_INITFILE "$(pkgdatadir)/init"' >> defaults.hh echo '#define LOCALEPATH "$(pkgdatadir)/nls"' >> defaults.hh + echo 'const char* svnversion(void);' >> defaults.hh + +defaults.cc: force + echo 'const char* svnversion(void) {' > defaults.cc + echo ' return "'`(svnversion . | sed "s/[^0-9].*//") 2> /dev/null`'";' >> defaults.cc + echo '}' >> defaults.cc + +force: ; # an extra dep for fluxbox +fluxbox.$(OBJEXT): defaults.hh -fluxbox.$(OBJEXT): defaults.hh + if NEWWMSPEC newwmspec_SOURCE= Ewmh.hh Ewmh.cc@@ -120,4 +129,4 @@ ${newwmspec_SOURCE} ${gnome_SOURCE} \
${REMEMBER_SOURCE} ${REGEXP_SOURCE} ${TOOLBAR_SOURCE} -LDADD=FbTk/libFbTk.a +LDADD=FbTk/libFbTk.a defaults.$(OBJEXT)
M
src/main.cc
→
src/main.cc
@@ -63,6 +63,9 @@ using namespace std;
void showInfo(ostream &ostr) { _FB_USES_NLS; ostr<<_FBTEXT(Common, FluxboxVersion, "Fluxbox version", "Fluxbox version heading")<<": "<<__fluxbox_version<<endl; + + if (strlen(svnversion()) > 0) + ostr<<"SVN Revision: "<<svnversion()<<endl; #if defined(__DATE__) && defined(__TIME__) ostr<<_FBTEXT(Common, Compiled, "Compiled", "Time fluxbox was compiled")<<": "<<__DATE__<<" "<<__TIME__<<endl; #endif@@ -221,7 +224,7 @@ "\t-log <filename>\t\t\tlog output to file.\n"
"\t-help\t\t\t\tdisplay this help text and exit.\n\n", "Main usage string. Please lay it out nicely. There is one %s that is given the version"), - __fluxbox_version, "2001-2004"); + __fluxbox_version, "2001-2005"); exit(0); } else if (strcmp(argv[i], "-info") == 0 || strcmp(argv[i], "-i") == 0) { showInfo(cout);