]> git.donarmstrong.com Git - debbugs.git/blobdiff - Makefile
Add cleanup_eval_fail method to clean up the eval output
[debbugs.git] / Makefile
index f2cdf3dc78bda116616975e932ea8694fdbbf056..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
@@ -86,8 +99,8 @@ $(var_dir)/spool/db-h $(scripts_dir) $(examples_dir) $(man8_dir); \
        $(install_data) misc/updateseqs $(var_dir)/spool
 
        # install the templates
-       $(foreach dir, $(wildcard templates/*/*), $(exec $(install_exec) $(template_dir)/$(patsubst templates/%,%,$(dir))))
-       $(foreach tmpl, $(wildcard templates/*/*/*.tmpl), $(exec $(install_data) $(template_dir)/$(patsubst templates/%,%,$(tmpl))))
+       $(foreach dir, $(wildcard templates/*/*), $(exec -d $(install_exec) $(template_dir)/$(patsubst templates/%,%,$(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