summaryrefslogtreecommitdiff
path: root/implicit.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 /implicit.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 'implicit.c')
-rw-r--r--implicit.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/implicit.c b/implicit.c
index 947ab4a..2ccf354 100644
--- a/implicit.c
+++ b/implicit.c
@@ -19,9 +19,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "make.h"
#include "rule.h"
#include "dep.h"
-#include "file.h"
+#include "filedef.h"
-static int pattern_search ();
+static int pattern_search PARAMS ((struct file *file, int archive, unsigned int depth,
+ unsigned int recursions));
/* For a FILE which has no commands specified, try to figure out some
from the implicit pattern rules.
@@ -162,7 +163,11 @@ pattern_search (file, archive, depth, recursions)
/* Set LASTSLASH to point at the last slash in FILENAME
but not counting any slash at the end. (foo/bar/ counts as
bar/ in directory foo/, not empty in directory foo/bar/.) */
+#ifdef VMS
+ lastslash = rindex (filename, ']');
+#else
lastslash = rindex (filename, '/');
+#endif
if (lastslash != 0 && lastslash[1] == '\0')
lastslash = 0;
}
@@ -210,7 +215,11 @@ pattern_search (file, archive, depth, recursions)
/* Set CHECK_LASTSLASH if FILENAME contains a directory
prefix and the target pattern does not contain a slash. */
+#ifdef VMS
+ check_lastslash = lastslash != 0 && index (target, ']') == 0;
+#else
check_lastslash = lastslash != 0 && index (target, '/') == 0;
+#endif
if (check_lastslash)
{
/* In that case, don't include the