makefile updates
authorPierre Habouzit <madcoder@debian.org>
Fri, 18 May 2007 12:17:59 +0000 (14:17 +0200)
committerPierre Habouzit <madcoder@debian.org>
Fri, 18 May 2007 12:17:59 +0000 (14:17 +0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
configure
tools/Makefile [new file with mode: 0644]
tools/cpkg2c.mk [deleted file]

index bc74eab..5f3142e 100755 (executable)
--- a/configure
+++ b/configure
@@ -12,7 +12,6 @@ do_makefile() {
         *)        echo "cannot guess deepness of '$dir'"; exit 1
     esac
     echo "all %: ; @\$(MAKE) -s -C $rel/build/$dir \$*" >  $dir/Makefile
-    echo "-include \$(wildcard *.mk)"                   >> $dir/Makefile
 }
 
 find . -name CMakeLists.txt | while read file; do do_makefile $file; done
diff --git a/tools/Makefile b/tools/Makefile
new file mode 100644 (file)
index 0000000..4164759
--- /dev/null
@@ -0,0 +1,5 @@
+cpkg2c: cpkg2c.mll
+       ocamllex $<
+       $(if $(shell which ocamlopt),ocamlopt -o $@ str.cmxa,ocamlc -o $@ str.cma) $@.ml
+       @$(RM) cpkg2c.ml cpkg2c.c* cpkg2c.o
+
diff --git a/tools/cpkg2c.mk b/tools/cpkg2c.mk
deleted file mode 100644 (file)
index 320ad2a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-%.c: %.cpkg $(top_builddir)/tools/cpkg2c
-       $(top_builddir)/tools/cpkg2c -c $< > $@ || (rm -f $@; exit 1)
-
-%.li: %.cpkg $(top_builddir)/tools/cpkg2c
-       $(top_builddir)/tools/cpkg2c -h $< > $@ || (rm -f $@; exit 1)
-
-$(top_builddir)/tools/cpkg2c: $(top_builddir)/tools/cpkg2c.mll
-       $(MAKE) -C $(@D) $(@F)
-