From a7c8c1edc641a383f26da6d8e696c39bacb4e2ff Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 10 Dec 2007 22:39:34 +0100 Subject: Add proper `skribilo-config' executable. * src/Makefile.am (EXTRA_DIST): Add `skribilo-config.in'. (bin_SCRIPTS): Add `skribilo-config'. (substitute): Add new variables. * src/skribilo-config.in: Improve, based on `skribe-config.in'. --- src/Makefile.am | 10 +++++--- src/skribe-config.in | 64 -------------------------------------------------- src/skribilo-config.in | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 67 deletions(-) delete mode 100644 src/skribe-config.in create mode 100644 src/skribilo-config.in diff --git a/src/Makefile.am b/src/Makefile.am index 3a3b8ee..f701aa0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,8 @@ SUBDIRS = guile -EXTRA_DIST = skribilo.in pre-inst-skribilo.in +EXTRA_DIST = skribilo.in pre-inst-skribilo.in skribilo-config.in -bin_SCRIPTS = skribilo +bin_SCRIPTS = skribilo skribilo-config noinst_SCRIPTS = pre-inst-skribilo CLEANFILES = $(bin_SCRIPTS) $(noinst_SCRIPTS) @@ -10,10 +10,14 @@ CLEANFILES = $(bin_SCRIPTS) $(noinst_SCRIPTS) substitute = sed -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \ -e 's,[@]abs_top_srcdir[@],$(abs_top_srcdir),g' \ -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \ + -e 's,[@]prefix[@],$(prefix),g' \ + -e 's,[@]docdir[@],$(docdir),g' \ + -e 's,[@]emacsdir[@],$(emacsdir),g' \ -e 's,[@]GUILE[@],$(GUILE),g' \ -e 's,[@]PACKAGE_STRING[@],$(PACKAGE_STRING),g' \ -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \ - -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' + -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \ + -e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' SUFFIXES = .in diff --git a/src/skribe-config.in b/src/skribe-config.in deleted file mode 100644 index 2a03e26..0000000 --- a/src/skribe-config.in +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# -# Author: Erick Gallesio [eg@essi.fr] -# Creation date: 19-Nov-2003 21:04 (eg) -# Last file update: 19-Nov-2003 22:29 (eg) - - -function usage() -{ - cat <&2 -fi - -while test $# -gt 0; do - case $1 in - --prefix|-p) - echo @PREFIX@ - ;; - --version|-v) - echo @SKRIBE_RELEASE@ - ;; - --extension-dir|-e) - echo @SKRIBE_EXT_DIR@ - ;; - --skr-dir|-k) - echo @SKRIBE_SKR_DIR@ - ;; - --doc-dir|-d) - echo @SKRIBE_DOC_DIR@ - ;; - --emacs-dir|-m) - echo @SKRIBE_EMACS_DIR@ - ;; - --scheme|-s) - echo @SYSTEM@ - ;; - --help|-h|-\?) - usage 0 1>&2 - ;; - *) - echo "bad option $1" 1>&2 - usage 1 1>&2 - ;; - esac - shift -done -exit 0 - diff --git a/src/skribilo-config.in b/src/skribilo-config.in new file mode 100644 index 0000000..eb5983c --- /dev/null +++ b/src/skribilo-config.in @@ -0,0 +1,63 @@ +#!/bin/sh +# +# Author: Erick Gallesio [eg@essi.fr] +# Ludovic Courtès + + +function usage() +{ + cat <. +EOF + exit $1 +} + + +if test $# -eq 0; then + usage 1 1>&2 +fi + +while test $# -gt 0; do + case "$1" in + --version|-v) + echo @PACKAGE_VERSION@ + ;; + --prefix|-p) + echo @prefix@ + ;; + --module-dir|-m) + echo @guilemoduledir@ + ;; + --doc-dir|-d) + echo @docdir@ + ;; + --emacs-dir|-e) + echo @emacsdir@ + ;; + --scheme|-s) + echo @GUILE@ + ;; + --help|-h) + usage 0 1>&2 + ;; + *) + echo "unrecognized option \`$1'" 1>&2 + usage 1 1>&2 + ;; + esac + shift +done +exit 0 + -- cgit v1.2.3