Permalink
Browse files

Added autoconf.

  • Loading branch information...
1 parent dc1f753 commit e80c2ce067cbd677ecaa184066bd86b97d342f92 Vincent Bernardoff committed Sep 7, 2012
Showing with 8,472 additions and 0 deletions.
  1. +90 −0 Makefile.am
  2. +590 −0 Makefile.in
  3. +974 −0 aclocal.m4
  4. +5,702 −0 configure
  5. +19 −0 configure.ac
  6. +527 −0 install-sh
  7. +240 −0 m4/ocaml.m4
  8. +330 −0 missing
View
@@ -0,0 +1,90 @@
+ACLOCAL_AMFLAGS = -I m4
+LOCAL_OCPBUILD=./ocp-build/ocp-build
+OCPBUILD ?= $(LOCAL_OCPBUILD)
+SRC_EXT=src_ext
+TARGETS = opam opam-mk-repo opam-repo-convert-0.3
+
+.PHONY: all
+
+all: $(LOCAL_OCPBUILD) META
+ $(MAKE) clone
+ $(MAKE) compile
+
+scan: $(LOCAL_OCPBUILD)
+ $(OCPBUILD) -scan
+sanitize: $(LOCAL_OCPBUILD)
+ $(OCPBUILD) -sanitize
+byte: $(LOCAL_OCPBUILD)
+ $(OCPBUILD) -byte
+opt: $(LOCAL_OCPBUILD)
+ $(OCPBUILD) -asm
+
+$(LOCAL_OCPBUILD): ocp-build/ocp-build.boot ocp-build/win32_c.c
+ $(MAKE) -C ocp-build
+
+compile: $(LOCAL_OCPBUILD)
+ $(OCPBUILD) -init -scan -sanitize $(TARGET)
+
+clone:
+ $(MAKE) -C $(SRC_EXT)
+
+clean:
+ rm -rf _obuild
+ rm -rf src/*.annot bat/*.annot
+ rm -f opam
+ rm -f ocp-build.*
+ $(MAKE) -C $(SRC_EXT) clean
+ $(MAKE) -C ocp-build clean
+
+distclean: clean
+ rm -f *.tar.gz *.tar.bz2
+ rm -rf _obuild _build
+ $(MAKE) -C $(SRC_EXT) distclean
+
+.PHONY: tests
+
+tests:
+ $(MAKE) -C tests all
+
+tests-rsync:
+ $(MAKE) -C tests rsync
+
+tests-git:
+ $(MAKE) -C tests git
+
+%-install:
+ cp _obuild/$*/$*.asm $(prefix)/bin/$*
+
+PRODUCT_VERSION=$(shell grep "let version" src/globals.ml | cut -f 2 -d \")
+META: META.in
+ sed 's/@VERSION@/$(PRODUCT_VERSION)/g' < $< > $@
+
+.PHONY: install
+install:
+ mkdir -p $(prefix)/bin
+ $(MAKE) $(TARGETS:%=%-install)
+ mkdir -p $(mandir)/man1 && cp doc/man/* $(mandir)/man1
+
+uninstall:
+ rm -f $(prefix)/bin/opam*
+ rm -f $(mandir)/man1/opam*
+
+doc: compile
+ mkdir -p doc/html/
+ ocamldoc \
+ -I _obuild/opam-lib -I _obuild/cudf -I _obuild/dose \
+ -I _obuild/bat -I _obuild/unix -I _obuild/extlib \
+ -I _obuild/arg -I _obuild/graph \
+ src/*.mli -html -d doc/html/
+ $(MAKE) -C doc/man-src
+
+trailing:
+ find src -name "*.ml*" -exec \
+ sed -i xxx -e :a -e "/^\n*$$/{$$d;N;ba" -e '}' {} \;
+ find src -name "*xxx" -exec rm {} \;
+
+archive:
+ echo $(ARCHIVES)
+ $(MAKE) distclean
+ $(MAKE) clone
+ tar cz $(wildcard src_ext/*.tar.gz) > opam-extfiles.1.tar.gz
Oops, something went wrong.

0 comments on commit e80c2ce

Please sign in to comment.