From: Don Armstrong Date: Thu, 29 Jan 2009 05:11:40 +0000 (-0800) Subject: * various tweaks to the makefile to make it slightly more elegant X-Git-Tag: release/2.6.0~461^2~66 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=66666085d0f69a00c3e5b47bdd7cfb38faa268c6;p=debbugs.git * various tweaks to the makefile to make it slightly more elegant --- diff --git a/Makefile b/Makefile index 152e7509..1bb7ef88 100644 --- 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