# $Id: Makefile,v 1.3 2007/06/28 23:18:28 rjones Exp $ include Makefile.config CC := gcc CFLAGS := -Wall -Werror all: pa_noexternal.cmo init ocamlbotwrapper xavierbot.pl ocamlbotwrapper: ocamlbotwrapper.o $(CC) $(CFLAGS) $< -o $@ ocamlbotwrapper.c: ocamlbotwrapper.c.in Makefile.config sed \ -e 's|@OCAML@|$(OCAML)|' \ -e 's|@INITSCRIPT@|$(INITSCRIPT)|' \ -e 's|@CHROOTDIR@|$(CHROOTDIR)|' \ < $< > $@ init: init.in Makefile.config sed \ -e 's|@OCAMLUSER@|$(OCAMLUSER)|' \ -e 's|@CHROOTDIR@|$(CHROOTDIR)|' \ < $< > $@ xavierbot.pl: xavierbot.pl.in Makefile.config sed \ -e 's|@WRAPPER@|$(WRAPPER)|' \ < $< > $@ chmod 0755 $@ pa_noexternal.cmo: pa_noexternal.ml ocamlfind ocamlc \ -pp "camlp4o pa_extend.cmo q_MLast.cmo" -I +camlp4 -c $< test check: perl -Tc xavierbot.pl clean: rm -f ocamlbotwrapper *.o *.cmo *.cmi *~ # Use this if you want to run without installing (see also # instructions in Makefile.config): permissions: chown root.root ocamlbotwrapper chmod ug+s ocamlbotwrapper # Distribution. dist: $(MAKE) check-manifest rm -rf $(PACKAGE)-$(VERSION) mkdir $(PACKAGE)-$(VERSION) tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf - tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) rm -rf $(PACKAGE)-$(VERSION) ls -l $(PACKAGE)-$(VERSION).tar.gz check-manifest: @for d in `find -type d -name CVS | grep -v '^\./debian/'`; \ do \ b=`dirname $$d`/; \ awk -F/ '$$1 != "D" {print $$2}' $$d/Entries | \ sed -e "s|^|$$b|" -e "s|^\./||"; \ done | sort > .check-manifest; \ sort MANIFEST > .orig-manifest; \ diff -u .orig-manifest .check-manifest; rv=$$?; \ rm -f .orig-manifest .check-manifest; \ exit $$rv .PHONY: depend dist check-manifest dpkg doc print_test .SUFFIXES: .cmo .cmi .cmx .ml .mli