Commit 61b7421c authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[bug] `make distcheck` fails.

parent 4a844b49
......@@ -65,11 +65,12 @@ noinst_SCRIPTS = \
xt/pod-coverage.t \
xt/pod-spelling.t \
xt/perltidy.t
nobase_modules_DATA = \
cpanfile
EXTRA_DIST = \
AUTHORS.md \
CONTRIBUTING.md \
cpanfile \
INSTALL.md \
NEWS.md \
OChangeLog \
......@@ -77,7 +78,8 @@ EXTRA_DIST = \
README.md \
etc_README \
$(check_SCRIPTS) $(check_DATA) \
$(noinst_SCRIPTS)
$(noinst_SCRIPTS) \
$(nobase_modules_DATA)
CLEANFILES = sympa_wizard.pl.inst
......@@ -85,10 +87,13 @@ MSGFMT=@MSGFMT@
.po.mo:
$(MSGFMT) -o $@ $<
# Skip this with "make distcheck"
check-local: $(check_DATA)
[ -z "$(TEST_FILES)" ] && TEST_FILES="$(check_SCRIPTS)"; \
PERL5LIB=src/lib; export PERL5LIB; \
$(PERL) -MTest::Harness -e 'runtests @ARGV' $$TEST_FILES
if test -d t; then \
[ -z "$(TEST_FILES)" ] && TEST_FILES="$(check_SCRIPTS)"; \
PERL5LIB=src/lib; export PERL5LIB; \
$(PERL) -MTest::Harness -e 'runtests @ARGV' $$TEST_FILES; \
fi
authorcheck:
[ -z "$(TEST_FILES)" ] && TEST_FILES="$(noinst_SCRIPTS)"; \
......@@ -169,10 +174,9 @@ installconfig: installdir sympa_wizard.pl.inst
$(SED) \
-e 's|--sysconfdir--|$(sysconfdir)|' \
-e 's|--defaultdir--|$(defaultdir)|' \
etc_README > $(DESTDIR)$(sysconfdir)/README; \
$(srcdir)/etc_README > $(DESTDIR)$(sysconfdir)/README; \
chmod 644 $(DESTDIR)$(sysconfdir)/README; \
fi
@$(INSTALL_DATA) cpanfile $(DESTDIR)$(modulesdir)/;
nextstep:
@echo ""
......@@ -195,11 +199,19 @@ nextstep:
@echo "#######################################################"
uninstall-hook:
rm -f $(DESTDIR)$(confdir)/sympa.conf
rm -f $(DESTDIR)$(confdir)/wwsympa.conf
cd $(DESTDIR)$(confdir) && rm -f sympa.conf
cd $(DESTDIR)$(confdir) && rm -f wwsympa.conf
cd $(DESTDIR)$(sysconfdir) && rm -f data_structure.version
cd $(DESTDIR)$(sysconfdir) && rm -f README
DISTCHECK_CONFIGURE_FLAGS = --enable-fhs --with-perl=$(PERL)
dist-hook:
$(MAKE) check
distcheck-hook:
-md5sum $(DIST_ARCHIVES) > $(DIST_ARCHIVES).md5
-sha256sum $(DIST_ARCHIVES) > $(DIST_ARCHIVES).sha256
tidyall:
tidyall --conf-file doc/dot.tidyallrc --root-dir . -r src t xt
......@@ -77,11 +77,12 @@ CLEANFILES = $(man1_MANS) $(man5_MANS)
.pod.1:
$(AM_V_GEN)$(POD2MAN) --section=1 --center="sympa $(VERSION)" \
--lax --release="$(VERSION)" $*.pod $@
--lax --release="$(VERSION)" $< $@
.pod.5:
$(AM_V_GEN)$(POD2MAN) --section=5 --center="sympa $(VERSION)" \
--lax --release="$(VERSION)" $*.pod $@
--lax --release="$(VERSION)" $< $@
.podpl.pod:
$(AM_V_GEN)PERL5LIB=$(top_srcdir)/src/lib; export PERL5LIB; \
$(PERL) $(srcdir)/$< > $*.pod
$(AM_V_GEN)PERL5LIB=$(top_builddir)/src/lib:$(top_srcdir)/src/lib; \
export PERL5LIB; \
$(PERL) $< --top_srcdir=$(top_srcdir) > $*.pod
......@@ -4,11 +4,16 @@ use strict;
use warnings;
use Cwd qw();
use English qw(-no_match_vars);
use Getopt::Long;
use Sympa::ConfDef;
use Sympa::ListDef;
use Sympa::ListOpt;
my $top_srcdir;
GetOptions('top_srcdir=s' => \$top_srcdir);
$top_srcdir ||= '..';
my @groups = (
[description => 'List definition'],
[sending => 'Sending/receiving setup'],
......@@ -184,7 +189,7 @@ sub _format {
} elsif (exists $pinfo->{scenario}) {
my $function = $pinfo->{scenario};
my $cwd = Cwd::getcwd();
chdir '../default/scenari/' or die $ERRNO;
chdir $top_srcdir . '/default/scenari/' or die $ERRNO;
$parameters .= sprintf "Name of C<%s> scenario:\n\n",
$pinfo->{scenario};
......
......@@ -242,12 +242,17 @@ man3pm: $(MAN3POD) Makefile
| $(SED) -e 's/\.pm$$//' -e 's/\.pod$$//' -e 's/\//::/g' \
| while read pod; do \
rm -f $$pod.$(man3ext); \
if grep '^=head1 NAME$$' $$pm > /dev/null; then \
if test -f $(top_builddir)/src/lib/$$pm; then \
pmfile=$(top_builddir)/src/lib/$$pm; \
else \
pmfile=$(top_srcdir)/src/lib/$$pm; \
fi; \
if grep '^=head1 NAME$$' $$pmfile > /dev/null; then \
echo " GEN " $$pod.$(man3ext); \
$(POD2MAN) --section=$(man3ext) \
--center="sympa $(VERSION)" \
--lax --release="$(VERSION)" \
$$pm $$pod.$(man3ext); \
$$pmfile $$pod.$(man3ext); \
fi; \
done; \
done
......@@ -260,7 +265,12 @@ install-data-hook: man3pm
echo "$$pm" \
| $(SED) -e 's/\.pm$$//' -e 's/\.pod$$//' -e 's/\//::/g' \
| while read pod; do \
if grep '^=head1 NAME$$' $$pm > /dev/null; then \
if test -f $(top_builddir)/src/lib/$$pm; then \
pmfile=$(top_builddir)/src/lib/$$pm; \
else \
pmfile=$(top_srcdir)/src/lib/$$pm; \
fi; \
if grep '^=head1 NAME$$' $$pmfile > /dev/null; then \
echo "installing $$pod.$(man3ext)"; \
$(INSTALL_DATA) "$$pod.$(man3ext)" "$(DESTDIR)$(man3dir)" \
|| exit $$?; \
......@@ -268,3 +278,6 @@ install-data-hook: man3pm
done; \
done
uninstall-hook:
rm -f $(DESTDIR)$(man3dir)/*.$(man3ext)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment