1 # Augeas OCaml bindings.
2 # Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 # $Id: Makefile.in,v 1.2 2008/05/06 10:48:20 rjones Exp $
20 PACKAGE = @PACKAGE_NAME@
21 VERSION = @PACKAGE_VERSION@
23 OCAMLFIND = @OCAMLFIND@
24 OCAMLMKLIB = @OCAMLMKLIB@
29 CFLAGS = @CFLAGS@ @AUGEAS_CFLAGS@ @LIBXML2_CFLAGS@ \
30 -fPIC -I$(shell ocamlc -where) -Wall -Werror
32 LIBS = @AUGEAS_LIBS@ @LIBXML2_LIBS@ @LIBS@
39 OCAMLDOCFLAGS = -html -sort
41 export LIBRARY_PATH = .
43 all: mlaugeas.cma mlaugeas.cmxa test_augeas
45 mlaugeas.cma: augeas_c.o augeas.cmo
46 ocamlmklib $(LDFLAGS) $(LIBS) -o mlaugeas $^
48 mlaugeas.cmxa: augeas_c.o augeas.cmx
49 ocamlmklib $(LDFLAGS) $(LIBS) -o mlaugeas $^
53 test_augeas: test_augeas.cmo test_root
54 $(OCAMLFIND) ocamlc -o $@ mlaugeas.cma $<
65 rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o *.so *.opt
75 $(OCAMLDOC) $(OCAMLDOCFLAGS) -d html augeas.mli augeas.ml
81 ocamlfind install augeas \
82 META *.mli *.cmx *.cma *.cmxa *.a augeas.cmi *.so
87 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
89 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
91 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -c $<
95 .depend: augeas.mli augeas.ml
97 $(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) $^ > $@
99 ifeq ($(wildcard .depend),.depend)
106 $(MAKE) check-manifest
107 rm -rf $(PACKAGE)-$(VERSION)
108 mkdir $(PACKAGE)-$(VERSION)
109 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
110 $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
111 $(INSTALL) -m 0644 config.h.in $(PACKAGE)-$(VERSION)/
112 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
113 rm -rf $(PACKAGE)-$(VERSION)
114 ls -l $(PACKAGE)-$(VERSION).tar.gz
117 hg manifest | sort > .check-manifest; \
118 sort MANIFEST > .orig-manifest; \
119 diff -u .orig-manifest .check-manifest; rv=$$?; \
120 rm -f .orig-manifest .check-manifest; \
123 .PHONY: depend dist check-manifest dpkg doc
125 .SUFFIXES: .cmo .cmi .cmx .ml .mli .mll