]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/Makefile
Added module GrafiteWalker, which implements traversals (recursive and not) over
[helm.git] / matita / Makefile
index e453add9c86830f83baa0629eaf8ae3a0c9bbeca..39b348eea1a9ac19867bc15ec661835eb5695603 100644 (file)
@@ -178,9 +178,9 @@ tests.opt: $(foreach d,$(TEST_DIRS),$(d)-test-opt)
 cleantests: $(foreach d,$(TEST_DIRS),$(d)-cleantests)
 cleantests.opt: $(foreach d,$(TEST_DIRS),$(d)-cleantests-opt)
 
-%-test: matitac matitadep matitaclean coq.moo
+%-test: matitac matitadep matitaclean 
        -cd $* && make -k clean all
-%-test-opt: matitac.opt matitadep.opt matitaclean.opt coq.moo.opt
+%-test-opt: matitac.opt matitadep.opt matitaclean.opt
        -cd $* && make -k clean.opt opt
 %-cleantests: matitaclean
        -cd $* && make clean
@@ -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