]> matita.cs.unibo.it Git - helm.git/commitdiff
improved autoconfiguration
authorLuca Padovani <luca.padovani@unito.it>
Wed, 17 Jan 2001 18:17:10 +0000 (18:17 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Wed, 17 Jan 2001 18:17:10 +0000 (18:17 +0000)
helm/helm_data/Makefile.in
helm/helm_data/configure.in
helm/helm_data/helm_data-0.0.1-1.spec [deleted file]
helm/helm_data/helm_data.spec.in [new file with mode: 0644]

index f969fd7a11a56d0991fafa420340c0cb48684032..bf5738b22c2aefaaa9754065749b12af95db2a87 100644 (file)
@@ -1,12 +1,15 @@
-HELM_DTDS_DIR=@HELM_DTDS_DIR@
-HELM_STYLES_DIR=@HELM_STYLES_DIR@
+
+HELM_DTD_DIR=@HELM_DTD_DIR@
+HELM_STYLE_DIR=@HELM_STYLE_DIR@
+
+all:
 
 install:
-       mkdir -p $(HELM_STYLES_DIR)
-       cp dtd/* $(HELM_DTDS_DIR)
-       cp style/*.xsl $(HELM_STYLES_DIR)
+       cp dtd/* $(HELM_DTD_DIR)
+       cp style/*.xsl $(HELM_STYLE_DIR)
 
 distclean:
        rm -f Makefile configure config.log config.cache config.status
+       rm -rf dtd style
 
-.PHONY: install distclean
+.PHONY: all install distclean
index e4dcc651d7a06c87c777e2619a1f415ebf756933..34d98becd0d20ec87f8797a834f985302bd91510 100644 (file)
@@ -1,31 +1,26 @@
 AC_INIT(dtd/cic.dtd)
 
-if test "x$prefix" != xNONE; then
-  RESOLVED_PREFIX=$prefix
-else
-  RESOLVED_PREFIX=$ac_default_prefix
-fi
+PACKAGE=helm_data
+MAJOR_VERSION=0
+MINOR_VERSION=0
+MICRO_VERSION=1
+VERSION=$MAJOR_VERSION.MINOR_VERSION.$MICRO_VERSION
 
-dnl General
-AC_MSG_CHECKING("for the share/helm/dtd dir")
-RES=""
-AC_CACHE_VAL(helm_cv_HELM_DTDS_DIR,
-  echo "Where should I put the DTDs? Note: your answer must be the entry of value dtd_dir in the configuration.xml file of the helm_configuration package that you should have already installed."
-  read helm_cv_HELM_DTDS_DIR
-  RES="Asked"
-)
-HELM_DTDS_DIR=$helm_cv_HELM_DTDS_DIR
-if test "$RES" != "Asked" ; then
-   HELM_DTDS_DIR=`eval "echo $HELM_DTDS_DIR"`
-   AC_MSG_RESULT($HELM_DTDS_DIR)
+AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no)
+if test $HAVE_HELM_CONFIG = no; then
+  AC_MSG_ERROR(Could not find helm-config)
 fi
-AC_CACHE_SAVE
 
-AC_MSG_CHECKING("for the share/helm/style dir")
-HELM_STYLES_DIR=$RESOLVED_PREFIX/share/helm/style
-AC_MSG_RESULT($HELM_STYLES_DIR)
+HELM_DTD_DIR=`helm-config --dtd-dir`
+HELM_STYLE_DIR=`helm-config --style-dir`
+
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+AC_SUBST(HELM_DTD_DIR)
+AC_SUBST(HELM_STYLE_DIR)
 
-AC_SUBST(HELM_DTDS_DIR)
-AC_SUBST(HELM_STYLES_DIR)
+AC_OUTPUT([
+  Makefile
+  helm_data.spec
+])
 
-AC_OUTPUT([Makefile])
diff --git a/helm/helm_data/helm_data-0.0.1-1.spec b/helm/helm_data/helm_data-0.0.1-1.spec
deleted file mode 100644 (file)
index c81b80b..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Summary: The base DTDs and XSLT stylesheets of project HELM
-Name: helm_data
-Version: 0.0.1
-Release: 1
-Copyright: GPL
-URL: http://www.cs.unibo.it/helm
-Packager: Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
-Requires: helm_configuration = 0.0.1
-Group: Applications/Publishing
-Source: www.cs.unibo.it:/~lpadovan/mml-widget/helm_data-0.0.1-1.tar.gz
-%description
-HELM (Hypertextual Electronic Library of Mathematics) is a project aimed
-at the creation of tools for the development and exploitation of a huge
-distributed library of formal mathematical knowledge. This package holds
-the base DTDs and XSLT stylesheets developed by the members of project
-HELM.
-For more information see http://www.cs.unibo.it/helm
-
-%prep
-%setup
-
-%build
-cp config.cache.pkg config.cache
-./configure
-
-%install
-make install
-
-%files
-%doc AUTHORS COPYING ChangeLog NEWS README
-
-/usr/local/share/helm/dtd
-/usr/local/share/helm/style
diff --git a/helm/helm_data/helm_data.spec.in b/helm/helm_data/helm_data.spec.in
new file mode 100644 (file)
index 0000000..fae8035
--- /dev/null
@@ -0,0 +1,34 @@
+Summary: The base DTDs and XSLT stylesheets of project HELM
+Name: @PACKAGE@
+Version: @VERSION@
+Release: 1
+Copyright: GPL
+URL: http://www.cs.unibo.it/helm
+Packager: Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
+Requires: helm_configuration = 0.0.1
+Group: Applications/Publishing
+Source: www.cs.unibo.it:/helm/@PACKAGE@-@VERSION@.tar.gz
+%description
+HELM (Hypertextual Electronic Library of Mathematics) is a project aimed
+at the creation of tools for the development and exploitation of a huge
+distributed library of formal mathematical knowledge. This package holds
+the base DTDs and XSLT stylesheets developed by the members of project
+HELM.
+For more information see http://www.cs.unibo.it/helm
+
+%prep
+%setup
+
+%build
+cp config.cache.pkg config.cache
+./configure
+make
+
+%install
+make install
+
+%files
+%doc AUTHORS COPYING ChangeLog NEWS README
+
+/usr/local/share/helm/dtd
+/usr/local/share/helm/style