summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-07-16 00:18:37 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-07-20 21:56:27 +0200
commitb0735f31658b09fdc333b11985c3b20b11c66f55 (patch)
tree244a8f1a17e84b3bd18c60ba3bad0fe35d5f3258 /Makefile.am
parent1fc5a414471532765aa079c2c377fed5df00f90f (diff)
downloadcurl-b0735f31658b09fdc333b11985c3b20b11c66f55.tar.gz
make: make distclean work again
The clean-local hook needed some polish to make sure make distclean works. Added comment describing why.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index c2a9cb4a6..6ff1d51ea 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -86,9 +86,13 @@ endif
examples:
@(cd docs/examples; $(MAKE) check)
+# This is a hook to have 'make clean' also clean up the dosc and the tests
+# dir. The extra check for the Makefiles being present is necessary because
+# 'make distcheck' will make clean first in these directories _before_ it runs
+# this hook.
clean-local:
- @(cd tests; $(MAKE) clean)
- @(cd docs; $(MAKE) clean)
+ @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
+ @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
#
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros