]> git.donarmstrong.com Git - debbugs.git/blobdiff - Makefile
remove the obsolete perl_dir stuff
[debbugs.git] / Makefile
index b19be5dce9417a43d5048b7fa0ff2ea98245dc3f..86c3235801570f327d89dfc1c3e34f05cda5e8c0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,6 @@ sbin_dir        := $(DESTDIR)/usr/sbin
 etc_dir                := $(DESTDIR)/etc/debbugs
 var_dir                := $(DESTDIR)/var/lib/debbugs
 scripts_dir    := $(DESTDIR)/usr/lib/debbugs
-perl_dir       := $(DESTDIR)/usr/share/perl5/Debbugs
 doc_dir                := $(DESTDIR)/usr/share/doc/debbugs
 templates_dir  := $(DESTDIR)/usr/share/debbugs/templates
 man_dir                := $(DESTDIR)/usr/share/man
@@ -16,29 +15,28 @@ scripts_in  = $(foreach script, $(filter-out scripts/config% scripts/errorlib scr
 htmls_in       := $(wildcard html/*.html.in)
 cgis           := $(wildcard cgi/*.cgi cgi/*.pl)
 
-# We use the Makefile.PL to install these; not totally decided if we
-# should switch entirely to this model.
-#perls         := $(shell find Debbugs -type f -iname '*.pm')
 
 install_exec   := install -m755 -p
 install_data   := install -m644 -p
 
 PERL ?= /usr/bin/perl
+# Some tests need to run under an UTF-8 locale.
+UTF8_LOCALE ?= C.UTF-8
 
-all: build test
+all: build
 
 build:
        $(PERL) Makefile.PL
        $(MAKE) -f Makefile.perl
 
 test:
-       $(PERL) -MTest::Harness -I. -e 'runtests(glob(q(t/*.t)))'
+       LC_ALL=$(UTF8_LOCALE) $(PERL) -MTest::Harness -I. -e 'runtests(glob(q(t/*.t)))'
 
 test_%: t/%.t
-       $(PERL) -MTest::Harness -I. -e 'runtests(q($<))'
+       LC_ALL=$(UTF8_LOCALE) $(PERL) -MTest::Harness -I. -e 'runtests(q($<))'
 
 testcover:
-       PERLLIB=t/cover_lib/ cover -test
+       LC_ALL=$(UTF8_LOCALE) PERL5LIB=t/cover_lib/:. cover -test
 
 clean:
        if [ -e Makefile.perl ]; then \
@@ -47,10 +45,8 @@ clean:
 
 install: install_mostfiles
        # install basic debbugs documentation
-       $(install_data) COPYING UPGRADE README debian/README.mail $(doc_dir)
-
-       # configure debbugs
-       $(sbin_dir)/debbugsconfig
+       $(install_data) COPYING UPGRADE README.md debian/README.mail $(doc_dir)
+       $(MAKE) -f Makefile.perl install DESTDIR=$(DESTDIR)
 
 install_mostfiles:
        # create the directories if they aren't there
@@ -89,11 +85,6 @@ $(var_dir)/spool/db-h $(scripts_dir) $(examples_dir) $(man8_dir); \
        for cgi in $(cgis); do $(install_exec) $$cgi $(var_dir)/www/cgi; done
        $(install_exec) cgi/bugs-fetch2.pl $(var_dir)/www/cgi/bugs-fetch2.pl
 
-#      # install Perl modules
-#      for perl in $(perls); do $(install_data) $$perl $(perl_dir); done
-       # Make documentation for the perl modules
-
-
        # install debbugsconfig
        $(install_exec) debian/debbugsconfig $(sbin_dir)
        $(install_data) debian/debbugsconfig.8 $(man8_dir)