0afc241b153302a1f3315955e35bd3c5584b21c6
[platform/upstream/automake.git] / lib / am / clean.am
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004
3 ## Free Software Foundation, Inc.
4
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
8 ## any later version.
9
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
14
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 ## 02110-1301, USA.
19
20 ## We must test each macro because it might be empty, and an empty "rm
21 ## -rf" command looks disturbing.  Also, the Solaris 2.4 "rm" will
22 ## return an error if there are no arguments other than "-f".
23 mostlyclean-am: mostlyclean-generic
24 mostlyclean-generic:
25 %MOSTLYCLEAN_RMS%
26
27 clean-am: clean-generic mostlyclean-am
28 clean-generic:
29 %CLEAN_RMS%
30
31 distclean-am: distclean-generic clean-am
32 distclean-generic:
33         -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
34 %DISTCLEAN_RMS%
35
36 ## Makefiles and their dependencies cannot be cleaned by
37 ## an -am dependency, because that would prevent other distclean
38 ## dependencies from calling make recursively.  (The multilib
39 ## cleaning rules do this.)
40 ##
41 ## If you change distclean here, you probably also want to change
42 ## maintainer-clean below.
43 distclean:
44         -rm -f %MAKEFILE%
45
46 maintainer-clean-am: maintainer-clean-generic distclean-am
47 maintainer-clean-generic:
48 ## FIXME: shouldn't we really print these messages before running
49 ## the dependencies?
50         @echo "This command is intended for maintainers to use"
51         @echo "it deletes files that may require special tools to rebuild."
52 %MAINTAINER_CLEAN_RMS%
53
54 ## See comment for distclean.
55 maintainer-clean:
56         -rm -f %MAKEFILE%
57
58 .PHONY: clean mostlyclean distclean maintainer-clean \
59 clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
60
61 ?!SUBDIRS?clean: clean-am
62 ?!SUBDIRS?distclean: distclean-am
63 ?!SUBDIRS?mostlyclean: mostlyclean-am
64 ?!SUBDIRS?maintainer-clean: maintainer-clean-am