From e5e65c031c05dee8caa0995219c208ecd5e80dde Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Tue, 12 Aug 2008 09:05:30 +0000 Subject: [PATCH] Update LYX_DIR_XXx and LYX_USERDIR_XXx environment variable names in docs and manpages at install time. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26119 a592a061-630c-0410-9148-cb99ea01b6c8 --- Makefile.am | 3 ++- lib/doc/Customization.lyx | 2 +- lib/doc/Makefile.am | 34 ++++++++++++++++++++++++++++++++++ lib/doc/de/Customization.lyx | 2 +- lib/doc/eu/Customization.lyx | 2 +- lib/doc/fr/Customization.lyx | 2 +- lib/doc/it/Customization.lyx | 2 +- lyx.man | 8 ++++---- 8 files changed, 45 insertions(+), 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index 81ee29e1f1..96783b16b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,7 +28,8 @@ EXTRA_DIST = ANNOUNCE INSTALL.autoconf RELEASE-NOTES UPGRADING \ man_MANS = lyx.1 lyx.1: - cp -p $(srcdir)/lyx.man lyx.1 + sed -e "s/LYX_DIR_VER/$(LYX_DIR_VER)/g" \ + -e "s/LYX_USERDIR_VER/$(LYX_USERDIR_VER)/g" $(srcdir)/lyx.man > lyx.1 rpmdist: dist $(LN_S) $(srcdir)/lib/images/lyx.png . ; \ diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index eb7e77144d..46102850b6 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -1264,7 +1264,7 @@ status collapsed status collapsed \begin_layout Plain Layout -LYX_USERDIR_16x +LYX_USERDIR_VER \end_layout \end_inset diff --git a/lib/doc/Makefile.am b/lib/doc/Makefile.am index 1ba8daf76b..16ca7c5ac8 100644 --- a/lib/doc/Makefile.am +++ b/lib/doc/Makefile.am @@ -253,6 +253,30 @@ dist_doc_DATA = \ doc_DATA = $(docfiles) +doc_files = \ + $(dist_doc_DATA) \ + $(dist_cadoc_DATA) \ + $(dist_csdoc_DATA) \ + $(dist_dadoc_DATA) \ + $(dist_dedoc_DATA) \ + $(dist_esdoc_DATA) \ + $(dist_eudoc_DATA) \ + $(dist_frdoc_DATA) \ + $(dist_gldoc_DATA) \ + $(dist_hedoc_DATA) \ + $(dist_hudoc_DATA) \ + $(dist_itdoc_DATA) \ + $(dist_jadoc_DATA) \ + $(dist_nldoc_DATA) \ + $(dist_nbdoc_DATA) \ + $(dist_pldoc_DATA) \ + $(dist_ptdoc_DATA) \ + $(dist_rodoc_DATA) \ + $(dist_rudoc_DATA) \ + $(dist_skdoc_DATA) \ + $(dist_sldoc_DATA) \ + $(dist_svdoc_DATA) + DEPENDFILE = $(srcdir)/Makefile.depend # include $(DEPENDFILE) does not work because automake is too limited. include $(srcdir)/Makefile.depend @@ -284,6 +308,16 @@ install-data-hook: $(tocfiles) else file="$$i"; fi; \ $(docDATA_INSTALL) "$$file" "$(DESTDIR)$(docdir)/$$i"; \ done + for i in $(doc_files); \ + do \ + if $(EGREP) -q "LYX_DIR_VER|LYX_USERDIR_VER" "$(DESTDIR)$(docdir)/$$i"; then \ + sed -e "s/LYX_DIR_VER/$(LYX_DIR_VER)/g" \ + -e "s/LYX_USERDIR_VER/$(LYX_USERDIR_VER)/g" \ + "$(DESTDIR)$(docdir)/$$i" > "$(DESTDIR)$(docdir)/$$i.tmp"; \ + mv -f "$(DESTDIR)$(docdir)/$$i.tmp" "$(DESTDIR)$(docdir)/$$i"; \ + chmod 644 "$(DESTDIR)$(docdir)/$$i"; \ + fi; \ + done uninstall-local: for i in $(tocfiles); \ diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index 01fd0bde3e..7afa9bc582 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -1164,7 +1164,7 @@ Indem Sie LyX mit der Option Anstelle der Kommandozeilenoption können Sie übrigens auch die Umgebungsvariabl e \family typewriter -LYX_USERDIR_15x +LYX_USERDIR_VER \family default auf das zu verwendende Verzeichnis setzen. \end_layout diff --git a/lib/doc/eu/Customization.lyx b/lib/doc/eu/Customization.lyx index e7bd90ef05..674ec6c6be 100644 --- a/lib/doc/eu/Customization.lyx +++ b/lib/doc/eu/Customization.lyx @@ -799,7 +799,7 @@ Erabdir dira). Ohartu zaitez \family typewriter -LYX_USERDIR_15x +LYX_USERDIR_VER \family default inguruneko aldagaia balio hauetariko batekin ezartzeak antzeko eragina duela. diff --git a/lib/doc/fr/Customization.lyx b/lib/doc/fr/Customization.lyx index 8a169d8eb1..0de8510976 100644 --- a/lib/doc/fr/Customization.lyx +++ b/lib/doc/fr/Customization.lyx @@ -923,7 +923,7 @@ RépUtilisateur Ces répertoires sont complètement indépendants (mais lisez la suite). Notez que la variable d'environnement \family typewriter -LYX_USERDIR_15x +LYX_USERDIR_VER \family default a exactement le même rôle. \end_layout diff --git a/lib/doc/it/Customization.lyx b/lib/doc/it/Customization.lyx index a051ca1877..624007cd72 100644 --- a/lib/doc/it/Customization.lyx +++ b/lib/doc/it/Customization.lyx @@ -879,7 +879,7 @@ Userdir Queste directory sono completamente indipendenti (ma continuate a leggere). Notare che settare la variabile ambientale \family typewriter -LYX_USERDIR_11x +LYX_USERDIR_VER \family default allo stesso valore ha esattamente lo stesso effetto. \end_layout diff --git a/lyx.man b/lyx.man index 9506d01624..2b6879e6ce 100644 --- a/lyx.man +++ b/lyx.man @@ -75,7 +75,7 @@ where fmt is the import format of choice and file.xxx is the file to be imported .SH ENVIRONMENT .TP -.B LYX_DIR_16x +.B LYX_DIR_VER can be used to specify which system directory to use. .PP The system directory is determined by searching for the file @@ -83,7 +83,7 @@ The system directory is determined by searching for the file .br 1) \-sysdir command line parameter .br -2) LYX_DIR_16x environment variable +2) LYX_DIR_VER environment variable .br 3) Maybe /TOP_SRCDIR/lib .br @@ -91,14 +91,14 @@ The system directory is determined by searching for the file .br 5) hardcoded lyx_dir (usually /usr/local/share/lyx on UNIX) .TP -.B LYX_USERDIR_16x +.B LYX_USERDIR_VER can be used to specify which user directory to use. .PP The user directory is, in order of precedence: .br 1) \-userdir command line parameter .br -2) LYX_USERDIR_16x environment variable +2) LYX_USERDIR_VER environment variable .br 3) $HOME/. if no explicit setting is made