From 4c378495e350c738cf6cb6ddd3c0e258559274ba Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 9 Dec 2002 11:10:31 +0000 Subject: [PATCH] switched to automake based build process --- .../gdome_xslt/ocaml/gdome_xslt/Makefile.am | 80 ++++++++++++++++ .../gdome_xslt/ocaml/gdome_xslt/Makefile.in | 93 ------------------- .../gdome_xslt/ocaml/gdome_xslt/configure.in | 41 -------- 3 files changed, 80 insertions(+), 134 deletions(-) create mode 100644 helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.am delete mode 100644 helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.in delete mode 100644 helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/configure.in diff --git a/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.am b/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.am new file mode 100644 index 000000000..42b6065e1 --- /dev/null +++ b/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.am @@ -0,0 +1,80 @@ +PKGNAME = gdome2-xslt +ARCHIVE = mlgdome2-xslt +REQUIRES = gdome2 +OCAMLFIND = @OCAMLFIND@ +OCAMLC = $(OCAMLFIND) @OCAMLC@ -package "$(REQUIRES)" +OCAMLOPT = $(OCAMLFIND) @OCAMLOPT@ -package "$(REQUIRES)" +OCAMLDEP = $(OCAMLFIND) @OCAMLDEP@ -package "$(REQUIRES)" +OCAMLMKLIB = @OCAMLMKLIB@ +DLL = dll$(ARCHIVE).so +OCAMLSTDLIBDIR = $(DESTDIR)/@OCAMLSTDLIBDIR@ +OCAMLSTUBDIR = $(DESTDIR)/@OCAMLSTUBDIR@ +OCAMLINSTALLDIR = $(OCAMLSTDLIBDIR)/$(PKGNAME) +MODULES = i_gdome_xslt gdome_xslt +INIT = gdome_xslt_init +CMI_S = $(MODULES:%=%.cmi) +CMO_S = $(MODULES:%=%.cmo) +CMX_S = $(MODULES:%=%.cmx) +O_S = ml_gdome_xslt.o $(top_builddir)/C/gdome_xslt/gdome_xslt.o +SHARED_LIBS = -lxslt -lgdome -lglib -lxml2 -lmlgdome +BYTE_STUFF = $(ARCHIVE).cma $(INIT).cmo +NATIVE_STUFF = $(ARCHIVE).cmxa $(ARCHIVE).a $(INIT).cmx + +EXTRA_DIST = \ + META.in gdome_xslt.ml gdome_xslt.mli \ + gdome_xslt_init.ml gdome_xslt_init.mli i_gdome_xslt.ml \ + ml_gdome_xslt.c ml_gdome_xslt.h ocaml-io.h .depend + +if HAVE_OCAMLOPT_COND +noinst_DATA = $(BYTE_STUFF) $(NATIVE_STUFF) +else +noinst_DATA = $(BYTE_STUFF) +endif + +noinst_LTLIBRARIES = libmlgdome2_xslt.la +libmlgdome2_xslt_la_SOURCES = ml_gdome_xslt.c + +if HAVE_OCAMLOPT_COND +install-data-local: \ + gdome_xslt.cmi gdome_xslt.mli $(ARCHIVE).cma \ + $(INIT).cmi $(INIT).cmo $(INIT).mli $(DLL) META \ + $(ARCHIVE).a $(ARCHIVE).cmxa $(INIT).cmx $(INIT).o +else +install-data-local: \ + gdome_xslt.cmi gdome_xslt.mli $(ARCHIVE).cma \ + $(INIT).cmi $(INIT).cmo $(INIT).mli $(DLL) META +endif + $(mkinstalldirs) $(OCAMLSTDLIBDIR) $(OCAMLSTUBDIR) + chmod -x $(DLL) + $(OCAMLFIND) install -destdir $(OCAMLSTDLIBDIR) $(PKGNAME) $^ + ln -fs $(DLL) $(OCAMLSTUBDIR)/lib$(ARCHIVE).so + +CLEANFILES = \ + $(ARCHIVE).{cma,cmxa,a} $(CMI_S) $(CMO_S) $(CMX_S) ml_gdome_xslt.o \ + $(DLL) $(INIT).cm[iox] libmlgdome2-xslt.a + +INCLUDES = \ + $(GDOME_CFLAGS) $(MLGDOME_CFLAGS) \ + -I/usr/include/caml -I$(top_srcdir)/C/gdome_xslt + +$(ARCHIVE).cma $(DLL): $(CMO_S) + $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(CMO_S) $(O_S) $(SHARED_LIBS) +$(ARCHIVE).cmxa $(ARCHIVE).a: $(CMX_S) + $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(CMX_S) $(O_S) $(SHARED_LIBS) + +%.cmi: %.mli + $(OCAMLC) -c $< +%.cmo: %.ml %.cmi + $(OCAMLC) -c $< +%.cmx: %.ml %.cmi + $(OCAMLOPT) -c $< + +i_gdome_xslt.cmo: i_gdome_xslt.ml + $(OCAMLC) -c $< +i_gdome_xslt.cmx: i_gdome_xslt.ml + $(OCAMLOPT) -c $< + +depend: *.ml *.mli + $(OCAMLDEP) *.ml *.mli >.depend +include .depend + diff --git a/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.in b/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.in deleted file mode 100644 index 3f56ae13c..000000000 --- a/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.in +++ /dev/null @@ -1,93 +0,0 @@ -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ -INCLUDEDIR = @OCAML_INCLUDE_DIR@ -CGDOMEXSLTPATH = ../../C/gdome_xslt -PREFIX = -OBJECTS_C = ml_gdome_xslt.o -OBJECTS = i_gdome_xslt.cmo gdome_xslt.cmo -OBJECTS_NOT_IN_ARCHIVE = gdome_xslt_init.cmo -OBJECTS_OPT = i_gdome_xslt.cmx gdome_xslt.cmx -OBJECTS_OPT_NOT_IN_ARCHIVE = gdome_xslt_init.cmx -INST = META gdome_xslt_init.cmi i_gdome_xslt.cmi gdome_xslt.cmi gdome_xslt_init.cmo gdome_xslt.mli gdome_xslt_init.mli -INSTOPT = gdome_xslt_init.cmx gdome_xslt_init.o -DIST_FILES = \ - AUTHORS COPYING ChangeLog LICENSE Makefile.in NEWS README \ - configure.in ml_gdome_xslt.c gdome_xslt_init.ml i_gdome_xslt.ml \ - gdome_xslt.ml META.in -DOC_FILES = AUTHORS COPYING ChangeLog NEWS README -REQUIRES = gdome2 -PREDICATES = -MLFLAGS = -labels - -OCAMLC = ocamlfind ocamlc $(MLFLAGS) -OCAMLOPT = ocamlfind ocamlopt $(MLFLAGS) -OCAMLDEP = ocamldep - -ARCHIVE = $(PACKAGE).cma -ARCHIVE_A = $(PACKAGE).a -ARCHIVE_SO = dll$(PACKAGE).so -ARCHIVE_OPT = $(PACKAGE).cmxa - -all: $(ARCHIVE) $(ARCHIVE_SO) $(OBJECTS_NOT_IN_ARCHIVE) - -opt: $(OBJECTS_C) $(ARCHIVE_OPT) $(ARCHIVE_A) $(ARCHIVE_SO) $(OBJECTS_OPT_NOT_IN_ARCHIVE) - -dist: - rm -rf $(PACKAGE)-$(VERSION) - mkdir $(PACKAGE)-$(VERSION) - cp $(DIST_FILES) $(DOC_FILES) $(PACKAGE)-$(VERSION) - tar cvfz $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) - rm -rf $(PACKAGE)-$(VERSION) - -ml_gdome_xslt.o: ml_gdome_xslt.c - gcc -c -I$(INCLUDEDIR) -fPIC `gdome-config --cflags` `ocamlfind query -i-format gdome2` -I$(CGDOMEXSLTPATH) $< - -.SUFFIXES: .cmo .cmi .cmx .ml .mli - -.ml.cmo: - $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \ - -c $< -.mli.cmi: - $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \ - -c $< -.ml.cmx: - $(OCAMLOPT) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \ - -c $< - -depend: *.ml *.mli - $(OCAMLDEP) *.ml *.mli >.depend -include .depend - -$(ARCHIVE): $(OBJECTS) $(ARCHIVE_SO) - $(OCAMLC) -a -package "$(REQUIRES)" \ - -predicates "$(PREDICATES)" -o $@ $^ \ - -cclib "`gdome-config --libs`" -dllib -l$(PACKAGE) -$(ARCHIVE_OPT) $(ARCHIVE_A): $(OBJECTS_OPT) - INSTPATH=`ocamlfind query gdome2` ; \ - $(OCAMLOPT) -a -package "$(REQUIRES)" \ - -predicates "$(PREDICATES)" -o $@ $^ \ - -cclib "`gdome-config --libs`" \ - -cclib "`echo $$INSTPATH | sed "s/\\(.*\\)\\/gdome2/\\1/"`/$(PACKAGE)/$(ARCHIVE_SO)" - -$(ARCHIVE_SO): $(OBJECTS_C) - gcc -shared -o $@ $< $(CGDOMEXSLTPATH)/gdome_xslt.o -lmlgdome -lxslt -L `ocamlfind query gdome2` -Xlinker -rpath -Xlinker `ocamlfind query gdome2` - - - -install: - test ! -f $(ARCHIVE_OPT) || extra="$(ARCHIVE_A) $(ARCHIVE_OPT) $(INSTOPT)" ; \ - if [ "$(PREFIX)" = "" ]; then \ - ocamlfind install $(PACKAGE) $(ARCHIVE) $(ARCHIVE_SO) $(INST) $$extra; \ - else \ - ocamlfind install -ldconf $(CURDIR)/foo.ld.conf -destdir $(PREFIX) $(PACKAGE) $(ARCHIVE) $(ARCHIVE_SO) $(INST) $$extra; \ - fi - -rm -f $(CURDIR)/foo.ld.conf - -uninstall: - ocamlfind remove $(PACKAGE) - -clean: - rm -f *.o *.cm? $(ARCHIVE) $(ARCHIVE_A) $(ARCHIVE_SO) $(ARCHIVE_OPT) - -distclean: clean - rm -f config.log config.cache config.status Makefile META diff --git a/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/configure.in b/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/configure.in deleted file mode 100644 index 4b1f6f8fd..000000000 --- a/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/configure.in +++ /dev/null @@ -1,41 +0,0 @@ -AC_INIT(gdome_xslt.ml) - -PACKAGE=gdome2-xslt - -GDOMEXSLT_MAJOR_VERSION=0 -GDOMEXSLT_MINOR_VERSION=0 -GDOMEXSLT_MICRO_VERSION=2 -GDOMEXSLT_VERSION=$GDOMEXSLT_MAJOR_VERSION.$GDOMEXSLT_MINOR_VERSION.$GDOMEXSLT_MICRO_VERSION -VERSION=$GDOMEXSLT_VERSION - -AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no) -if test $HAVE_OCAMLC = "no"; then - AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed) -fi - -AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no) -if test $HAVE_OCAMLFIND = "no"; then - AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed) -fi - -AC_MSG_CHECKING("for gdome2") -ocamlfind query gdome2 || - AC_MSG_ERROR(gdome2 not installed (according to findlib)) - -AC_MSG_CHECKING("for the ocaml library dir") -OCAML_LIB_DIR=`ocamlc -where` -AC_MSG_RESULT($OCAML_LIB_DIR) - -AC_CHECK_FILE(/usr/include/caml/mlvalues.h, - OCAML_INCLUDE_DIR=/usr/include/caml, - OCAML_INCLUDE_DIR=$OCAML_LIB_DIR/caml -) - -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) -AC_SUBST(OCAML_INCLUDE_DIR) - -AC_OUTPUT([ - Makefile - META -]) -- 2.39.2