(TAGS): Make tags file that includes all subdir tags files
[platform/upstream/automake.git] / lib / am / subdirs.am
1 # This directory's subdirectories are mostly independent; you can cd
2 # into them and run `make' without going through this Makefile.
3 # To change the values of `make' variables: instead of editing Makefiles,
4 # (1) if the variable is set in `config.status', edit `config.status'
5 #     (which will cause the Makefiles to be regenerated when you run `make');
6 # (2) otherwise, pass the desired values on the `make' command line.
7
8 @SET_MAKE@
9
10 all install install-info uninstall check tags TAGS info dvi::
11         for subdir in $(SUBDIRS); do \
12           echo making $@ in $$subdir ; \
13           (cd $$subdir; $(MAKE) $@); \
14         done
15
16 TAGS::
17         tags=;                                  \
18         for subdir in $(SUBDIRS); do            \
19           if test -f $subdir/TAGS; then         \
20             tags="$tags -i $subdir/TAGS";       \
21           fi;                                   \
22         done;                                   \
23         etags $tags
24
25 mostlyclean: mostlyclean-recursive mostlyclean-local
26
27 clean: clean-recursive clean-local
28
29 distclean: distclean-recursive
30         $(MAKE) distclean-local
31                
32 maintainer-clean: maintainer-clean-recursive
33         @echo "This command is intended for maintainers to use;"
34         @echo "it deletes files that may require special tools to rebuild."
35         $(MAKE) realclean-local
36
37 mostlyclean-recursive clean-recursive distclean-recursive maintainer-clean-recursive:
38         for subdir in $(SUBDIRS); do \
39           (cd $$subdir; $(MAKE) `echo $@ | sed s/-recursive//`); \
40         done
41
42 mostlyclean-local:
43
44 clean-local: mostlyclean-local
45
46 distclean-local: clean-local
47         rm -f Makefile config.cache config.log config.status
48         rm -f ${CONFIG_HEADER} stamp-h
49
50 maintainer-clean-local: distclean-local
51