summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-03-26 07:08:57 +0000
committerPaul Smith <psmith@gnu.org>1999-03-26 07:08:57 +0000
commitecb3bca9f5cbd4ab67acf5da69f379ddadeaeb28 (patch)
tree9b35d9bcb21f2bd765743bc7abe67a97c34a52cc
parentc4353af3f9b143b213644c09da5cf46ef611b250 (diff)
downloadgunmake-ecb3bca9f5cbd4ab67acf5da69f379ddadeaeb28.tar.gz
* Manual updates: added xrefs, some typos sent by users.
* Change the build env. to not link libglob.a unless we need it.
-rw-r--r--ChangeLog15
-rw-r--r--Makefile.am2
-rw-r--r--build.template5
-rw-r--r--configure.in6
-rw-r--r--function.c5
-rw-r--r--maintMakefile9
-rw-r--r--make.h3
-rw-r--r--make.texinfo68
8 files changed, 74 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d23dac..bcfde9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+1999-03-26 Paul D. Smith <psmith@gnu.org>
+
+ * configure.in: Substitute GLOBLIB if we need the link the
+ glob/libglob.a library.
+ * Makefile.am (make_LDADD): Use the subst variable GLOBLIB so we
+ don't link the local libglob.a at all if we don't need it.
+ * build.template: Don't compile glob/*.o unless we want globlib.
+ * maintMakefile (build.sh.in): Substitute the glob/*.o files
+ separately.
+
+1999-03-25 Paul D. Smith <psmith@gnu.org>
+
+ * make.texinfo: Various typos and additions, pointed out by James
+ G. Sack <jsack@dornfeld.com>.
+
1999-03-22 Paul D. Smith <psmith@gnu.org>
* make.texinfo (Functions): Add a new section documenting the new
diff --git a/Makefile.am b/Makefile.am
index e1e9990..caf555e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,7 +10,7 @@ make_SOURCES = main.c commands.c job.c dir.c file.c misc.c read.c remake.c \
commands.h dep.h filedef.h job.h make.h rule.h variable.h \
signame.c signame.h \
getopt.c getopt1.c getopt.h
-make_LDADD = @LIBOBJS@ @ALLOCA@ glob/libglob.a
+make_LDADD = @LIBOBJS@ @ALLOCA@ @GLOBLIB@
info_TEXINFOS = make.texinfo
man_MANS = make.1
diff --git a/build.template b/build.template
index aee512f..a91a3c1 100644
--- a/build.template
+++ b/build.template
@@ -32,6 +32,7 @@ ALLOCA='@ALLOCA@'
LOADLIBES='@LIBS@'
extras='@LIBOBJS@'
REMOTE='@REMOTE@'
+GLOBLIB='@GLOBLIB@'
# Common prefix for machine-independent installed files.
prefix='@prefix@'
@@ -48,6 +49,10 @@ set -e
# These are all the objects we need to link together.
objs="%objs% remote-${REMOTE}.o ${extras} ${ALLOCA}"
+if [ x"$GLOBLIB" != x ]; then
+ objs="$objs %globobjs%"
+fi
+
# Compile the source files into those objects.
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
echo compiling ${file}...
diff --git a/configure.in b/configure.in
index 651387e..8251a8a 100644
--- a/configure.in
+++ b/configure.in
@@ -169,7 +169,9 @@ AC_CACHE_VAL(make_cv_sys_gnu_glob, [
case "$make_cv_sys_gnu_glob" in
yes) AC_MSG_RESULT(yes) ;;
no) AC_MSG_RESULT([no; using local copy])
- CPPFLAGS="$CPPFLAGS -I$srcdir/glob" ;;
+ CPPFLAGS="$CPPFLAGS -I$srcdir/glob"
+ AC_SUBST(GLOBLIB) GLOBLIB=glob/libglob.a
+ ;;
esac
@@ -179,8 +181,6 @@ if test -r $srcdir/maintMakefile; then
fi
AC_SUBST_FILE(MAINT_MAKEFILE)
-dnl AM_CONDITIONAL(MAINT_MAKEFILE, test -r $srcdir/maintMakefile)
-
AC_OUTPUT(Makefile glob/Makefile build.sh)
case "$make_badcust" in
diff --git a/function.c b/function.c
index 2183cd8..da13dd7 100644
--- a/function.c
+++ b/function.c
@@ -440,10 +440,7 @@ string_glob (line)
(&line, '\0', sizeof (struct nameseq),
/* We do not want parse_file_seq to strip `./'s.
That would break examples like:
- $(patsubst ./%.c,obj/%.o,$(wildcard ./*.c)). */
-
- /* Yep, and the preceding comment triggers a GCC
- warning. Nothing wrong though. */
+ $(patsubst ./%.c,obj/%.o,$(wildcard ./?*.c)). */
0),
sizeof (struct nameseq));
diff --git a/maintMakefile b/maintMakefile
index 0c9aa9b..26ba938 100644
--- a/maintMakefile
+++ b/maintMakefile
@@ -45,9 +45,9 @@ NMakefile: NMakefile.template .dep_segment Makefile.am maintMakefile
#
build.sh.in: build.template Makefile.am maintMakefile
rm -f $@
- sed -e 's@%objs%@$(filter-out remote-%, $(make_OBJECTS)\
- $(patsubst %.c,%.o,$(globsrc)))@' \
- $< > $@
+ sed -e 's@%objs%@$(filter-out remote-%, $(make_OBJECTS)@' \
+ -e 's@%globobjs%@$(patsubst %.c,%.o,$(globsrc)))@' \
+ $< > $@
chmod a-w+x $@
# Use automake to build a dependency list file, for "foreign" makefiles like
@@ -63,8 +63,7 @@ build.sh.in: build.template Makefile.am maintMakefile
# And _I_ want them to be removed ;)
#
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in \
- glob/configure glob/aclocal.m4 glob/config.h.in glob/Makefile.in \
- glob/stamp-h.in
+ glob/Makefile.in
MAINTAINERCLEANFILES = $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
missing build.sh.in .dep_segment
diff --git a/make.h b/make.h
index b170d59..76a747b 100644
--- a/make.h
+++ b/make.h
@@ -297,8 +297,7 @@ extern char *alloca ();
# define streq(a, b) (strcmp ((a), (b)) == 0)
# define strieq(a, b) (strcmp ((a), (b)) == 0)
#endif
-
-#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
+#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
/* Add to VAR the hashing value of C, one character in a name. */
#define HASH(var, c) \
diff --git a/make.texinfo b/make.texinfo
index 632ba48..6d9be0a 100644
--- a/make.texinfo
+++ b/make.texinfo
@@ -81,6 +81,8 @@ Published by the Free Software Foundation @*
Boston, MA 02111-1307 USA @*
ISBN @value{ISBN} @*
+Maintenance and updates since Version 3.76 by Paul D. Smith.
+
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
@@ -332,8 +334,11 @@ Implicit Rule for Archive Member Targets
The @code{make} utility automatically determines which pieces of a large
program need to be recompiled, and issues commands to recompile them.
This manual describes GNU @code{make}, which was implemented by Richard
-Stallman and Roland McGrath. GNU @code{make} conforms to section 6.2 of
-@cite{IEEE Standard 1003.2-1992} (POSIX.2).
+Stallman and Roland McGrath. Development since Version 3.76 has been
+handled by Paul D. Smith.
+
+GNU @code{make} conforms to section 6.2 of @cite{IEEE Standard
+1003.2-1992} (POSIX.2).
@cindex POSIX
@cindex IEEE Standard 1003.2
@cindex standards conformance
@@ -2184,10 +2189,11 @@ last-modification time, when the rule's commands were last executed. It
does so because one of the commands is a @code{touch} command to update the
target file.
-The empty target file must have some dependencies. When you ask to remake
-the empty target, the commands are executed if any dependency is more
-recent than the target; in other words, if a dependency has changed since
-the last time you remade the target. Here is an example:
+The empty target file should have some dependencies (otherwise it
+doesn't make sense). When you ask to remake the empty target, the
+commands are executed if any dependency is more recent than the target;
+in other words, if a dependency has changed since the last time you
+remade the target. Here is an example:
@example
print: foo.c bar.c
@@ -2277,6 +2283,15 @@ intermediate files, except that they are never automatically deleted.
@code{.SECONDARY} with no dependencies marks all file targets mentioned
in the makefile as secondary.
+@findex .DELETE_ON_ERROR
+@item .DELETE_ON_ERROR
+@cindex removing targets on failure
+
+If @code{.DELETE_ON_ERROR} is mentioned as a target anywhere in the
+makefile, then @code{make} will delete the target of a rule if it has
+changed and its commands exit with a nonzero exit status, just as it
+does when it receives a signal. @xref{Errors, ,Errors in Commands}.
+
@findex .IGNORE
@item .IGNORE
@@ -2295,7 +2310,7 @@ commands. @xref{Errors, ,Errors in Commands}.
@item .SILENT
If you specify dependencies for @code{.SILENT}, then @code{make} will
-not the print commands to remake those particular files before executing
+not print the commands to remake those particular files before executing
them. The commands for @code{.SILENT} are not meaningful.
If mentioned as a target with no dependencies, @code{.SILENT} says not
@@ -2853,8 +2868,8 @@ the makefile:
@cindex @code{--just-print}
@cindex @code{--dry-run}
@cindex @code{--recon}
-When @code{make} is given the flag @samp{-n} or @samp{--just-print},
-echoing is all that happens, no execution. @xref{Options Summary,
+When @code{make} is given the flag @samp{-n} or @samp{--just-print}
+it only echoes commands, it won't execute them. @xref{Options Summary,
,Summary of Options}. In this case and only this case, even the
commands starting with @samp{@@} are printed. This flag is useful for
finding out which commands @code{make} thinks are necessary without
@@ -3563,8 +3578,8 @@ MAKEOVERRIDES =
@cindex E2BIG
This is not usually useful to do. However, some systems have a small
fixed limit on the size of the environment, and putting so much
-information in into the value of @code{MAKEFLAGS} can exceed it.
-If you see the error message @samp{Arg list too long}, this may be the problem.
+information into the value of @code{MAKEFLAGS} can exceed it. If you
+see the error message @samp{Arg list too long}, this may be the problem.
@findex .POSIX
@cindex POSIX.2
(For strict compliance with POSIX.2, changing @code{MAKEOVERRIDES} does
@@ -6007,6 +6022,7 @@ and the resulting message is displayed, but processing of the makefile
continues.
The result of the expansion of this function is the empty string.
+@end table
@node Running, Implicit Rules, Functions, Top
@chapter How to Run @code{make}
@@ -6974,7 +6990,7 @@ running the C preprocessor, @code{cpp}. The precise command is
@pindex .o
@file{@var{n}} is made automatically from @file{@var{n}.o} by running
the linker (usually called @code{ld}) via the C compiler. The precise
-command used is @w{@samp{$(CC) $(LDFLAGS) @var{n}.o $(LOADLIBES)}}.
+command used is @w{@samp{$(CC) $(LDFLAGS) @var{n}.o $(LOADLIBES) $(LDLIBS)}}.
This rule does the right thing for a simple program with only one
source file. It will also do the right thing if there are multiple
@@ -7708,9 +7724,9 @@ lib: foo.o bar.o lose.o win.o
@end example
Of the variables listed above, four have values that are single file
-names, and two have values that are lists of file names. These six have
-variants that get just the file's directory name or just the file name
-within the directory. The variant variables' names are formed by
+names, and three have values that are lists of file names. These seven
+have variants that get just the file's directory name or just the file
+name within the directory. The variant variables' names are formed by
appending @samp{D} or @samp{F}, respectively. These variants are
semi-obsolete in GNU @code{make} since the functions @code{dir} and
@code{notdir} can be used to get a similar effect (@pxref{File Name
@@ -8408,8 +8424,8 @@ in the normal way (@pxref{Suffix Rules}). Thus a double-suffix rule
Here is a summary of the features of GNU @code{make}, for comparison
with and credit to other versions of @code{make}. We consider the
features of @code{make} in 4.2 BSD systems as a baseline. If you are
-concerned with writing portable makefiles, you should use only the
-features of @code{make} @emph{not} listed here or in @ref{Missing}.
+concerned with writing portable makefiles, you should not use the
+features of @code{make} listed here, nor the ones in @ref{Missing}.
Many features come from the version of @code{make} in System V.
@@ -9095,7 +9111,7 @@ These errors are not really @code{make} errors at all. They mean that a
program that @code{make} invoked as part of a command script returned a
non-0 error code (@samp{Error @var{NN}}), which @code{make} interprets
as failure, or it exited in some other abnormal fashion (with a
-signal of some type).
+signal of some type). @xref{Errors, ,Errors in Commands}.
If no @code{***} is attached to the message, then the subprocess failed
but the rule in the makefile was prefixed with the @code{-} special
@@ -9110,7 +9126,7 @@ One of the most common reasons for this message is that you (or perhaps
your oh-so-helpful editor, as is the case with many MS-Windows editors)
have attempted to indent your command scripts with spaces instead of a
TAB character. Remember that every line in the command script must
-begin with a TAB character. Eight spaces do not count.
+begin with a TAB character. Eight spaces do not count. @xref{Rule Syntax}.
@item commands commence before first target. Stop.
@itemx missing rule before commands. Stop.
@@ -9121,7 +9137,7 @@ must always be associated with a target.
The second form is generated if the line has a semicolon as the first
non-whitespace character; @code{make} interprets this to mean you left
-out the "target: dependency" section of a rule.
+out the "target: dependency" section of a rule. @xref{Rule Syntax}.
@item No rule to make target `@var{xxx}'.
@itemx No rule to make target `@var{xxx}', needed by `@var{yyy}'.
@@ -9142,6 +9158,7 @@ command line, and @code{make} couldn't find any makefiles to read in.
The latter means that some makefile was found, but it didn't contain any
default target and none was given on the command line. GNU @code{make}
has nothing to do in these situations.
+@xref{Makefile Arguments, ,Arguments to Specify the Makefile}.@refill
@item Makefile `@var{xxx}' was not found.
@itemx Included makefile `@var{xxx}' was not found.
@@ -9154,6 +9171,7 @@ GNU @code{make} allows commands to be specified only once per target
(except for double-colon rules). If you give commands for a target
which already has been defined to have commands, this warning is issued
and the second set of commands will overwrite the first set.
+@xref{Multiple Rules, ,Multiple Rules for One Target}.
@item Circular @var{xxx} <- @var{yyy} dependency dropped.
This means that @code{make} detected a loop in the dependency graph:
@@ -9164,7 +9182,8 @@ dependencies, etc., one of them depended on @var{xxx} again.
This means you've defined a normal (recursive) @code{make} variable
@var{xxx} that, when its expanded, will refer to itself (@var{xxx}).
This is not allowed; either use simply-expanded variables (@code{:=}) or
-use the append operator (@code{+=}).
+use the append operator (@code{+=}). @xref{Using Variables, ,How to Use
+Variables}.
@item Unterminated variable reference. Stop.
This means you forgot to provide the proper closing parenthesis
@@ -9173,7 +9192,7 @@ or brace in your variable or function reference.
@item insufficient arguments to function `@var{xxx}'. Stop.
This means you haven't provided the requisite number of arguments for
this function. See the documentation of the function for a description
-of its arguments.
+of its arguments. @xref{Functions, ,Functions for Transforming Text}.
@item missing target pattern. Stop.
@itemx multiple target patterns. Stop.
@@ -9181,7 +9200,8 @@ of its arguments.
These are generated for malformed static pattern rules. The first means
there's no pattern in the target section of the rule, the second means
there are multiple patterns in the target section, and the third means
-the target doesn't contain a pattern character (@code{%}).
+the target doesn't contain a pattern character (@code{%}). @xref{Static
+Usage, ,Syntax of Static Pattern Rules}.
@end table
@@ -9439,8 +9459,8 @@ dist: $(SRCS) $(AUX)
-rm -rf `cat .fname`
mkdir `cat .fname`
ln $(SRCS) $(AUX) `cat .fname`
- -rm -rf `cat .fname` .fname
tar chZf `cat .fname`.tar.Z `cat .fname`
+ -rm -rf `cat .fname` .fname
@end group
@group