[Pkg-ocaml-maint-commits] [SCM] ocamlviz packaging branch, ocamlbuild, updated. upstream/1.01-3-ge3dcc7f

Mehdi Dogguy mehdi at debian.org
Thu Mar 25 22:49:28 UTC 2010


The following commit has been merged in the ocamlbuild branch:
commit e3dcc7faa8b0a265711c1f5fc228e7ac9477b76c
Author: Mehdi Dogguy <mehdi at debian.org>
Date:   Thu Mar 25 23:47:11 2010 +0100

    Overwrite Makefile.in with a new one

diff --git a/Makefile b/Makefile
deleted file mode 100644
index 3de270d..0000000
--- a/Makefile
+++ /dev/null
@@ -1,118 +0,0 @@
-##########################################################################
-#                                                                        #
-#  Ocamlviz --- real-time profiling tools for Objective Caml             #
-#  Copyright 2010 (C) by Laboratoire PPS - CNRS Université Paris Diderot #
-#  Author: Mehdi Dogguy                                                  #
-#                                                                        #
-#  License: GNU Library General Public License version 2                 #
-#  See file LICENSE for details                                          #
-#                                                                        #
-##########################################################################
-
-# where to install the binaries
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-BINDIR=@bindir@
-
-# where to install the man page
-MANDIR=@mandir@
-
-NAME = ocamlviz
-OCAMLBUILD = ocamlbuild
-OCAMLFIND = ocamlfind
-HAVE_OCAMLOPT ?= $(if $(wildcard /usr/bin/ocamlopt),yes,no)
-OCAMLBEST ?= $(if $(OCAML_OPT_ARCH),native,byte)
-
-all:
-byte:
-opt:
-native:
-final:
-	$(OCAMLBUILD) $@
-
-tests/pa-%.ml: tests/%.ml _build/camlp4/pa_ocamlviz.cmo 
-	camlp4 pa_o.cmo str.cma _build/camlp4/pa_ocamlviz.cmo pr_o.cmo tests/$*.ml -o tests/pa-$*.ml
-
-test-%.native:
-test-%.byte:
-ascii-%.native:
-ascii-%.byte:
-	$(OCAMLBUILD) $@
-
-
-# installation
-##############
-
-install-indep: 
-	mkdir -p $(BINDIR)
-	mkdir -p $(MANDIR)/man1
-	cp -f doc/ocamlviz.1 $(MANDIR)/man1/ocamlviz.1
-
-install: final install-indep install-$(OCAMLBEST)
-	cp -f src/ocamlviz.mli src/ocamlviz.cmi src/ocamlviz_threads.cmi $(OCAMLLIB)
-	cp -f _build/src/libocamlviz.cma $(OCAMLLIB)
-	cp -f _build/camlp4/pa_ocamlviz.cmi _build/camlp4/pa_ocamlviz.cmo $(OCAMLLIB)/camlp4
-	cp -f _build/src/ocamlviz-ascii $(BINDIR)
-	cp -f _build/src/ocamlviz-gui $(BINDIR)
-
-install-byte:
-
-install-opt:
-	cp -f _build/src/libocamlviz.cmxa _build/src/libocamlviz.a $(OCAMLLIB)
-
-
-# documentation
-###############
-
-.PHONY: doc/index.html
-.PHONY: doc/manual.pdf
-
-doc:
-	$(OCAMLBUILD) ocamlviz.docdir/index.html
-
-doc/manual.pdf: doc/manual.tex
-	cd doc && mlpost -native -latex manual.tex -pdf fig.ml && pdflatex manual.tex
-
-wc:
-	ocamlwc src/*.ml* tests/*.ml* www/*.html -p 
-
-# export
-########
-
-EXPORTDIR=$(NAME)-$(VERSION)
-TAR=$(EXPORTDIR).tar
-
-FTP = $$HOME/ftp/$(NAME)
-WWW = $$HOME/WWW/$(NAME)
-
-FILES = *.ml* $(NAME).1 manual.tex	     \
-	Makefile.in configure configure.in   \
-	.depend README INSTALL COPYING GPL CHANGES
-
-# file headers
-##############
-headers:
-	headache -c doc/headache_config.txt -h doc/header.txt \
-		Makefile.in configure.in README \
-		*/*.ml */*.ml[ily4] doc/*.tex
-
-# Makefile is rebuilt whenever Makefile.in or configure.in is modified
-######################################################################
-
-Makefile: Makefile.in config.status
-	./config.status
-
-config.status: configure
-	./config.status --recheck
-
-configure: configure.in
-	autoconf 
-
-# clean
-#######
-
-clean:
-	$(OCAMLBUILD) $@
-
-dist-clean distclean:: clean
-	rm -f Makefile config.cache config.log config.status
diff --git a/Makefile.in b/Makefile.in
index 213c6d4..3de270d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,32 +1,14 @@
 ##########################################################################
 #                                                                        #
 #  Ocamlviz --- real-time profiling tools for Objective Caml             #
-#  Copyright (C) by INRIA - CNRS - Universite Paris Sud                  #
-#  Authors: Julien Robert                                                #
-#           Guillaume Von Tokarski                                       #
-#           Sylvain Conchon                                              #
-#           Jean-Christophe Filliatre                                    #
-#           Fabrice Le Fessant                                           #
-#  GNU Library General Public License version 2                          #
+#  Copyright 2010 (C) by Laboratoire PPS - CNRS Université Paris Diderot #
+#  Author: Mehdi Dogguy                                                  #
+#                                                                        #
+#  License: GNU Library General Public License version 2                 #
 #  See file LICENSE for details                                          #
 #                                                                        #
 ##########################################################################
 
-#
-# sample Makefile for Objective Caml
-# Copyright (C) 2001 Jean-Christophe FILLIATRE
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License version 2, as published by the Free Software Foundation.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# 
-# See the GNU Library General Public License version 2 for more details
-# (enclosed in the file LGPL).
-
 # where to install the binaries
 prefix=@prefix@
 exec_prefix=@exec_prefix@
@@ -35,113 +17,29 @@ BINDIR=@bindir@
 # where to install the man page
 MANDIR=@mandir@
 
-# other variables set by ./configure
-OCAMLC   = @OCAMLC@
-OCAMLOPT = @OCAMLOPT@
-OCAMLDEP = @OCAMLDEP@
-OCAMLLEX = @OCAMLLEX@
-OCAMLYACC= @OCAMLYACC@
-OCAMLLIB = @OCAMLLIB@
-OCAMLBEST= @OCAMLBEST@
-OCAMLVERSION = @OCAMLVERSION@
-OCAMLWEB = @OCAMLWEB@
-OCAMLWIN32 = @OCAMLWIN32@
-EXE = @EXE@
-
-INCLUDES = -I src -I +threads @INCLUDEGTK2@ @INCLUDECAIRO@
-BFLAGS = -g -dtypes $(INCLUDES)
-OFLAGS = -dtypes $(INCLUDES)
-
-# main target
-#############
-
 NAME = ocamlviz
+OCAMLBUILD = ocamlbuild
+OCAMLFIND = ocamlfind
+HAVE_OCAMLOPT ?= $(if $(wildcard /usr/bin/ocamlopt),yes,no)
+OCAMLBEST ?= $(if $(OCAML_OPT_ARCH),native,byte)
 
-all: $(OCAMLBEST)
-
-byte: ascii.byte libocamlviz.cma camlp4/pa_ocamlviz.cmo
-
-opt: ascii.opt libocamlviz.cma libocamlviz.cmxa camlp4/pa_ocamlviz.cmo @GUIOPT@
-
-# bytecode and native-code compilation
-######################################
-
-
-GENERATED = src/version.ml src/preflexer.ml
-
-PROTOCOLCMO = src/binary.cmo src/bproto.cmo 
-PROTOCOLCMX = $(PROTOCOLCMO:.cmo=.cmx)
-
-OCAMLVIZCMO = $(PROTOCOLCMO) src/monitor_impl.cmo src/ocamlviz.cmo src/ocamlviz_threads.cmo 
-OCAMLVIZCMX = $(OCAMLVIZCMO:.cmo=.cmx)
-
-LIBOCAMLVIZ = libocamlviz.cmxa
-LIBOCAMLVIZBYTE = libocamlviz.cma
-
-$(LIBOCAMLVIZ): $(OCAMLVIZCMX)
-	$(OCAMLOPT) -a $(OFLAGS) -o $@ $^
-
-$(LIBOCAMLVIZBYTE): $(OCAMLVIZCMO)
-	$(OCAMLC) -a $(BFLAGS) -thread -o $@ threads.cma $^
-
-
-CLIENTCMO = $(PROTOCOLCMO) src/timemap.cmo src/db.cmo src/options.cmo src/net.cmo
-CLIENTCMX = $(CLIENTCMO:.cmo=.cmx)
-
-ASCIICMO = $(CLIENTCMO) src/ascii.cmo
-ASCIICMX = $(ASCIICMO:.cmo=.cmx)
-
-ascii.byte: $(ASCIICMO)
-	$(OCAMLC) -thread $(BFLAGS) -o $@ unix.cma threads.cma $^
-
-ascii.opt: $(ASCIICMX) 
-	$(OCAMLOPT) -thread $(OFLAGS) -o $@ unix.cmxa threads.cmxa $^ 
-
-
-TREEPANELCMO = $(CLIENTCMO) src/dot.cmo src/tree_panel.cmo
-TREEPANELCMX = $(TREEPANELCMO:.cmo=.cmx)
-
-GUICMO = $(TREEPANELCMO) src/graph.cmo src/preflexer.cmo src/gui_misc.cmo src/gui_models.cmo src/gui_views.cmo src/gui_pref.cmo src/gui.cmo 
-GUICMX = $(GUICMO:.cmo=.cmx)
-
-gui.byte: $(GUICMO)
-	$(OCAMLC) $(BFLAGS) -o $@ lablgtk.cma gtkInit.cma unix.cma $^
-
-gui.opt: $(GUICMX) 
-	$(OCAMLOPT) $(OFLAGS) -o $@ unix.cmxa threads.cmxa lablgtk.cmxa cairo.cmxa cairo_lablgtk.cmxa gtkThread.cmx $^
-
-
-camlp4/pa_ocamlviz.cmo: camlp4/pa_ocamlviz.ml 
-	ocamlc -c -dtypes -I +camlp4 -I +str -pp camlp4of str.cma $^
-
-tests/pa-%.ml: tests/%.ml camlp4/pa_ocamlviz.cmo 
-	camlp4 pa_o.cmo str.cma camlp4/pa_ocamlviz.cmo pr_o.cmo tests/$*.ml -o tests/pa-$*.ml
-
-test-%: tests/%.opt gui.opt
-	xterm -e "tests/$*.opt 100" &
-	sleep 1 && ./gui.opt
-
-test-%-byte: tests/%.byte gui.opt
-	xterm -e "tests/$*.byte 100" &
-	sleep 1 && ./gui.opt
-
-ascii-%: tests/%.opt ascii.opt
-	xterm -e "tests/$*.opt 100" &
-	sleep 1 && ./ascii.opt 
+all:
+byte:
+opt:
+native:
+final:
+	$(OCAMLBUILD) $@
 
-tests/%.opt: $(LIBOCAMLVIZ) tests/%.ml
-	$(OCAMLOPT) -thread $(OFLAGS) -o $@ unix.cmxa threads.cmxa $^
+tests/pa-%.ml: tests/%.ml _build/camlp4/pa_ocamlviz.cmo 
+	camlp4 pa_o.cmo str.cma _build/camlp4/pa_ocamlviz.cmo pr_o.cmo tests/$*.ml -o tests/pa-$*.ml
 
-tests/%.byte: $(LIBOCAMLVIZBYTE) tests/%.ml
-	$(OCAMLC) -thread -I src -o $@ unix.cma threads.cma $^
+test-%.native:
+test-%.byte:
+ascii-%.native:
+ascii-%.byte:
+	$(OCAMLBUILD) $@
 
 
-VERSION=0.1
-
-src/version.ml: Makefile
-	echo "let version = \""$(VERSION)"\"" > $@
-	echo "let date = \""`date`"\"" >> $@
-
 # installation
 ##############
 
@@ -150,36 +48,27 @@ install-indep:
 	mkdir -p $(MANDIR)/man1
 	cp -f doc/ocamlviz.1 $(MANDIR)/man1/ocamlviz.1
 
-install: install-indep install-$(OCAMLBEST)
+install: final install-indep install-$(OCAMLBEST)
 	cp -f src/ocamlviz.mli src/ocamlviz.cmi src/ocamlviz_threads.cmi $(OCAMLLIB)
-	cp -f libocamlviz.cma $(OCAMLLIB)
-	cp -f camlp4/pa_ocamlviz.cmi camlp4/pa_ocamlviz.cmo $(OCAMLLIB)/camlp4
-	cp -f ascii.$(OCAMLBEST) $(BINDIR)/ocamlviz-ascii
+	cp -f _build/src/libocamlviz.cma $(OCAMLLIB)
+	cp -f _build/camlp4/pa_ocamlviz.cmi _build/camlp4/pa_ocamlviz.cmo $(OCAMLLIB)/camlp4
+	cp -f _build/src/ocamlviz-ascii $(BINDIR)
+	cp -f _build/src/ocamlviz-gui $(BINDIR)
 
 install-byte:
 
 install-opt:
-	cp -f libocamlviz.cmxa libocamlviz.a $(OCAMLLIB)
-	cp -f gui.$(OCAMLBEST) $(BINDIR)/ocamlviz-gui
-
+	cp -f _build/src/libocamlviz.cmxa _build/src/libocamlviz.a $(OCAMLLIB)
 
 
 # documentation
 ###############
 
-DOCFILES=doc/index.html 
-
 .PHONY: doc/index.html
-
 .PHONY: doc/manual.pdf
 
-doc: $(DOCFILES)
-
-# OCAMLDOCFILES=$(filter-out src/monitor_sig.mli, $(wildcard src/*.mli))
-OCAMLDOCFILES=src/*.mli
-
-doc/index.html:
-	ocamldoc -html -d doc -I src -I +lablgtk2 $(OCAMLDOCFILES)
+doc:
+	$(OCAMLBUILD) ocamlviz.docdir/index.html
 
 doc/manual.pdf: doc/manual.tex
 	cd doc && mlpost -native -latex manual.tex -pdf fig.ml && pdflatex manual.tex
@@ -200,63 +89,6 @@ FILES = *.ml* $(NAME).1 manual.tex	     \
 	Makefile.in configure configure.in   \
 	.depend README INSTALL COPYING GPL CHANGES
 
-
-# literate programming
-######################
-
-SOURCES = 
-
-$(NAME).tex: $(SOURCES)
-	$(OCAMLWEB) -o $@ $^
-
-# generic rules
-###############
-
-.SUFFIXES: .mli .ml .cmi .cmo .cmx .mll .mly .tex .dvi .ps .html
-
-.mli.cmi:
-	$(OCAMLC) -c $(BFLAGS) $<
-
-.ml.cmo:
-	$(OCAMLC) -c $(BFLAGS) $<
-
-.ml.o:
-	$(OCAMLOPT) -c $(OFLAGS) $<
-
-.ml.cmx:
-	$(OCAMLOPT) -c $(OFLAGS) $<
-
-.mll.ml:
-	$(OCAMLLEX) $<
-
-.mly.ml:
-	$(OCAMLYACC) -v $<
-
-.mly.mli:
-	$(OCAMLYACC) -v $<
-
-.tex.dvi:
-	latex $< && latex $<
-
-.dvi.ps:
-	dvips $< -o $@ 
-
-.tex.html:
-	hevea $<
-
-# Emacs tags
-############
-
-tags:
-	find . -name "*.ml*" | sort -r | xargs \
-	etags "--regex=/let[ \t]+\([^ \t]+\)/\1/" \
-	      "--regex=/let[ \t]+rec[ \t]+\([^ \t]+\)/\1/" \
-	      "--regex=/and[ \t]+\([^ \t]+\)/\1/" \
-	      "--regex=/type[ \t]+\([^ \t]+\)/\1/" \
-              "--regex=/exception[ \t]+\([^ \t]+\)/\1/" \
-	      "--regex=/val[ \t]+\([^ \t]+\)/\1/" \
-	      "--regex=/module[ \t]+\([^ \t]+\)/\1/"
-
 # file headers
 ##############
 headers:
@@ -279,26 +111,8 @@ configure: configure.in
 # clean
 #######
 
-clean::
-	rm -f src/*.cm[iox] src/*.o src/*~ src/*.annot 
-	rm -f tests/*.cm[iox] tests/*.o tests/*~ tests/*.annot tests/*.byte tests/*.opt
-	rm -f $(GENERATED) 
-	rm -f *.byte *.opt
-	rm -f libocamlviz.*
-	rm -f doc/*.html doc/*mps doc/*.aux doc/*.bbl doc/*.blg 		
-	rm -f doc/*.log doc/*.toc doc/*.vrb doc/*.snm doc.*.out doc/*.nav
+clean:
+	$(OCAMLBUILD) $@
 
 dist-clean distclean:: clean
 	rm -f Makefile config.cache config.log config.status
-
-# depend
-########
-
-dep:
-	ocamldep -I src src/*.ml src/*.mli | ocamldot | dot -Tps | gv -
-
-.depend depend:: $(GENERATED)
-	rm -f .depend
-	$(OCAMLDEP) $(INCLUDES) src/*.ml src/*.mli > .depend
-
-include .depend

-- 
ocamlviz packaging



More information about the Pkg-ocaml-maint-commits mailing list