]> git.donarmstrong.com Git - debbugs.git/commitdiff
* various tweaks to the makefile to make it slightly more elegant
authorDon Armstrong <don@donarmstrong.com>
Thu, 29 Jan 2009 05:11:40 +0000 (21:11 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 29 Jan 2009 05:11:40 +0000 (21:11 -0800)
Makefile

index 152e75099ce994e117c0b2e9ac5e9e8f44a2d1de..1bb7ef88a0c51f09d3146665277bc27a83436ca2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,8 +23,21 @@ cgis         := $(wildcard cgi/*.cgi cgi/*.pl)
 install_exec   := install -m755 -p
 install_data   := install -m644 -p
 
-test:
-       perl -MTest::Harness -I. -e 'runtests(glob(q(t/*.t)))'
+PERL ?= /usr/bin/perl
+
+all: build test
+
+build:
+       $(PERL) Makefile.PL
+       $(MAKE) -f Makefile.perl
+
+test: build
+       $(PERL) -MTest::Harness -I. -e 'runtests(glob(q(t/*.t)))'
+
+clean:
+       if [ -e Makefile.perl ]; then \
+               $(MAKE) -f Makefile.perl clean; \
+       fi;
 
 install: install_mostfiles
        # install basic debbugs documentation
@@ -90,4 +103,4 @@ $(var_dir)/spool/db-h $(scripts_dir) $(examples_dir) $(man8_dir); \
        $(foreach tmpl, $(wildcard templates/*/*/*.tmpl), $(exec $(install_data) $(tmpl) $(template_dir)/$(patsubst templates/%,%,$(tmpl))))
 
 
-.PHONY: test
\ No newline at end of file
+.PHONY: test build
\ No newline at end of file