mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-31 00:53:23 +00:00
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.
This commit is contained in:
parent
0feb1dd25f
commit
db561cfc3e
1 changed files with 17 additions and 8 deletions
25
read.c
25
read.c
|
@ -30,11 +30,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "glob/glob.h"
|
#include "glob/glob.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _AMIGA
|
||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#else
|
#else
|
||||||
struct passwd *getpwnam PARAMS ((char *name));
|
struct passwd *getpwnam PARAMS ((char *name));
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* A `struct linebuffer' is a structure which holds a line of text.
|
/* A `struct linebuffer' is a structure which holds a line of text.
|
||||||
`readline' reads a line from a stream into a linebuffer
|
`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,
|
struct dep *deps, unsigned int commands_started, char *commands,
|
||||||
unsigned int commands_idx, int two_colon, char *filename,
|
unsigned int commands_idx, int two_colon, char *filename,
|
||||||
unsigned int lineno, int set_default));
|
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. */
|
/* Read in all the makefiles and return the chain of their names. */
|
||||||
|
|
||||||
|
@ -188,12 +189,16 @@ read_all_makefiles (makefiles)
|
||||||
if (num_makefiles == 0)
|
if (num_makefiles == 0)
|
||||||
{
|
{
|
||||||
static char *default_makefiles[] =
|
static char *default_makefiles[] =
|
||||||
#if VMS
|
#ifdef VMS
|
||||||
/* all lower case since readdir() (the vms version) 'lowercasifies' */
|
/* all lower case since readdir() (the vms version) 'lowercasifies' */
|
||||||
{ "makefile.vms", "gnumakefile", "makefile", 0 };
|
{ "makefile.vms", "gnumakefile", "makefile", 0 };
|
||||||
#else
|
#else
|
||||||
|
#ifdef _AMIGA
|
||||||
|
{ "GNUmakefile", "Makefile", "SMakefile", 0 };
|
||||||
|
#else /* !Amiga && !VMS */
|
||||||
{ "GNUmakefile", "makefile", "Makefile", 0 };
|
{ "GNUmakefile", "makefile", "Makefile", 0 };
|
||||||
#endif
|
#endif /* AMIGA */
|
||||||
|
#endif /* VMS */
|
||||||
register char **p = default_makefiles;
|
register char **p = default_makefiles;
|
||||||
while (*p != 0 && !file_exists_p (*p))
|
while (*p != 0 && !file_exists_p (*p))
|
||||||
++p;
|
++p;
|
||||||
|
@ -285,6 +290,7 @@ read_makefile (filename, flags)
|
||||||
|
|
||||||
#ifdef lint /* Suppress `used before set' messages. */
|
#ifdef lint /* Suppress `used before set' messages. */
|
||||||
two_colon = 0;
|
two_colon = 0;
|
||||||
|
pattern_percent = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (debug_flag)
|
if (debug_flag)
|
||||||
|
@ -1581,7 +1587,6 @@ parse_file_seq (stringp, stopchar, size, strip)
|
||||||
if (p && *p == ',')
|
if (p && *p == ',')
|
||||||
*p =' ';
|
*p =' ';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __MSDOS__
|
#ifdef __MSDOS__
|
||||||
/* For MS-DOS, skip a "C:\...". */
|
/* For MS-DOS, skip a "C:\...". */
|
||||||
if (stopchar == ':' && p != 0 && p[1] == '\\' && isalpha (p[-1]))
|
if (stopchar == ':' && p != 0 && p[1] == '\\' && isalpha (p[-1]))
|
||||||
|
@ -1618,8 +1623,12 @@ parse_file_seq (stringp, stopchar, size, strip)
|
||||||
/* ".///" was stripped to "". */
|
/* ".///" was stripped to "". */
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
continue;
|
continue;
|
||||||
|
#else
|
||||||
|
#ifdef _AMIGA
|
||||||
|
name = savestring ("", 0);
|
||||||
#else
|
#else
|
||||||
name = savestring ("./", 2);
|
name = savestring ("./", 2);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
@ -1988,7 +1997,7 @@ tilde_expand (name)
|
||||||
home_dir = p->pw_dir;
|
home_dir = p->pw_dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !AMIGA */
|
||||||
if (home_dir != 0)
|
if (home_dir != 0)
|
||||||
{
|
{
|
||||||
char *new = concat (home_dir, "", name + 1);
|
char *new = concat (home_dir, "", name + 1);
|
||||||
|
@ -2015,6 +2024,7 @@ tilde_expand (name)
|
||||||
else if (userend != 0)
|
else if (userend != 0)
|
||||||
*userend = '/';
|
*userend = '/';
|
||||||
}
|
}
|
||||||
|
#endif /* !AMIGA */
|
||||||
#endif /* !VMS */
|
#endif /* !VMS */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2075,7 +2085,7 @@ multi_glob (chain, size)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
memname = 0;
|
memname = 0;
|
||||||
#endif
|
#endif /* !NO_ARCHIVES */
|
||||||
|
|
||||||
switch (glob (old->name, GLOB_NOCHECK|GLOB_ALTDIRFUNC, NULL, &gl))
|
switch (glob (old->name, GLOB_NOCHECK|GLOB_ALTDIRFUNC, NULL, &gl))
|
||||||
{
|
{
|
||||||
|
@ -2122,7 +2132,7 @@ multi_glob (chain, size)
|
||||||
free (memname);
|
free (memname);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif /* !NO_ARCHIVES */
|
||||||
{
|
{
|
||||||
struct nameseq *elt = (struct nameseq *) xmalloc (size);
|
struct nameseq *elt = (struct nameseq *) xmalloc (size);
|
||||||
elt->name = savestring (gl.gl_pathv[i],
|
elt->name = savestring (gl.gl_pathv[i],
|
||||||
|
@ -2147,7 +2157,6 @@ multi_glob (chain, size)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue