Compare commits

...

14 Commits

Author SHA1 Message Date
Roland McGrath
a369402d11 Correct update date updated in last change. 1994-05-17 03:50:09 +00:00
Roland McGrath
fe3962cf54 Update update date for last change. 1994-05-17 03:46:27 +00:00
Roland McGrath
cf76b42f2b [GETLOADAVG_PRIVILEGED] [! POSIX]: Undefine HAVE_SETEUID and HAVE_SETEGID. 1994-05-17 03:09:02 +00:00
Roland McGrath
fb088e4526 (SCCS_GET_MINUS_G check): Put -G flag before file name. 1994-05-17 02:59:57 +00:00
Roland McGrath
f2804372bd (default_terminal_rules): In SCCS rules, put $(SCCS_OUTPUT_OPTION) before
$<.  On some systems -G is grokked only before the file name.
1994-05-17 02:58:49 +00:00
Roland McGrath
c25db14264 (Overriding Makefiles): Don't suggest using .DEFAULT; that loses if the
target file exists.  Instead recommend the combination of a match-anything
rule and a force target.
1994-05-11 01:42:43 +00:00
Roland McGrath
e83c7d40cd (construct_command_argv_internal): Swallow backslash-newline combinations
inside '' strings too.
1994-05-10 20:27:17 +00:00
Roland McGrath
65d0cd98a9 (do_define): Call collapse_continuations on each line before all else. 1994-05-05 08:15:00 +00:00
Roland McGrath
ec505152e0 (AC_MACRODIR): Change default back. 1994-05-02 23:45:18 +00:00
Roland McGrath
0d2488a804 Note that dirs in VPATH, vpath can be separated by blanks as well as
colons.
1994-05-02 23:00:39 +00:00
Roland McGrath
bc5f054132 (config.h.in): Use $(AC_MACRODIR) in dep. 1994-05-02 22:32:54 +00:00
Roland McGrath
e812d40f9f (AC_MACRODIR): Define if undefined.
(ACFLAGS, configure, config.h.in): Use that value.
1994-05-02 22:29:56 +00:00
Roland McGrath
b12c639bb2 (ARCH==hp300): Disabled customs. 1994-04-25 23:37:12 +00:00
Roland McGrath
dd841ded6f (construct_command_argv_internal): Notice newline inside '' string when
RESTP is non-null.
1994-04-25 23:31:55 +00:00
7 changed files with 76 additions and 37 deletions

View File

@@ -31,7 +31,7 @@ override srcdir := .
override CC := $(CC)
ifeq ($(ARCH),hp300)
customs=yes
#customs=yes
endif
ifdef customs
override REMOTE := cstms
@@ -50,10 +50,12 @@ LOADLIBES := $(filter-out @%@,$(LOADLIBES))
ALLOCA := $(filter-out @%@,$(ALLOCA))
# Tell autoconf/autoheader to use m4 files from the master source.
ACFLAGS := -m /home/gd/gnu/autoconf
configure config.h.in: $(patsubst %,/home/gd/gnu/autoconf/%.m4,\
acspecific acgeneral)
config.h.in: /home/gd/gnu/autoconf/acconfig.h
ifndef AC_MACRODIR
AC_MACRODIR = /home/gd/gnu/autoconf
endif
ACFLAGS := -m $(AC_MACRODIR)
configure config.h.in: $(patsubst %,$(AC_MACRODIR)/%.m4,acspecific acgeneral)
config.h.in: $(AC_MACRODIR)/acconfig.h
configure: configure.in; autoconf $(ACFLAGS)
config.h.in: configure.in; autoheader $(ACFLAGS)

View File

@@ -81,7 +81,7 @@ if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
test -f s.conftest; then
# We successfully created an SCCS file.
echo checking if SCCS get command understands -G
if $SCCS_GET s.conftest -Gconftoast >/dev/null 2>&1 &&
if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
test -f conftoast; then
AC_DEFINE(SCCS_GET_MINUS_G)
fi

