Can't use 'true' in Makefiles
[automake.git] / depend.am
blobc1fdc904e7bb88cd1b568a0bc3b3135fcaf2b8a7
1 # This fragment is probably only useful for maintainers.  It relies on
2 # GNU make and gcc.  It is only included in the generated Makefile.in
3 # if `automake' is not passed the `--include-deps' flag.
5 MKDEP = gcc -MM
7 ## Use ${kr} in case we are doing auto-deANSIfication.
8 DEP_FILES = $(patsubst %.{kr}o,.deps/%.P,$(OBJECTS))
10 ## We use ".P" as the name of our placeholder because it can't be
11 ## duplicated by any C source file.  (Well, there could be ".c", but
12 ## no one does that in practice)
13 -include .deps/.P
14 .deps/.P:
15         test -d .deps || mkdir .deps
16 ## Use ":" here and not "echo timestamp".  Otherwise GNU Make barfs:
17 ## .deps/.P:1: *** missing separator.  Stop.
18         : > $@
20 -include $(DEP_FILES)
21 $(DEP_FILES): .deps/.P
23 .deps/%.P: %.c
24         @echo "mkdeps $< > $@"
25         @$(MKDEP) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@-tmp
26         @mv $@-tmp $@
28 # End of maintainer-only section