The following commit has been merged in the master branch:
commit c5897bfe391653e202b201165e4cf2d7a496f4f3
Author: Mehdi Dogguy <dog...@pps.jussieu.fr>
Date:   Wed Feb 18 16:20:54 2009 +0100

    Shorten debian/rules

diff --git a/debian/menhir.clean b/debian/menhir.clean
new file mode 100644
index 0000000..ea21f4e
--- /dev/null
+++ b/debian/menhir.clean
@@ -0,0 +1 @@
+META
diff --git a/debian/menhir.install.in b/debian/menhir.install.in
new file mode 100644
index 0000000..d38f742
--- /dev/null
+++ b/debian/menhir.install.in
@@ -0,0 +1,4 @@
+src/standard.mly       usr/share/menhir
+demos                  usr/share/doc/menhir
+src/menhirLib.*                usr/lib/ocaml/@OCAMLABI@/menhirLib/
+META                   usr/lib/ocaml/@OCAMLABI@/menhirLib/
diff --git a/debian/rules b/debian/rules
index db098e1..b5368e9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,6 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
-# Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
 include /usr/share/dpatch/dpatch.make
@@ -11,27 +10,34 @@ OCAMLABI := $(shell ocamlc -version)
 IS_NATIVE:= $(wildcard /usr/bin/ocamlopt)
 TARGET   := $(if $(IS_NATIVE),opt,byte)
 STRIPOPT := -e "$(if $(IS_NATIVE),,/native/d)"
+OCAML_IN_FILES := $(filter-out debian/control,$(patsubst %.in,%,$(wildcard 
debian/*.in)))
+
+ocamlinit: ocamlinit-stamp
+ocamlinit-stamp:
+       for t in $(OCAML_IN_FILES); do \
+          sed -e 's...@ocamlabi@%$(OCAMLABI)%' $$t.in > $$t; \
+        done
+       sed $(STRIPOPT) src/META > META
+       touch $@
+
+ocamlinit-clean:
+       rm -f $(OCAML_IN_FILES)
 
-build: build-stamp
+build: ocamlinit build-stamp
 build-stamp: patch-stamp
        dh_testdir
        $(MAKE) TARGET=$(TARGET) PREFIX=$(CURDIR)/debian/menhir/usr
        dh build --after auto_build
        touch $@
 
-clean: unpatch
+clean: unpatch ocamlinit-clean
        dh clean
        $(MAKE) -C src/ clean PREFIX=$(CURDIR)/debian/menhir/usr
 
 install: build install-stamp
 install-stamp:
        dh install --before auto_install
-       cp src/menhir $(DESTDIR)/usr/bin/
-       cp src/standard.mly $(DESTDIR)/usr/share/menhir/
-       cp -r demos $(DESTDIR)/usr/share/doc/menhir/
-       mkdir -p $(DESTDIR)/usr/lib/ocaml/$(OCAMLABI)/menhirLib/
-       sed $(STRIPOPT) src/META > 
$(DESTDIR)/usr/lib/ocaml/$(OCAMLABI)/menhirLib/META
-       cp src/menhirLib.* $(DESTDIR)/usr/lib/ocaml/$(OCAMLABI)/menhirLib/
+       cp src/menhir.$(TARGET) $(DESTDIR)/usr/bin/menhir
        dh install --after auto_install
        touch $@
 

-- 
menhir packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to