summaryrefslogtreecommitdiff
path: root/rule.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1996-03-20 14:57:41 +0000
committerRoland McGrath <roland@redhat.com>1996-03-20 14:57:41 +0000
commit9e443adaf679b071fb3319cfc3259e322dcb6e57 (patch)
treea84a507d09be97fb0932bb661139921a59db71bd /rule.c
parentdfefc77263fe835ae12b3ee27cc3ed9b084311c1 (diff)
downloadgunmake-9e443adaf679b071fb3319cfc3259e322dcb6e57.tar.gz
Tue Mar 19 20:21:34 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
Merged VMS port from Klaus Kaempf <kkaempf@didymus.rmi.de>. * make.h (PARAMS): New macro. * config.h-vms: New file. * makefile.com: New file. * makefile.vms: New file. * readme.vms: New file. * vmsdir.h: New file. * vmsfunctions.c: New file. * vmsify.c: New file. * file.h: Renamed to filedef.h to avoid conflict with VMS system hdr. * ar.c: Added prototypes and changes for VMS. * commands.c: Likewise. * commands.h: Likewise. * default.c: Likewise. * dep.h: Likewise. * dir.c: Likewise. * expand.c: Likewise. * file.c: Likewise. * function.c: Likewise. * implicit.c: Likewise. * job.c: Likewise. * job.h: Likewise. * main.c: Likewise. * make.h: Likewise. * misc.c: Likewise. * read.c: Likewise. * remake.c: Likewise. * remote-stub.c: Likewise. * rule.c: Likewise. * rule.h: Likewise. * variable.c: Likewise. * variable.h: Likewise. * vpath.c: Likewise. * compatMakefile (srcs): Rename file.h to filedef.h.
Diffstat (limited to 'rule.c')
-rw-r--r--rule.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/rule.c b/rule.c
index b69212d..d38cf54 100644
--- a/rule.c
+++ b/rule.c
@@ -17,13 +17,14 @@ along with GNU Make; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "make.h"
-#include "commands.h"
#include "dep.h"
-#include "file.h"
+#include "filedef.h"
+#include "job.h"
+#include "commands.h"
#include "variable.h"
#include "rule.h"
-static void freerule ();
+static void freerule PARAMS ((struct rule *rule, struct rule *lastrule));
/* Chain of all pattern rules. */
@@ -96,9 +97,13 @@ count_implicit_rule_limits ()
for (dep = rule->deps; dep != 0; dep = dep->next)
{
unsigned int len = strlen (dep->name);
+
+#ifdef VMS
+ char *p = rindex (dep->name, ']');
+#else
char *p = rindex (dep->name, '/');
+#endif
char *p2 = p != 0 ? index (dep->name, '%') : 0;
-
ndeps++;
if (len > max_pattern_dep_length)
@@ -125,7 +130,11 @@ count_implicit_rule_limits ()
nonexistent subdirectory. */
dep->changed = !dir_file_exists_p (name, "");
+#ifdef VMS
+ if (dep->changed && *name == ']')
+#else
if (dep->changed && *name == '/')
+#endif
{
/* The name is absolute and the directory does not exist.
This rule can never possibly match, since this dependency
@@ -173,7 +182,11 @@ convert_suffix_rule (target, source, cmds)
/* Special case: TARGET being nil means we are defining a
`.X.a' suffix rule; the target pattern is always `(%.o)'. */
{
+#ifdef VMS
+ targname = savestring ("(%.obj)", 7);
+#else
targname = savestring ("(%.o)", 5);
+#endif
targpercent = targname + 1;
}
else