View File

@@ -63,9 +63,9 @@ static struct pspec default_terminal_rules[] =
/* SCCS. */
{ "%", "s.%",
"$(GET) $(GFLAGS) $< $(SCCS_OUTPUT_OPTION)" },
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
{ "%", "SCCS/s.%",
"$(GET) $(GFLAGS) $< $(SCCS_OUTPUT_OPTION)" },
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
{ 0, 0, 0 }
};

30
job.c
View File

@@ -1241,9 +1241,18 @@ construct_command_argv_internal (line, restp, shell, ifs)
if (instring)
{
/* Inside a string, just copy any char except a closing quote. */
/* Inside a string, just copy any char except a closing quote
or a backslash-newline combination. */
if (*p == '\'')
instring = 0;
else if (*p == '\\' && p[1] == '\n')
goto swallow_escaped_newline;
else if (*p == '\n' && restp != NULL)
{
/* End of the command line. */
*restp = p;
goto end_of_line;
}
else
*ap++ = *p;
}
@@ -1269,6 +1278,8 @@ construct_command_argv_internal (line, restp, shell, ifs)
/* Backslash-newline combinations are eaten. */
if (p[1] == '\n')
{
swallow_escaped_newline:
/* Eat the backslash, the newline, and following whitespace,
replacing it all with a single space. */
p += 2;
@@ -1280,13 +1291,18 @@ construct_command_argv_internal (line, restp, shell, ifs)
if (*p == '\t')
strcpy (p, p + 1);
if (ap != new_argv[i])
/* Treat this as a space, ending the arg.
But if it's at the beginning of the arg, it should
just get eaten, rather than becoming an empty arg. */
goto end_of_arg;
if (instring)
*ap++ = *p;
else
p = next_token (p) - 1;
{
if (ap != new_argv[i])
/* Treat this as a space, ending the arg.
But if it's at the beginning of the arg, it should
just get eaten, rather than becoming an empty arg. */
goto end_of_arg;
else
p = next_token (p) - 1;
}
}
else if (p[1] != '\0')
/* Copy and skip the following char. */

View File

@@ -10,8 +10,8 @@
@set RCSID $Id$
@set EDITION 0.45
@set VERSION 3.71 Beta
@set UPDATED 20 April 1994
@set UPDATE-MONTH April 1994
@set UPDATED 11 May 1994
@set UPDATE-MONTH May 1994
@c finalout
@@ -1247,13 +1247,12 @@ include one in the other, and add more targets or variable definitions.
However, if the two makefiles give different commands for the same
target, @code{make} will not let you just do this. But there is another way.
@cindex @code{.DEFAULT}, used to override
@cindex match-anything rule, used to override
In the containing makefile (the one that wants to include the other),
you can use the @code{.DEFAULT} special target to say that to remake
any target that cannot be made from the information in the containing
makefile, @code{make} should look in another makefile.
@xref{Last Resort, , Defining Last-Resort Default Rules},
for more information on @code{.DEFAULT}.
you can use a match-anything pattern rule to say that to remake any
target that cannot be made from the information in the containing
makefile, @code{make} should look in another makefile.
@xref{Pattern Rules}, for more information on pattern rules.
For example, if you have a makefile called @file{Makefile} that says how
to make the target @samp{foo} (and other targets), you can write a
@@ -1263,18 +1262,27 @@ makefile called @file{GNUmakefile} that contains:
foo:
frobnicate > foo
.DEFAULT:
%: force
@@$(MAKE) -f Makefile $@@
force: ;
@end example
If you say @samp{make foo}, @code{make} will find @file{GNUmakefile},
read it, and see that to make @file{foo}, it needs to run the command
@samp{frobnicate > foo}. If you say @samp{make bar}, @code{make} will
find no way to make @file{bar} in @file{GNUmakefile}, so it will use the
commands from @code{.DEFAULT}: @samp{make -f Makefile bar}. If
commands from the pattern rule: @samp{make -f Makefile bar}. If
@file{Makefile} provides a rule for updating @file{bar}, @code{make}
will apply the rule. And likewise for any other target that
@file{GNUmakefile} does not say how to make.@refill
@file{GNUmakefile} does not say how to make.
The way this works is that the pattern rule has a pattern of just
@samp{%}, so it matches any target whatever. The rule specifies a
dependency @file{force}, to guarantee that the commands will be run even
if the target file already exists. We give @file{force} target empty
commands to prevent @code{make} from searching for an implicit rule to
build it---otherwise it would apply the same match-anything rule to
@file{force} itself and create a dependency loop!
@node Rules, Commands, Makefiles, Top
@chapter Writing Rules
@@ -1666,9 +1674,9 @@ names of source files in the dependencies as if they all existed in the
current directory. @xref{Commands/Search, ,Writing Shell Commands with
Directory Search}.
In the @code{VPATH} variable, directory names are separated by colons.
The order in which directories are listed is the order followed by
@code{make} in its search.
In the @code{VPATH} variable, directory names are separated by colons or
blanks. The order in which directories are listed is the order followed
by @code{make} in its search.
For example,
@@ -1714,9 +1722,9 @@ There are three forms of the @code{vpath} directive:
Specify the search path @var{directories} for file names that match
@var{pattern}.
The search path, @var{directories}, is a colon-separated list of
directories to be searched, just like the search path used in the
@code{VPATH} variable.
The search path, @var{directories}, is a list of directories to be
searched, separated by colons or blanks, just like the search path used
in the @code{VPATH} variable.
@item vpath @var{pattern}
Clear out the search path associated with @var{pattern}.

