Signed-off-by: Pierre Habouzit <madcoder@debian.org>
*) 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
--- /dev/null
+cpkg2c: cpkg2c.mll
+ ocamllex $<
+ $(if $(shell which ocamlopt),ocamlopt -o $@ str.cmxa,ocamlc -o $@ str.cma) $@.ml
+ @$(RM) cpkg2c.ml cpkg2c.c* cpkg2c.o
+
+++ /dev/null
-%.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)
-