summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1996-05-13 18:39:02 +0000
committerRoland McGrath <roland@redhat.com>1996-05-13 18:39:02 +0000
commitdb561cfc3e2039a6404632a4c9939276e5521424 (patch)
treeabd6c857183b006e16b48c90c54d701486266ccf /read.c
parent0feb1dd25faffbd8da595bdcb5bc18158c503234 (diff)
downloadgunmake-db561cfc3e2039a6404632a4c9939276e5521424.tar.gz
Sun May 12 19:19:43 1996 Aaron Digulla <digulla@fh-konstanz.de>
* read.c: "find_semicolon" is declared as static but never defined. No difference between Makefile and makefile on Amiga; added SMakefile to *default_makefiles[]. (read_makefile) SAS/C want's two_colon and pattern_percent be set before use. The current directory on Amiga is "" instead of "." Strange #endif moved.
Diffstat (limited to 'read.c')
-rw-r--r--read.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/read.c b/read.c
index 8d42aa8..97af2ca 100644
--- a/read.c
+++ b/read.c
@@ -30,11 +30,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "glob/glob.h"
#endif
+#ifndef _AMIGA
#ifndef VMS
#include <pwd.h>
#else
struct passwd *getpwnam PARAMS ((char *name));
#endif
+#endif
/* A `struct linebuffer' is a structure which holds a line of text.
`readline' reads a line from a stream into a linebuffer
@@ -114,7 +116,6 @@ static void record_files PARAMS ((struct nameseq *filenames, char *pattern, char
struct dep *deps, unsigned int commands_started, char *commands,
unsigned int commands_idx, int two_colon, char *filename,
unsigned int lineno, int set_default));
-static char *find_semicolon PARAMS ((char *s));
/* Read in all the makefiles and return the chain of their names. */
@@ -188,12 +189,16 @@ read_all_makefiles (makefiles)
if (num_makefiles == 0)
{
static char *default_makefiles[] =
-#if VMS
+#ifdef VMS
/* all lower case since readdir() (the vms version) 'lowercasifies' */
{ "makefile.vms", "gnumakefile", "makefile", 0 };
#else
+#ifdef _AMIGA
+ { "GNUmakefile", "Makefile", "SMakefile", 0 };
+#else /* !Amiga && !VMS */
{ "GNUmakefile", "makefile", "Makefile", 0 };
-#endif
+#endif /* AMIGA */
+#endif /* VMS */
register char **p = default_makefiles;
while (*p != 0 && !file_exists_p (*p))
++p;
@@ -285,6 +290,7 @@ read_makefile (filename, flags)
#ifdef lint /* Suppress `used before set' messages. */
two_colon = 0;
+ pattern_percent = 0;
#endif
if (debug_flag)
@@ -1581,7 +1587,6 @@ parse_file_seq (stringp, stopchar, size, strip)
if (p && *p == ',')
*p =' ';
#endif
-
#ifdef __MSDOS__
/* For MS-DOS, skip a "C:\...". */
if (stopchar == ':' && p != 0 && p[1] == '\\' && isalpha (p[-1]))
@@ -1619,8 +1624,12 @@ parse_file_seq (stringp, stopchar, size, strip)
#ifdef VMS
continue;
#else
+#ifdef _AMIGA
+ name = savestring ("", 0);
+#else
name = savestring ("./", 2);
#endif
+#endif
else
#ifdef VMS
/* VMS filenames can have a ':' in them but they have to be '\'ed but we need
@@ -1988,7 +1997,7 @@ tilde_expand (name)
home_dir = p->pw_dir;
}
}
-#endif
+#endif /* !AMIGA */
if (home_dir != 0)
{
char *new = concat (home_dir, "", name + 1);
@@ -2015,6 +2024,7 @@ tilde_expand (name)
else if (userend != 0)
*userend = '/';
}
+#endif /* !AMIGA */
#endif /* !VMS */
return 0;
}
@@ -2075,7 +2085,7 @@ multi_glob (chain, size)
}
else
memname = 0;
-#endif
+#endif /* !NO_ARCHIVES */
switch (glob (old->name, GLOB_NOCHECK|GLOB_ALTDIRFUNC, NULL, &gl))
{
@@ -2122,7 +2132,7 @@ multi_glob (chain, size)
free (memname);
}
else
-#endif
+#endif /* !NO_ARCHIVES */
{
struct nameseq *elt = (struct nameseq *) xmalloc (size);
elt->name = savestring (gl.gl_pathv[i],
@@ -2147,7 +2157,6 @@ multi_glob (chain, size)
break;
}
}
-#endif
return new;
}