14
misc.c
View File

@@ -454,6 +454,7 @@ dep_name (dep)
#ifdef GETLOADAVG_PRIVILEGED
#ifdef POSIX
/* Hopefully if a system says it's POSIX.1 and has the setuid and setgid
functions, they work as POSIX.1 says. Some systems (Alpha OSF/1 1.2,
for example) which claim to be POSIX.1 also have the BSD setreuid and
@@ -466,7 +467,18 @@ dep_name (dep)
#if defined (HAVE_SETREGID) && defined (HAVE_SETGID)
#undef HAVE_SETREGID
#endif
#endif
#else /* Not POSIX. */
/* Some POSIX.1 systems have the seteuid and setegid functions. In a
POSIX-like system, they are the best thing to use. However, some
non-POSIX systems have them too but they do not work in the POSIX style
and we must use setreuid and setregid instead. */
#undef HAVE_SETEUID
#undef HAVE_SETEGID
#endif /* POSIX. */
#ifndef HAVE_UNISTD_H
extern int getuid (), getgid (), geteuid (), getegid ();

9
read.c
View File

@@ -811,12 +811,13 @@ do_define (name, namelen, origin, lineno, infile, filename)
{
lineno += nlines;
nlines = readline (&lb, infile, filename, lineno);
p = next_token (lb.buffer);
collapse_continuations (lb.buffer);
p = next_token (lb.buffer);
if ((p[5] == '\0' || isblank (p[5])) && !strncmp (p, "endef", 5))
{
p += 5;
collapse_continuations (p);
remove_comments (p);
if (*next_token (p) != '\0')
makefile_error (filename, lineno,
@@ -833,7 +834,7 @@ do_define (name, namelen, origin, lineno, infile, filename)
}
else
{
unsigned int len = strlen (p);
unsigned int len = strlen (lb.buffer);
/* Increase the buffer size if necessary. */
if (idx + len + 1 > length)
@@ -842,7 +843,7 @@ do_define (name, namelen, origin, lineno, infile, filename)
definition = (char *) xrealloc (definition, length + 1);
}
bcopy (p, &definition[idx], len);
bcopy (lb.buffer, &definition[idx], len);
idx += len;
/* Separate lines with a newline. */
definition[idx++] = '\n';