From 66666085d0f69a00c3e5b47bdd7cfb38faa268c6 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 28 Jan 2009 21:11:40 -0800 Subject: [PATCH] * various tweaks to the makefile to make it slightly more elegant --- Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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 -- 2.39.5