diff options
author | 2004-07-15 16:17:58 +0000 | |
---|---|---|
committer | 2004-07-15 16:17:58 +0000 | |
commit | 002fb17410892b80527927a559501b84560d804e (patch) | |
tree | 1b7f401f27f3b6d0a70f154036d138500f2b7d65 /debian/rules | |
parent | 6b649aba925b6f7462da07599fe67ebb12a3460e (diff) |
Getting prepared for the licensing-problems-free 8.0 release of COQ.
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..b9552a69 --- /dev/null +++ b/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f +# debian/rules for coq + +COQPREF=$(CURDIR)/debian/tmp +ADDPREF=COQINSTALLPREFIX=$(COQPREF) + +MAKEQ=$(MAKE) -q + +CONFIGUREOPTS=--prefix /usr --mandir /usr/share/man \ + --emacslib /usr/share/emacs/site-lisp/coq --reals all + +configure: configure-stamp +configure-stamp: patch + dh_testdir + if [ -e /usr/bin/ocamlc.opt ]; \ + then \ + ./configure -opt $(CONFIGUREOPTS); \ + else \ + ./configure $(CONFIGUREOPTS); \ + fi + if [ `arch` = ppc ] ; then ./configure $(CONFIGUREOPTS) ; fi + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + if grep -q BEST=opt config/Makefile; \ + then ($(MAKEQ) bin/coqmktop bin/coqc bin/coqtop.byte \ + && $(MAKEQ) bin/coqmktop bin/coqc bin/coqtop.byte \ + && $(MAKEQ) bin/coqtop.opt bin/coqtop \ + && $(MAKEQ) states \ + && $(MAKEQ) world ) \ + || (echo WARNING: NATIVE CODE COMPILATION FAILED \ + && echo Trying to build coq in bytecode \ + && $(MAKE) archclean clean \ + && $(MAKE) BEST=byte world \ + && echo NATIVE CODE COMPILATION FAILED \ + && echo Coq was built in bytecode instead); \ + else $(MAKE) world; \ + fi + $(MAKE) world + touch test-suite/success/debian.v8 + $(MAKE) check + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + -$(MAKE) clean + -$(MAKE) archclean + rm -f bin/parser.opt + rm -f tools/coqdoc/*.cm[oi] + rm -f config/coq_config.ml config/Makefile test-suite/check.log + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) $(ADDPREF) install || $(MAKE) BEST=byte $(ADDPREF) install + -strip -R .note -R .comment $(COQPREF)/usr/bin/coqtop.opt + -strip -R .note -R .comment $(COQPREF)/usr/bin/coqide.opt + -strip -R .note -R .comment $(COQPREF)/usr/bin/coq-interface.opt +# -strip -R .note -R .comment $(COQPREF)/usr/bin/parser.opt + install debian/coq.xpm debian/coq/usr/share/pixmaps/coq.xpm + install debian/coq.desktop debian/coqide/usr/share/applnk/Development + dh_install --sourcedir=$(COQPREF) + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installemacsen + dh_installchangelogs CHANGES + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch |