From: Stefano Zacchiroli Date: Fri, 3 Feb 2006 15:35:54 +0000 (+0000) Subject: moved toplevel makefile to sfotware/ X-Git-Tag: make_still_working~7646 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=b74c8f9039d930758cd55c387daefcd4672c34d2;hp=55b82bd235d82ff7f0a40d980effe1efde1f5073;p=helm.git moved toplevel makefile to sfotware/ --- diff --git a/helm/Makefile b/helm/Makefile deleted file mode 100644 index 30ca291c7..000000000 --- a/helm/Makefile +++ /dev/null @@ -1,63 +0,0 @@ - -include Makefile.defs - -SUBDIRS = libs matita - -all: $(foreach d,$(SUBDIRS),all.$(d)) -opt: $(foreach d,$(SUBDIRS),opt.$(d)) -clean: $(foreach d,$(SUBDIRS),clean.$(d)) -distclean: $(foreach d,$(SUBDIRS),distclean.$(d)) - -all.%: - $(MAKE) -C $* all -opt.%: - $(MAKE) -C $* opt -clean.%: - $(MAKE) -C $* clean -distclean.%: - $(MAKE) -C $* distclean -install.%: - $(MAKE) -C $* install -uninstall.%: - $(MAKE) -C $* uninstall - -BASENAME = matita -NULL = -DISTDIR = $(BASENAME)-$(MATITA_VERSION) -CLEAN_ON_DIST = \ - ocaml/license \ - $(NULL) -EXTRA_DIST = \ - dist/AUTHORS \ - dist/COPYING \ - dist/INSTALL \ - dist/README \ - dist/ChangeLog \ - Makefile \ - Makefile.defs.in \ - ./configure \ - $(NULL) - -dist: dist_autotools dist_export dist_mktarball -distcheck: dist dist_extract dist_build - -dist_autotools: - autoconf - ./configure - -dist_export: - rm -rf $(DISTDIR) - mkdir $(DISTDIR) - svn export ocaml $(DISTDIR)/ocaml - svn export matita $(DISTDIR)/matita - (cd $(DISTDIR) && rm -f $(CLEAN_ON_DIST)) - ln -fs matita.conf.xml.user $(DISTDIR)/matita/matita.conf.xml - mv $(DISTDIR)/ocaml $(DISTDIR)/libs - cp -r $(EXTRA_DIST) $(DISTDIR) - -dist_mktarball: - tar czf $(DISTDIR).tar.gz $(DISTDIR) - -.PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_build dist_autotools -.PHONY: all opt clean distclean - diff --git a/helm/Makefile.defs.in b/helm/Makefile.defs.in deleted file mode 100644 index b714a606e..000000000 --- a/helm/Makefile.defs.in +++ /dev/null @@ -1,12 +0,0 @@ -OCAMLFIND = OCAMLPATH=@OCAMLPATH@ @OCAMLFIND@ -CAMLP4O = @CAMLP4O@ -LABLGLADECC = @LABLGLADECC@ -HAVE_OCAMLOPT = @HAVE_OCAMLOPT@ - -MATITA_REQUIRES = @FINDLIB_REQUIRES@ -MATITA_CREQUIRES = @FINDLIB_CREQUIRES@ - -MATITA_VERSION = @MATITA_VERSION@ - -RT_BASE_DIR = @RT_BASE_DIR@ -DBHOST = @DBHOST@ diff --git a/helm/configure.ac b/helm/configure.ac deleted file mode 100644 index 90d14f49f..000000000 --- a/helm/configure.ac +++ /dev/null @@ -1,185 +0,0 @@ -AC_INIT(matita/matitaTypes.ml) - -# Distribution settings (i.e. settings to be manipulated before a release) -DEBUG_DEFAULT="false" -DEFAULT_DBHOST="localhost" -RT_BASE_DIR_DEFAULT="/usr/local/share/matita/" -MATITA_VERSION="0.1.0" -# End of distribution settings - -AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no) -if test $HAVE_OCAMLC = "no"; then - AC_MSG_ERROR(could not find ocamlc) -fi -AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no) -if test $HAVE_OCAMLOPT = "no"; then - AC_MSG_WARN(could not find ocamlopt: native code compilation disabled) -fi -AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no) -if test $HAVE_OCAMLFIND = "yes"; then - OCAMLFIND="ocamlfind" -else - AC_MSG_ERROR(could not find ocamlfind) -fi -AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no) -if test $HAVE_LABLGLADECC = "yes"; then - LABLGLADECC="lablgladecc2" -else - AC_MSG_ERROR(could not find lablgladecc2) -fi -AC_CHECK_PROG(HAVE_CAMLP4O, camlp4o, yes, no) -if test $HAVE_CAMLP4O = "yes"; then - CAMLP4O="camlp4o" -else - AC_MSG_ERROR(could not find camlp4o) -fi - -# look for METAS dir - -OCAMLPATH="" -LIBSPATH="" -if test -d libs ; then - OCAMLPATH=`pwd`/libs/METAS - LIBSPATH=`pwd`/libs -fi -if test -d ocaml ; then - OCAMLPATH=`pwd`/ocaml/METAS - LIBSPATH=`pwd`/ocaml -fi -if test -z $OCAMLPATH; then - AC_MSG_ERROR(could not find METAS directory) -fi - -# creating META.* - -echo -n "creating METAs ... " -for f in $OCAMLPATH/meta.*.src; do - basename=`basename $f` - metaname=`echo $basename | sed 's/meta\.\(.*\)\.src/\1/'` - dirname=`echo $metaname | sed 's/^helm-//'` - metafile="$OCAMLPATH/META.$metaname" - cp $f $metafile - echo "directory=\"$LIBSPATH/$dirname\"" >> $metafile -done -echo "done" - -# (libs) findlib requisites - -FINDLIB_LIBSREQUIRES="\ -expat \ -gdome2 \ -http \ -lablgtk2 \ -lablgtkmathview \ -lablgtksourceview \ -mysql \ -netstring \ -ulex \ -zip \ -" - -# (Matita) findlib requisites - -FINDLIB_COMREQUIRES="\ -helm-cic_disambiguation \ -helm-grafite \ -helm-grafite_engine \ -helm-grafite_parser \ -helm-hgdome \ -helm-tactics \ -" -FINDLIB_CREQUIRES=" \ -$FINDLIB_COMREQUIRES \ -" -FINDLIB_REQUIRES="\ -$FINDLIB_CREQUIRES \ -lablgtk2.glade \ -lablgtkmathview \ -lablgtksourceview \ -helm-xmldiff \ -" -for r in $FINDLIB_LIBSREQUIRES $FINDLIB_REQUIRES -do - AC_MSG_CHECKING(for $r ocaml library) - if OCAMLPATH=$OCAMLPATH $OCAMLFIND query $r &> /dev/null; then - AC_MSG_RESULT(yes) - else - AC_MSG_ERROR(could not find $r ocaml library) - fi -done - -OCAMLFIND_COMMANDS="" -# AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no) -# if test $HAVE_OCAMLC_OPT = "yes"; then -# if test "$OCAMLFIND_COMMANDS" = ""; then -# OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt" -# else -# OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt" -# fi -# fi -# AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no) -# if test $HAVE_OCAMLOPT_OPT = "yes"; then -# if test "$OCAMLFIND_COMMANDS" = ""; then -# OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt" -# else -# OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt" -# fi -# fi -if test "$OCAMLFIND_COMMANDS" != ""; then - OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND" -fi - -AC_MSG_CHECKING(--enable-debug argument) -AC_ARG_ENABLE(debug, - [ --enable-debug Turn on debugging], - [GIVEN="yes"; - case "${enableval}" in - yes) DEBUG=true ;; - no) DEBUG=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; - esac], - [GIVEN="no"; DEBUG="$DEBUG_DEFAULT"]) -MSG=$GIVEN -if test "$DEBUG" = "true"; then - MSG="$MSG, debugging enabled." -else - MSG="$MSG, debugging disabled." -fi -AC_MSG_RESULT($MSG) - -AC_MSG_CHECKING(--with-runtime-dir argument) -AC_ARG_WITH(runtime-dir, - [ --with-runtime-dir Runtime directory (current working directory if not given)], - [ RT_BASE_DIR="${withval}" ], - [ RT_BASE_DIR="$RT_BASE_DIR_DEFAULT" ]) -AC_MSG_RESULT($RT_BASE_DIR) - -AC_MSG_CHECKING(--with-dbhost argument) -AC_ARG_WITH(dbhost, - [ --with-dbhost SQL database hostname], - [ DBHOST="${withval}" ], - [ DBHOST="$DEFAULT_DBHOST" ]) -AC_MSG_RESULT($DBHOST) - -AC_SUBST(CAMLP4O) -AC_SUBST(DBHOST) -AC_SUBST(DEBUG) -AC_SUBST(TRANSFORMER_MODULE) -AC_SUBST(FINDLIB_REQUIRES) -AC_SUBST(FINDLIB_CREQUIRES) -AC_SUBST(HAVE_OCAMLOPT) -AC_SUBST(LABLGLADECC) -AC_SUBST(OCAMLFIND) -AC_SUBST(OCAMLPATH) -AC_SUBST(RT_BASE_DIR) -AC_SUBST(MATITA_VERSION) - -AC_OUTPUT([ - $LIBSPATH/extlib/componentsConf.ml - matita/matita.conf.xml.devel - matita/matita.conf.xml.user - matita/matita.conf.xml.build - matita/buildTimeConf.ml - matita/gtkmathview.matita.conf.xml - Makefile.defs -]) diff --git a/helm/software/Makefile b/helm/software/Makefile new file mode 100644 index 000000000..30ca291c7 --- /dev/null +++ b/helm/software/Makefile @@ -0,0 +1,63 @@ + +include Makefile.defs + +SUBDIRS = libs matita + +all: $(foreach d,$(SUBDIRS),all.$(d)) +opt: $(foreach d,$(SUBDIRS),opt.$(d)) +clean: $(foreach d,$(SUBDIRS),clean.$(d)) +distclean: $(foreach d,$(SUBDIRS),distclean.$(d)) + +all.%: + $(MAKE) -C $* all +opt.%: + $(MAKE) -C $* opt +clean.%: + $(MAKE) -C $* clean +distclean.%: + $(MAKE) -C $* distclean +install.%: + $(MAKE) -C $* install +uninstall.%: + $(MAKE) -C $* uninstall + +BASENAME = matita +NULL = +DISTDIR = $(BASENAME)-$(MATITA_VERSION) +CLEAN_ON_DIST = \ + ocaml/license \ + $(NULL) +EXTRA_DIST = \ + dist/AUTHORS \ + dist/COPYING \ + dist/INSTALL \ + dist/README \ + dist/ChangeLog \ + Makefile \ + Makefile.defs.in \ + ./configure \ + $(NULL) + +dist: dist_autotools dist_export dist_mktarball +distcheck: dist dist_extract dist_build + +dist_autotools: + autoconf + ./configure + +dist_export: + rm -rf $(DISTDIR) + mkdir $(DISTDIR) + svn export ocaml $(DISTDIR)/ocaml + svn export matita $(DISTDIR)/matita + (cd $(DISTDIR) && rm -f $(CLEAN_ON_DIST)) + ln -fs matita.conf.xml.user $(DISTDIR)/matita/matita.conf.xml + mv $(DISTDIR)/ocaml $(DISTDIR)/libs + cp -r $(EXTRA_DIST) $(DISTDIR) + +dist_mktarball: + tar czf $(DISTDIR).tar.gz $(DISTDIR) + +.PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_build dist_autotools +.PHONY: all opt clean distclean + diff --git a/helm/software/Makefile.defs.in b/helm/software/Makefile.defs.in new file mode 100644 index 000000000..b714a606e --- /dev/null +++ b/helm/software/Makefile.defs.in @@ -0,0 +1,12 @@ +OCAMLFIND = OCAMLPATH=@OCAMLPATH@ @OCAMLFIND@ +CAMLP4O = @CAMLP4O@ +LABLGLADECC = @LABLGLADECC@ +HAVE_OCAMLOPT = @HAVE_OCAMLOPT@ + +MATITA_REQUIRES = @FINDLIB_REQUIRES@ +MATITA_CREQUIRES = @FINDLIB_CREQUIRES@ + +MATITA_VERSION = @MATITA_VERSION@ + +RT_BASE_DIR = @RT_BASE_DIR@ +DBHOST = @DBHOST@ diff --git a/helm/software/configure.ac b/helm/software/configure.ac new file mode 100644 index 000000000..90d14f49f --- /dev/null +++ b/helm/software/configure.ac @@ -0,0 +1,185 @@ +AC_INIT(matita/matitaTypes.ml) + +# Distribution settings (i.e. settings to be manipulated before a release) +DEBUG_DEFAULT="false" +DEFAULT_DBHOST="localhost" +RT_BASE_DIR_DEFAULT="/usr/local/share/matita/" +MATITA_VERSION="0.1.0" +# End of distribution settings + +AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no) +if test $HAVE_OCAMLC = "no"; then + AC_MSG_ERROR(could not find ocamlc) +fi +AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no) +if test $HAVE_OCAMLOPT = "no"; then + AC_MSG_WARN(could not find ocamlopt: native code compilation disabled) +fi +AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no) +if test $HAVE_OCAMLFIND = "yes"; then + OCAMLFIND="ocamlfind" +else + AC_MSG_ERROR(could not find ocamlfind) +fi +AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no) +if test $HAVE_LABLGLADECC = "yes"; then + LABLGLADECC="lablgladecc2" +else + AC_MSG_ERROR(could not find lablgladecc2) +fi +AC_CHECK_PROG(HAVE_CAMLP4O, camlp4o, yes, no) +if test $HAVE_CAMLP4O = "yes"; then + CAMLP4O="camlp4o" +else + AC_MSG_ERROR(could not find camlp4o) +fi + +# look for METAS dir + +OCAMLPATH="" +LIBSPATH="" +if test -d libs ; then + OCAMLPATH=`pwd`/libs/METAS + LIBSPATH=`pwd`/libs +fi +if test -d ocaml ; then + OCAMLPATH=`pwd`/ocaml/METAS + LIBSPATH=`pwd`/ocaml +fi +if test -z $OCAMLPATH; then + AC_MSG_ERROR(could not find METAS directory) +fi + +# creating META.* + +echo -n "creating METAs ... " +for f in $OCAMLPATH/meta.*.src; do + basename=`basename $f` + metaname=`echo $basename | sed 's/meta\.\(.*\)\.src/\1/'` + dirname=`echo $metaname | sed 's/^helm-//'` + metafile="$OCAMLPATH/META.$metaname" + cp $f $metafile + echo "directory=\"$LIBSPATH/$dirname\"" >> $metafile +done +echo "done" + +# (libs) findlib requisites + +FINDLIB_LIBSREQUIRES="\ +expat \ +gdome2 \ +http \ +lablgtk2 \ +lablgtkmathview \ +lablgtksourceview \ +mysql \ +netstring \ +ulex \ +zip \ +" + +# (Matita) findlib requisites + +FINDLIB_COMREQUIRES="\ +helm-cic_disambiguation \ +helm-grafite \ +helm-grafite_engine \ +helm-grafite_parser \ +helm-hgdome \ +helm-tactics \ +" +FINDLIB_CREQUIRES=" \ +$FINDLIB_COMREQUIRES \ +" +FINDLIB_REQUIRES="\ +$FINDLIB_CREQUIRES \ +lablgtk2.glade \ +lablgtkmathview \ +lablgtksourceview \ +helm-xmldiff \ +" +for r in $FINDLIB_LIBSREQUIRES $FINDLIB_REQUIRES +do + AC_MSG_CHECKING(for $r ocaml library) + if OCAMLPATH=$OCAMLPATH $OCAMLFIND query $r &> /dev/null; then + AC_MSG_RESULT(yes) + else + AC_MSG_ERROR(could not find $r ocaml library) + fi +done + +OCAMLFIND_COMMANDS="" +# AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no) +# if test $HAVE_OCAMLC_OPT = "yes"; then +# if test "$OCAMLFIND_COMMANDS" = ""; then +# OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt" +# else +# OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt" +# fi +# fi +# AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no) +# if test $HAVE_OCAMLOPT_OPT = "yes"; then +# if test "$OCAMLFIND_COMMANDS" = ""; then +# OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt" +# else +# OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt" +# fi +# fi +if test "$OCAMLFIND_COMMANDS" != ""; then + OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND" +fi + +AC_MSG_CHECKING(--enable-debug argument) +AC_ARG_ENABLE(debug, + [ --enable-debug Turn on debugging], + [GIVEN="yes"; + case "${enableval}" in + yes) DEBUG=true ;; + no) DEBUG=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; + esac], + [GIVEN="no"; DEBUG="$DEBUG_DEFAULT"]) +MSG=$GIVEN +if test "$DEBUG" = "true"; then + MSG="$MSG, debugging enabled." +else + MSG="$MSG, debugging disabled." +fi +AC_MSG_RESULT($MSG) + +AC_MSG_CHECKING(--with-runtime-dir argument) +AC_ARG_WITH(runtime-dir, + [ --with-runtime-dir Runtime directory (current working directory if not given)], + [ RT_BASE_DIR="${withval}" ], + [ RT_BASE_DIR="$RT_BASE_DIR_DEFAULT" ]) +AC_MSG_RESULT($RT_BASE_DIR) + +AC_MSG_CHECKING(--with-dbhost argument) +AC_ARG_WITH(dbhost, + [ --with-dbhost SQL database hostname], + [ DBHOST="${withval}" ], + [ DBHOST="$DEFAULT_DBHOST" ]) +AC_MSG_RESULT($DBHOST) + +AC_SUBST(CAMLP4O) +AC_SUBST(DBHOST) +AC_SUBST(DEBUG) +AC_SUBST(TRANSFORMER_MODULE) +AC_SUBST(FINDLIB_REQUIRES) +AC_SUBST(FINDLIB_CREQUIRES) +AC_SUBST(HAVE_OCAMLOPT) +AC_SUBST(LABLGLADECC) +AC_SUBST(OCAMLFIND) +AC_SUBST(OCAMLPATH) +AC_SUBST(RT_BASE_DIR) +AC_SUBST(MATITA_VERSION) + +AC_OUTPUT([ + $LIBSPATH/extlib/componentsConf.ml + matita/matita.conf.xml.devel + matita/matita.conf.xml.user + matita/matita.conf.xml.build + matita/buildTimeConf.ml + matita/gtkmathview.matita.conf.xml + Makefile.defs +])