From 90903c3a5f562b908190d746b36a4417e1e984ba Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Wed, 8 Feb 2006 17:15:07 +0000 Subject: [PATCH] implemented "install" target --- helm/software/Makefile | 12 +++++++----- helm/software/matita/Makefile | 26 ++++++++++++++++++++------ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/helm/software/Makefile b/helm/software/Makefile index 9be238e0c..6a16621dc 100644 --- a/helm/software/Makefile +++ b/helm/software/Makefile @@ -31,7 +31,8 @@ CLEAN_ON_DIST = \ components/license \ $(NULL) EXTRA_DIST = \ - matita/dist/AUTHORS \ + matita/AUTHORS \ + matita/LICENSE \ matita/dist/COPYING \ matita/dist/INSTALL \ matita/dist/README \ @@ -40,7 +41,7 @@ EXTRA_DIST = \ Makefile.defs.in \ $(NULL) -distcheck: dist dist_extract dist_build +distcheck: dist dist_extract dist_test dist: dist_mktmpdir dist_export dist_mktarball dist_rmtmpdir dist/configure.ac: configure.ac matita/dist/configure.ac.sed @@ -66,13 +67,14 @@ dist_mktarball: dist_extract: tar xzf $(DISTDIR).tar.gz -dist_build: +dist_test: (cd $(DISTDIR)/ \ && ./configure \ && $(MAKE) world \ - && $(MAKE) library) + && $(MAKE) library \ + && $(MAKE) install DESTDIR=`pwd`/install) -.PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_build dist_autotools +.PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_test dist_autotools # }}} End of distribution stuff diff --git a/helm/software/matita/Makefile b/helm/software/matita/Makefile index e453add9c..749ed0f71 100644 --- a/helm/software/matita/Makefile +++ b/helm/software/matita/Makefile @@ -219,7 +219,7 @@ dist_library@%: endif -DEST = @RT_BASE_DIR@ +DESTDIR = $(RT_BASE_DIR) INSTALL_STUFF = \ icons/ \ matita.gtkrc \ @@ -227,21 +227,35 @@ INSTALL_STUFF = \ matita.ma.templ \ core_notation.moo \ matita.conf.xml \ + matita.conf.xml.user \ closed.xml \ gtkmathview.matita.conf.xml \ template_makefile.in \ - library/ \ - $(PROGRAMS_BYTE) \ + AUTHORS \ + LICENSE \ $(NULL) ifeq ($(HAVE_OCAMLOPT),yes) INSTALL_STUFF += $(PROGRAMS_OPT) +else +INSTALL_STUFF += $(PROGRAMS_BYTE) endif install: - install -d $(DEST) - cp -a .matita/ - cp -a $(INSTALL_STUFF) $(DEST) + # install main dir and executables + install -d $(DESTDIR) + cp -a $(INSTALL_STUFF) $(DESTDIR) + # install the library and corresponding scripts + if [ -d $(DESTDIR)/library ]; then rm -rf $(DESTDIR)/library; fi + cp -a .matita/xml/matita/ $(DESTDIR)/library/ + if [ -d $(DESTDIR)/ma ]; then rm -rf $(DESTDIR)/ma; fi + install -d $(DESTDIR)/ma +ifeq ($(HAVE_OCAMLOPT),yes) + for p in $(PROGRAMS_BYTE); do ln -s $$p.opt $(DESTDIR)/$$p; done +endif + cp -a library/ $(DESTDIR)/ma/stdlib/ + cp -a contribs/ $(DESTDIR)/ma/contribs/ uninstall: + rm -rf $(DESTDIR) STATIC_LINK = dist/static_link/static_link # for matita -- 2.39.2