/* Dependency generator for Makefile fragments.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Contributed by Zack Weinberg, Mar 2000
This program is free software; you can redistribute it and/or modify it
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding! */
-#ifndef __GCC_MKDEPS__
-#define __GCC_MKDEPS__
+#ifndef GCC_MKDEPS_H
+#define GCC_MKDEPS_H
/* This is the data structure used by all the functions in mkdeps.c.
It's quite straightforward, but should be treated as opaque. */
-struct deps
-{
- const char **targetv;
- unsigned int ntargets; /* number of slots actually occupied */
- unsigned int targets_size; /* amt of allocated space - in words */
-
- const char **depv;
- unsigned int ndeps;
- unsigned int deps_size;
-};
+struct deps;
/* Create a deps buffer. */
extern struct deps *deps_init PARAMS ((void));
/* Destroy a deps buffer. */
extern void deps_free PARAMS ((struct deps *));
-/* Add a target (appears on left side of the colon) to the deps list. */
-extern void deps_add_target PARAMS ((struct deps *, const char *));
+/* Add a target (appears on left side of the colon) to the deps list. Takes
+ a boolean indicating whether to quote the target for MAKE. */
+extern void deps_add_target PARAMS ((struct deps *, const char *, int));
-/* Given the name of the primary source file, calculate and add the
- name of the target. This is done by locating and stripping the
- file extension (if any) and adding .o (OBJECT_SUFFIX). In addition,
- any directory components of the path are discarded. */
-extern void deps_calc_target PARAMS ((struct deps *, const char *));
+/* Sets the default target if none has been given already. An empty
+ string as the default target in interpreted as stdin. */
+extern void deps_add_default_target PARAMS ((struct deps *, const char *));
/* Add a dependency (appears on the right side of the colon) to the
deps list. Dependencies will be printed in the order that they
file, causing it to depend on nothing. This is used to work around
the intermediate-file deletion misfeature in Make, in some
automatic dependency schemes. */
-extern void deps_dummy_targets PARAMS ((const struct deps *, FILE *));
+extern void deps_phony_targets PARAMS ((const struct deps *, FILE *));
-#endif
+#endif /* ! GCC_MKDEPS_H */