aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-08-29 21:01:57 +0000
committerRuss Allbery <rra@stanford.edu>2007-08-29 21:01:57 +0000
commitfe69f02800ded1a448fa2810f448e683f5a422d9 (patch)
tree423cacfbb596fb5846b2ed5b717f0f604e647611
parent8776bfe6dd83d8491ff744e77e83e536cac83bde (diff)
Fix Perl's habit of removing the makefile on make clean and handle
distclean for Perl differently. Remove the files created by autogen on make maintainer-clean in contravention of the stupid GNU standards.
-rw-r--r--Makefile.am12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 511e5a7..7917afb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,11 @@ warnings:
$(MAKE) CFLAGS='$(WARNINGS)'
$(MAKE) CFLAGS='$(WARNINGS)' $(check_PROGRAMS)
+# Remove some additional files.
+DISTCLEANFILES = perl/Makefile
+MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in config.h.in~ \
+ configure kasetkey/kasetkey.8
+
# Take appropriate actions in the Perl directory as well.
all-local:
cd perl && perl Makefile.PL
@@ -50,11 +55,10 @@ all-local:
install-data-local:
cd perl && $(MAKE) install
+# ExtUtils::MakeMaker really likes moving the Makefile aside.
clean-local:
- cd perl && $(MAKE) clean
-
-distclean-local:
- cd perl && $(MAKE) distclean
+ [ ! -f perl/Makefile ] || ( set -e; cd perl && $(MAKE) clean )
+ cd perl && ( [ ! -f Makefile.old ] || mv Makefile.old Makefile )
# The bits below are for the test suite, not for the main package.
check_PROGRAMS = tests/runtests