From 53c3269cf5474dbcdb5564f9157ee332faf8d331 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 3 Oct 2001 15:49:32 +0000 Subject: [PATCH] more tweaks to version_info stuff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2837 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 5 + config/ChangeLog | 4 + config/lyxinclude.m4 | 10 +- configure.in | 7 +- lib/ChangeLog | 4 + lib/languages | 2 +- po/POTFILES.in | 115 ++++++++++---------- src/.cvsignore | 2 +- src/ChangeLog | 19 ++++ src/Makefile.am | 8 +- src/WorkArea.C | 4 +- src/buffer.C | 8 +- src/frontends/controllers/ChangeLog | 9 +- src/frontends/controllers/ControlAboutlyx.C | 4 +- src/lyx_main.C | 8 +- src/version.C.in | 23 ++++ src/version.h | 31 ++++-- src/version_info.h.in | 20 ---- 18 files changed, 169 insertions(+), 114 deletions(-) create mode 100644 src/version.C.in delete mode 100644 src/version_info.h.in diff --git a/ChangeLog b/ChangeLog index 8a088f0033..9fb6e45e9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-10-03 Jean-Marc Lasgouttes + + * configure.in: set version here and not in version.h. + Generate version.C instead of version_info.h + 2001-09-25 Jean-Marc Lasgouttes * configure.in (VERSION_INFO): use AC_SUBST instead of AC_DEFINE diff --git a/config/ChangeLog b/config/ChangeLog index ee20fdaedd..d0910935a3 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2001-10-03 Jean-Marc Lasgouttes + + * lyxinclude.m4 (LYX_CHECK_VERSION): renamed from LYX_GET_VERSION. + 2001-09-27 John Levon * qt2.m4: fix for mis-named -lqt2 diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index cc8d2a3ab0..7600393639 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -4,13 +4,10 @@ dnl Lars Gullik Bj dnl Allan Rae (rae@lyx.org) -dnl Usage LYX_GET_VERSION Sets "lyx_version" to the version of LyX being -dnl built, displays it and sets variable "lyx_devel" to yes or no depending -dnl whether the version is a development release or not. -AC_DEFUN(LYX_GET_VERSION,[ +dnl Usage LYX_CHECK_VERSION Displays version of LyX being built and +dnl sets variables "lyx_devel_version" and "lyx_prerelease" +AC_DEFUN(LYX_CHECK_VERSION,[ changequote(, ) dnl -VERSION=`grep '#define *LYX_VERSION' $1 | - sed -e 's/^.*"\(.*\)"$/\1/' 2>/dev/null` echo "configuring LyX version $VERSION" if echo "$VERSION" | grep 'cvs' >/dev/null ; then lyx_devel_version=yes @@ -25,7 +22,6 @@ else lyx_prerelease=no fi changequote([, ]) dnl -PACKAGE=lyx${program_suffix} AC_SUBST(lyx_devel_version) if test $lyx_devel_version = yes ; then AC_DEFINE(DEVEL_VERSION, 1, Define if you are building a development version of LyX) diff --git a/configure.in b/configure.in index c32dcce5b7..1f0ba177f7 100644 --- a/configure.in +++ b/configure.in @@ -6,7 +6,10 @@ AM_CONFIG_HEADER(src/config.h) dnl This is a trick to make autoheader do the right thing dnl AM_CONFIG_HEADER(src/config.h) AC_CONFIG_AUX_DIR(config) -LYX_GET_VERSION(${srcdir}/src/version.h) + +PACKAGE=lyx${program_suffix} +VERSION="1.2.0cvs" +LYX_CHECK_VERSION AC_CANONICAL_SYSTEM AC_VALIDATE_CACHE_SYSTEM_TYPE @@ -339,7 +342,7 @@ AC_OUTPUT([Makefile \ po/Makefile.in \ sourcedoc/Doxyfile \ src/Makefile \ - src/version_info.h \ + src/version.C \ src/mathed/Makefile \ src/graphics/Makefile \ src/insets/Makefile \ diff --git a/lib/ChangeLog b/lib/ChangeLog index cd3d4425c4..f6d7f56a23 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2001-10-03 Jean-Marc Lasgouttes + + * languages: change default encoding for estonian to latin1 + 2001-10-01 Garst R. Reese * tex/hollywood.cls: diff --git a/lib/languages b/lib/languages index a179390039..fe5730d911 100644 --- a/lib/languages +++ b/lib/languages @@ -17,7 +17,7 @@ dutch dutch "Dutch" false iso8859-1 nl "" english english "English" false iso8859-1 en "" esperanto esperanto "Esperanto" false iso8859-3 eo "" #and what country code should esperanto have?? (Garst) -estonian estonian "Estonian" false iso8859-4 et_EE "" +estonian estonian "Estonian" false iso8859-1 et_EE "" finnish finnish "Finnish" false iso8859-1 fi "" frenchb frenchb "French" false iso8859-1 fr "" french french "French (GUTenberg)" false iso8859-1 fr "" diff --git a/po/POTFILES.in b/po/POTFILES.in index d22def5a24..776a8a91ed 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,21 +1,24 @@ -src/buffer.C -src/bufferlist.C src/BufferView2.C -src/bufferview_funcs.C src/BufferView_pimpl.C src/Chktex.C src/ColorHandler.C -src/converter.C src/CutAndPaste.C +src/FontLoader.C +src/LColor.C +src/LaTeX.C +src/LyXAction.C +src/LyXSendto.C +src/LyXView.C +src/MenuBackend.C +src/buffer.C +src/bufferlist.C +src/bufferview_funcs.C +src/converter.C src/debug.C src/exporter.C -src/ext_l10n.h -src/figure_form.C src/figureForm.C -src/FontLoader.C -src/frontends/controllers/biblio.C +src/figure_form.C src/frontends/controllers/ButtonController.h -src/frontends/controllers/character.C src/frontends/controllers/ControlAboutlyx.C src/frontends/controllers/ControlBibtex.C src/frontends/controllers/ControlCharacter.C @@ -27,6 +30,8 @@ src/frontends/controllers/ControlPrint.C src/frontends/controllers/ControlSearch.C src/frontends/controllers/ControlSpellchecker.C src/frontends/controllers/ControlThesaurus.C +src/frontends/controllers/biblio.C +src/frontends/controllers/character.C src/frontends/controllers/helper_funcs.C src/frontends/gnome/FormCitation.C src/frontends/gnome/FormIndex.C @@ -35,7 +40,6 @@ src/frontends/gnome/FormRef.C src/frontends/gnome/FormToc.C src/frontends/gnome/Menubar_pimpl.C src/frontends/qt2/FileDialog.C -src/frontends/qt2/lengthcombo.C src/frontends/qt2/QAbout.C src/frontends/qt2/QBibitem.C src/frontends/qt2/QBibtex.C @@ -44,8 +48,8 @@ src/frontends/qt2/QCharacter.C src/frontends/qt2/QCitation.C src/frontends/qt2/QCitationDialog.C src/frontends/qt2/QDocument.C -src/frontends/qt2/QError.C src/frontends/qt2/QERT.C +src/frontends/qt2/QError.C src/frontends/qt2/QExternal.C src/frontends/qt2/QExternalDialog.C src/frontends/qt2/QGraphics.C @@ -67,84 +71,85 @@ src/frontends/qt2/QThesaurus.C src/frontends/qt2/QToc.C src/frontends/qt2/QURL.C src/frontends/qt2/QVCLog.C -src/frontends/xforms/combox.C +src/frontends/qt2/lengthcombo.C src/frontends/xforms/FileDialog.C -src/frontends/xforms/form_aboutlyx.C src/frontends/xforms/FormAboutlyx.C -src/frontends/xforms/form_bibitem.C src/frontends/xforms/FormBibitem.C -src/frontends/xforms/form_bibtex.C src/frontends/xforms/FormBibtex.C -src/frontends/xforms/form_browser.C -src/frontends/xforms/form_character.C src/frontends/xforms/FormCharacter.C -src/frontends/xforms/form_citation.C src/frontends/xforms/FormCitation.C -src/frontends/xforms/form_document.C src/frontends/xforms/FormDocument.C -src/frontends/xforms/form_error.C -src/frontends/xforms/FormError.C -src/frontends/xforms/form_ert.C src/frontends/xforms/FormERT.C -src/frontends/xforms/form_external.C +src/frontends/xforms/FormError.C src/frontends/xforms/FormExternal.C -src/frontends/xforms/form_filedialog.C src/frontends/xforms/FormFiledialog.C -src/frontends/xforms/form_float.C src/frontends/xforms/FormFloat.C -src/frontends/xforms/form_graphics.C src/frontends/xforms/FormGraphics.C -src/frontends/xforms/form_include.C src/frontends/xforms/FormInclude.C -src/frontends/xforms/form_index.C src/frontends/xforms/FormIndex.C src/frontends/xforms/FormLog.C src/frontends/xforms/FormMathsBitmap.C -src/frontends/xforms/form_maths_deco.C src/frontends/xforms/FormMathsDeco.C -src/frontends/xforms/form_maths_delim.C src/frontends/xforms/FormMathsDelim.C -src/frontends/xforms/form_maths_matrix.C src/frontends/xforms/FormMathsMatrix.C -src/frontends/xforms/form_maths_panel.C src/frontends/xforms/FormMathsPanel.C -src/frontends/xforms/form_maths_space.C src/frontends/xforms/FormMathsSpace.C -src/frontends/xforms/form_minipage.C src/frontends/xforms/FormMinipage.C -src/frontends/xforms/form_paragraph.C src/frontends/xforms/FormParagraph.C -src/frontends/xforms/form_preamble.C src/frontends/xforms/FormPreamble.C -src/frontends/xforms/form_preferences.C src/frontends/xforms/FormPreferences.C -src/frontends/xforms/form_print.C src/frontends/xforms/FormPrint.C -src/frontends/xforms/form_ref.C src/frontends/xforms/FormRef.C -src/frontends/xforms/form_search.C src/frontends/xforms/FormSearch.C -src/frontends/xforms/form_spellchecker.C src/frontends/xforms/FormSpellchecker.C -src/frontends/xforms/form_tabular.C src/frontends/xforms/FormTabular.C -src/frontends/xforms/form_tabular_create.C src/frontends/xforms/FormTabularCreate.C -src/frontends/xforms/form_thesaurus.C src/frontends/xforms/FormThesaurus.C -src/frontends/xforms/form_toc.C src/frontends/xforms/FormToc.C -src/frontends/xforms/form_url.C src/frontends/xforms/FormUrl.C src/frontends/xforms/FormVCLog.C -src/frontends/xforms/input_validators.C src/frontends/xforms/Menubar_pimpl.C +src/frontends/xforms/combox.C +src/frontends/xforms/form_aboutlyx.C +src/frontends/xforms/form_bibitem.C +src/frontends/xforms/form_bibtex.C +src/frontends/xforms/form_browser.C +src/frontends/xforms/form_character.C +src/frontends/xforms/form_citation.C +src/frontends/xforms/form_document.C +src/frontends/xforms/form_error.C +src/frontends/xforms/form_ert.C +src/frontends/xforms/form_external.C +src/frontends/xforms/form_filedialog.C +src/frontends/xforms/form_float.C +src/frontends/xforms/form_graphics.C +src/frontends/xforms/form_include.C +src/frontends/xforms/form_index.C +src/frontends/xforms/form_maths_deco.C +src/frontends/xforms/form_maths_delim.C +src/frontends/xforms/form_maths_matrix.C +src/frontends/xforms/form_maths_panel.C +src/frontends/xforms/form_maths_space.C +src/frontends/xforms/form_minipage.C +src/frontends/xforms/form_paragraph.C +src/frontends/xforms/form_preamble.C +src/frontends/xforms/form_preferences.C +src/frontends/xforms/form_print.C +src/frontends/xforms/form_ref.C +src/frontends/xforms/form_search.C +src/frontends/xforms/form_spellchecker.C +src/frontends/xforms/form_tabular.C +src/frontends/xforms/form_tabular_create.C +src/frontends/xforms/form_thesaurus.C +src/frontends/xforms/form_toc.C +src/frontends/xforms/form_url.C +src/frontends/xforms/input_validators.C src/frontends/xforms/xforms_helpers.C src/gettext.h src/importer.C src/insets/figinset.C -src/insets/insetbib.C src/insets/inset.C +src/insets/insetbib.C src/insets/insetcaption.C src/insets/inseterror.C src/insets/insetert.C @@ -169,25 +174,19 @@ src/insets/insettoc.C src/insets/inseturl.C src/kbsequence.C src/language.C -src/LaTeX.C src/layout.C -src/LColor.C -src/LyXAction.C src/lyx_cb.C +src/lyx_gui_misc.C +src/lyx_main.C src/lyxfind.C src/lyxfont.C src/lyxfunc.C -src/lyx_gui_misc.C -src/lyx_main.C src/lyxrc.C -src/LyXSendto.C src/lyxvc.C -src/LyXView.C -src/mathed/formulabase.C src/mathed/formula.C +src/mathed/formulabase.C src/mathed/formulamacro.C src/mathed/math_cursor.C -src/MenuBackend.C src/minibuffer.C src/paragraph.C src/print_form.C @@ -196,6 +195,6 @@ src/support/getUserName.C src/support/path.C src/support/path.h src/tabular.C -src/text2.C src/text.C +src/text2.C src/ext_l10n.h diff --git a/src/.cvsignore b/src/.cvsignore index ace611468c..7e03265610 100644 --- a/src/.cvsignore +++ b/src/.cvsignore @@ -1,6 +1,6 @@ ext_l10n.h config.h -version_info.h +version.C lyx Makefile Makefile.in diff --git a/src/ChangeLog b/src/ChangeLog index cb68d11e7f..3ebd8a7309 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2001-10-03 Jean-Marc Lasgouttes + + * .cvsignore: update + + * lyx_main.C (commandLineVersionInfo): use new style version info. + + * buffer.C (writeFile): + (makeLaTeXFile): + (makeLinuxDocFile): + (makeDocBookFile): use lyx_docversion instead of LYX_DOCVERSION. + + * WorkArea.C (WorkArea): use lyx_version instead of LYX_VERSION. + + * version.h: update to use stuff in version.C + + * version.C.in: new file. Contains version information determined + at compile time. This is a merging of version.h and + version_info.h.in. + 2001-10-03 Juergen Vigna * BufferView_pimpl.C (update): don't change "dirty" status in diff --git a/src/Makefile.am b/src/Makefile.am index 33c8d01a30..014fb34378 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,11 +13,12 @@ lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(SIGC_LIBS) \ $(PSPELL_LIBS) @AIKSAURUS_LIBS@ #lyx_LDFLAGS=-Wl,-O1 -EXTRA_DIST = config.h.in stamp-h.in cheaders ext_l10n.h version_info.h.in +EXTRA_DIST = config.h.in stamp-h.in cheaders ext_l10n.h version.C.in ETAGS_ARGS = --lang=c++ BOOST_INCLUDES = -I$(top_srcdir)/boost INCLUDES = $(SIGC_CFLAGS) $(BOOST_INCLUDES) $(PSPELL_INCLUDES) @FRONTEND_INCLUDES@ localedir = $(datadir)/locale +BUILT_SOURCES = version.C lyx_SOURCES = \ BufferView.C \ BufferView.h \ @@ -212,8 +213,8 @@ lyx_SOURCES = \ undostack.h \ vc-backend.C \ vc-backend.h \ + version.C \ version.h \ - version_info.h.in \ vms_defines.h \ vspace.C \ vspace.h @@ -221,8 +222,7 @@ lyx_SOURCES = \ lyx_main.o: lyx_main.C lyx_main.h config.h version.h lyx_gui.h \ lyx_gui_misc.h lyxrc.h support/path.h support/filetools.h \ bufferlist.h debug.h support/FileInfo.h lastfiles.h intl.h \ - lyxserver.h layout.h gettext.h kbmap.h commandtags.h language.h \ - version_info.h.in + lyxserver.h layout.h gettext.h kbmap.h commandtags.h language.h $(CXXCOMPILE) -DLYX_DIR=\"$(pkgdatadir)\" \ -DTOP_SRCDIR=\"$(top_srcdir)\" -c $(top_srcdir)/src/lyx_main.C diff --git a/src/WorkArea.C b/src/WorkArea.C index f8ece1cb31..6141f22dc3 100644 --- a/src/WorkArea.C +++ b/src/WorkArea.C @@ -21,7 +21,7 @@ #include "LyXView.h" #include "support/filetools.h" // LibFileSearch #include "lyxrc.h" // lyxrc.show_banner -#include "version.h" // LYX_VERSION +#include "version.h" // lyx_version #include "support/LAssert.h" #if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5) @@ -123,7 +123,7 @@ WorkArea::WorkArea(int xpos, int ypos, int width, int height) int const text_y = splash_y + 255; splash_text_ = obj = fl_add_text(FL_NORMAL_TEXT, text_x, text_y, 160, 16, - LYX_VERSION); + lyx_version); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_mapcolor(FL_FREE_COL2, 0x2b, 0x47, 0x82); fl_mapcolor(FL_FREE_COL3, 0xe1, 0xd2, 0x9b); diff --git a/src/buffer.C b/src/buffer.C index 6f719a158d..d9dc5782f5 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1697,7 +1697,7 @@ bool Buffer::writeFile(string const & fname, bool flag) const // The top of the file should not be written by params. // write out a comment in the top of the file - ofs << '#' << LYX_DOCVERSION + ofs << '#' << lyx_docversion << " created this file. For more info see http://www.lyx.org/\n" << "\\lyxformat " << LYX_FORMAT << "\n"; @@ -1971,7 +1971,7 @@ void Buffer::makeLaTeXFile(string const & fname, texrow.start(paragraph, 0); if (!only_body && nice) { - ofs << "%% " LYX_DOCVERSION " created this file. " + ofs << "%% " << lyx_docversion << " created this file. " "For more info, see http://www.lyx.org/.\n" "%% Do not edit unless you really know what " "you are doing.\n"; @@ -2577,7 +2577,7 @@ void Buffer::makeLinuxDocFile(string const & fname, bool nice, bool body_only) } } - ofs << "\n"; @@ -3045,7 +3045,7 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body) } sgmlOpenTag(ofs, 0, top); - ofs << "\n"; vector environment_stack(10); diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 842c3ad949..64d938fc9e 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,7 +1,12 @@ +2001-10-03 Jean-Marc Lasgouttes + + * ControlAboutlyx.C (getVersion): use lyx_version and + lyx_release_date instead of old macros + 2001-09-27 Angus Leeming - * ControlSpellchecker.C (check): Behaves well now when the spell library - doesn't know a replacement to an incorrect word. + * ControlSpellchecker.C (check): Behaves well now when the spell + library doesn't know a replacement to an incorrect word. 2001-09-27 Angus Leeming diff --git a/src/frontends/controllers/ControlAboutlyx.C b/src/frontends/controllers/ControlAboutlyx.C index eee78a7b6a..103ae87e06 100644 --- a/src/frontends/controllers/ControlAboutlyx.C +++ b/src/frontends/controllers/ControlAboutlyx.C @@ -83,9 +83,9 @@ string const ControlAboutlyx::getVersion() const stringstream ss; ss << _("LyX Version ") - << LYX_VERSION + << lyx_version << " of " - << LYX_RELEASE + << lyx_release_date << "\n" << ("Library directory: ") << MakeDisplayPath(system_lyxdir) diff --git a/src/lyx_main.C b/src/lyx_main.C index 795c4360db..4e08e372c0 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -17,8 +17,7 @@ #pragma implementation #endif -#include "version.h" -#include +#include #include "lyx_main.h" #include "lyx_gui.h" #include "LyXView.h" @@ -777,10 +776,11 @@ void commandLineHelp() // Give command line version information void commandLineVersionInfo() { - lyxerr << "LyX " LYX_VERSION << " of " LYX_RELEASE << endl; + lyxerr << "LyX " << lyx_version + << " of " << lyx_release_date << endl; lyxerr << "Built on " << __DATE__ << ", " << __TIME__ << endl; - lyxerr << version_info << endl; + lyxerr << lyx_version_info << endl; } diff --git a/src/version.C.in b/src/version.C.in new file mode 100644 index 0000000000..4af6a71250 --- /dev/null +++ b/src/version.C.in @@ -0,0 +1,23 @@ +/* -*- C++ -*- */ +/* * This file is part of + * ====================================================== + * + * LyX, the High Level Word Processor + * + * Copyright 1995 Matthias Ettrich + * Copyright 1995, 2001 The LyX Team. + * + *======================================================*/ + + +/// +char const * lyx_version = "@VERSION@"; +/// +char const * lyx_release_date = "Thu, Jan 11, 2001"; + +/// This version string is intended to be used in files created by LyX +char const * lyx_docversion = "LyX 1.2"; + +/// This is the version information shown by 'lyx -version' +char const * lyx_version_info = "@VERSION_INFO@"; + diff --git a/src/version.h b/src/version.h index b983a3481c..22b0be74d3 100644 --- a/src/version.h +++ b/src/version.h @@ -1,9 +1,26 @@ -// -*- C++ -*- -/* Version and release date definition */ +/* -*- C++ -*- */ +/* * This file is part of + * ====================================================== + * + * LyX, the High Level Word Processor + * + * Copyright 1995 Matthias Ettrich + * Copyright 1995, 2001 The LyX Team. + * + *======================================================*/ + +#ifndef VERSION_H +#define VERSION_H + /// -#define LYX_VERSION "1.2.0cvs" +extern char const * lyx_version; /// -#define LYX_RELEASE "Thu, Jan 11, 2001" -/* This version string is intended to be used in files created by LyX */ -/// -#define LYX_DOCVERSION "LyX 1.2" +extern char const * lyx_release_date; + +/// This version string is intended to be used in files created by LyX +extern char const * lyx_docversion; + +/// This is the version information shown by 'lyx -version' +extern char const * lyx_version_info; + +#endif diff --git a/src/version_info.h.in b/src/version_info.h.in deleted file mode 100644 index c297e2403c..0000000000 --- a/src/version_info.h.in +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- C++ -*- */ -/* This file contains configuration information configuration file for - LyX. It was generated by autoconf's configure. Do not modify it. - - * This file is part of - * ====================================================== - * - * LyX, the High Level Word Processor - * - * Copyright 1995 Matthias Ettrich - * Copyright 1995, 2001 The LyX Team. - * - *======================================================*/ - -#ifndef VERSION_INFO_H -#define VERSION_INFO_H - -char const * version_info = "@VERSION_INFO@"; - -#endif