X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Makefile;h=7d427c61722a2209bbeb020c99d2bc07adbe401d;hb=refs%2Fheads%2Forigin%2Fspacefun;hp=f2cdf3dc78bda116616975e932ea8694fdbbf056;hpb=850abe6dc2aa125b6b29567aa0290fa0ce77f6ff;p=debbugs.git diff --git a/Makefile b/Makefile index f2cdf3d..7d427c6 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ man_dir := $(DESTDIR)/usr/share/man man8_dir := $(man_dir)/man8 examples_dir := $(doc_dir)/examples -scripts_in := $(foreach script, $(filter-out scripts/config scripts/errorlib scripts/text, $(wildcard scripts/*)),$(patsubst scripts/%,%,$(script))) +scripts_in = $(foreach script, $(filter-out scripts/config% scripts/errorlib scripts/text, $(wildcard scripts/*)),$(patsubst scripts/%,%,$(script))) htmls_in := $(wildcard html/*.html.in) cgis := $(wildcard cgi/*.cgi cgi/*.pl) @@ -23,8 +23,24 @@ cgis := $(wildcard cgi/*.cgi cgi/*.pl) install_exec := install -m755 -p install_data := install -m644 -p +PERL ?= /usr/bin/perl + +all: build test + +build: + $(PERL) Makefile.PL + $(MAKE) -f Makefile.perl + test: - perl -MTest::Harness -I. -e 'runtests(glob(q(t/*.t)))' + $(PERL) -MTest::Harness -I. -e 'runtests(glob(q(t/*.t)))' + +testcover: + PERLLIB=t/cover_lib/ cover -test + +clean: + if [ -e Makefile.perl ]; then \ + $(MAKE) -f Makefile.perl clean; \ + fi; install: install_mostfiles # install basic debbugs documentation @@ -48,7 +64,7 @@ $(var_dir)/spool/db-h $(scripts_dir) $(examples_dir) $(man8_dir); \ # install the scripts - $(foreach script,$(scripts_in), $(exec $(install_exec) $(script) $(scripts_dir)/$(script))) + $(foreach script,$(scripts_in), $(install_exec) scripts/$(script) $(scripts_dir);) $(install_data) scripts/errorlib $(scripts_dir)/errorlib # install examples @@ -86,8 +102,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/*/*), $(install_exec) -d $(templates_dir)/$(patsubst templates/%,%,$(dir));) + $(foreach tmpl, $(wildcard templates/*/*/*.tmpl), $(install_data) $(tmpl) $(templates_dir)/$(patsubst templates/%,%,$(tmpl));) -.PHONY: test \ No newline at end of file +.PHONY: test build