diff options
| author | Robert Collins <robertc@robertcollins.net> | 2009-09-19 14:52:16 +1000 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2009-09-19 14:52:16 +1000 |
| commit | 141a5ba551634071868c9f7e5b8afafaf26cfda9 (patch) | |
| tree | 1377ac964aa854e1787ca96995f8233da4a22fd2 | |
| parent | 40a8691ee33d4ba657db3cb92963fcd2c33f8d67 (diff) | |
| download | subunit-git-141a5ba551634071868c9f7e5b8afafaf26cfda9.tar.gz | |
Finally got distcheck working again.
| -rw-r--r-- | Makefile.am | 22 | ||||
| -rwxr-xr-x | perl/Makefile.PL.in | 9 |
2 files changed, 22 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am index 04be7ff..a146a94 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ EXTRA_DIST = \ c++/README \ c++/cppunit-subunit-1.10.2.patch \ perl/diff-subunit \ - perl/Makefile.PL \ + perl/Makefile.PL.in \ perl/lib/Subunit/Diff.pm \ perl/lib/Subunit.pm \ python/subunit/__init__.py \ @@ -86,10 +86,10 @@ c_tests_test_child_LDADD = $(tests_LDADD) all-local: perl/Makefile - cd perl && $(MAKE) all + $(MAKE) -C perl all check-local: perl/Makefile - cd perl && $(MAKE) check + $(MAKE) -C perl check clean-local: find . -name "*.pyc" | xargs -r rm @@ -97,18 +97,24 @@ clean-local: # Remove perl dir for VPATH builds. distclean-local: - -rmdir perl - -rm perl/Makefile.PL + -rmdir perl > /dev/null + -rm perl/Makefile.PL > /dev/null -# NB: Installs to a perl lib dir, not usr/bin. install-exec-local: perl/Makefile - cd perl && $(MAKE) install + $(MAKE) -C perl install mostlyclean-local: rm -rf perl/blib rm -rf perl/pm_to_blib +# 'uninstall' perl files during distcheck +uninstall-local: + if [ "_inst" = `basename ${prefix}` ]; then \ + $(MAKE) -C perl uninstall_distcheck; \ + rm -f "$(DESTDIR)$(bindir)"/diff-subunit; \ + fi + perl/Makefile: perl/Makefile.PL mkdir -p perl - cd perl && perl @abs_top_srcdir@/perl/Makefile.PL + cd perl && perl Makefile.PL -rm perl/Makefile.old > /dev/null diff --git a/perl/Makefile.PL.in b/perl/Makefile.PL.in index ffd8f4f..682e683 100755 --- a/perl/Makefile.PL.in +++ b/perl/Makefile.PL.in @@ -1,13 +1,20 @@ use ExtUtils::MakeMaker; WriteMakefile( + 'INSTALL_BASE' => '@prefix@', 'NAME' => 'Subunit', 'VERSION' => '@SUBUNIT_VERSION@', 'test' => { 'TESTS' => 'tests/*.pl' }, 'PMLIBDIRS' => [ 'lib' ], - 'EXE_FILES' => [ 'diff-subunit' ], + 'EXE_FILES' => [ '@abs_srcdir@/diff-subunit' ], ); sub MY::postamble { <<'EOT'; check: # test + +uninstall_distcheck: + rm -fr $(DESTINSTALLARCHLIB) + +VPATH = @srcdir@ +.PHONY: uninstall_distcheck EOT } |
