added assembler support
[automake.git] / depend.am
blob338f41e77af2cedf49afb19f2d8098179ee37cb7
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
7 ## any later version.
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 ## 02111-1307, USA.
19 ## This fragment is probably only useful for maintainers.  It relies
20 ## on GNU make and gcc.  It is only included in the generated
21 ## Makefile.in if `automake' is not passed the `--include-deps' flag.
23 ## We have to use $(CC), not `gcc', even though we do rely on gcc to
24 ## do dependency tracking.  We have to do this because `gcc' is not
25 ## the real name of the compiler when cross-compiling.
26 MKDEP = $(CC) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
28 ## We must create the .deps directory if it doesn't exist.  We do it
29 ## in this strange way a buglet in make -- it won't try to create
30 ## .deps/.P if the .deps directory doesn't exist.
31 DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
32 ## We use ".P" as the name of our placeholder because it can't be
33 ## duplicated by any C source file.  (Well, there could be ".c", but
34 ## no one does that in practice)
35 -include .deps/.P
36 ## This depends on $(BUILT_SOURCES) because that lets us generate
37 ## dependencies for files that don't exist at the start of a fresh
38 ## build.
39 .deps/.P: $(BUILT_SOURCES)
40 ## Use ":" here and not "echo timestamp".  Otherwise GNU Make barfs:
41 ## .deps/.P:1: *** missing separator.  Stop.
42 ## Actually, use a plain "echo" and not ":".  Why?  From the Autoconf
43 ## manual, node Automatic Remaking:
44 ## On some old BSD systems, `touch' or any command that results in an
45 ## empty file does not update the timestamps, so use a command like
46 ## `echo' as a workaround.
47         echo > $@
49 -include $(DEP_FILES)
51 mostlyclean-depend:
53 clean-depend:
55 distclean-depend:
57 maintainer-clean-depend:
58         -rm -rf .deps