Commit graph

124 commits

Author SHA1 Message Date
Paul Smith
360b76af84 * docs/make.texi: [SV 47392] Add "Integrating make" chapter. 2016-04-04 01:36:08 -04:00
Paul Smith
2b9dd215d5 * function.c (func_file): Support reading from files.
* NEWS: Add information about reading files.
* make.texi (File Function): Describe reading files.
* tests/scripts/functions/file: Test new features for $(file ...)
2016-03-21 00:44:53 -04:00
Paul Smith
fc2ddebdae * doc/make.texi (Setting Variables): Fix typo (add comma). 2016-03-20 14:23:46 -04:00
Paul Smith
798ebd241b Update Copyright statements for the new year. 2016-02-28 12:55:20 -05:00
Paul Smith
4db6d0c694 * doc/make.texi: [SV 47163] Fix typo in 'ifdef' documentation. 2016-02-28 12:41:41 -05:00
Paul Smith
b754a35df7 * doc/make.texi: [SV 35455] Add more uses for Empty Recipes. 2016-02-28 12:35:15 -05:00
Paul Smith
43181f1f82 [SV 28092] Preserve the exit status of the $(shell...) function.
Add a new variable .SHELLSTATUS which holds the exit status of the
last-invoked shell function or != assignment.

* NEWS, doc/make.texi: Document the change.
* function.c (shell_completed, msdos_openpipe, func_shell_base): Add
shell_completed() to handle the completion of the shell, by setting
.SHELLSTATUS.  Call it where needed.
* job.c (child_handler): Call shell_completed().
* tests/scripts/functions/shell: Add tests for .SHELLSTATUS.
2015-07-12 21:03:24 -04:00
Paul Smith
0a3a0756b9 Update Copyright statements for 2014. 2014-09-30 09:32:42 -04:00
Paul Smith
9a2451af0b * main.c, NEWS, doc/make.text: Rename MAKE_TTY* to MAKE_TERM* 2014-09-15 09:30:40 -04:00
Paul Smith
7f9ce6e97b * main.c (main): Set MAKE_TTYOUT and MAKE_TTYERR.
* configure.ac: Test for isatty() and ttyname()
* makeint.h: provide a substitute for ttyname() if it's not available.
* config.ami.template, config.h-vms.template, config.h.W32.template:
define/undefine HAVE_ISATTY/HAVE_TTYNAME macros.
* NEWS, doc/make.texi: Document these new variables.
2014-09-14 01:03:19 -04:00
Paul Smith
986632ec23 * doc/make.texi: Clarify implicit rule lookup of phony targets
Reported by Frank Heckenbach <f.heckenbach@fh-soft.de>
2014-09-07 20:02:31 -04:00
Paul Smith
e364498113 [SV 41983] Support omitting the text argument to $(file ...)
Reported by Tim Murphy <tnmurphy@gmail.com>
* function.c (func_file): Only write TEXT if it is not NULL.
* NEWS, doc/make.texi: Document the new feature
* tests/scripts/functions/file: Verify that the no-text version of
  $(file ...) works and doesn't add a newline.
2014-07-07 01:59:03 -04:00
Paul Smith
01a745025d Add support for updating the GNU make web pages.
Add makefile rules for updating the http://www.gnu.org/software/make
web pages, including the online GNU make manual.
2013-10-13 16:48:22 -04:00
Paul Smith
4792e154b6 Convert to auto-generated ChangeLog files.
Rename existing ChangeLog files so they won't be distributed.
Add targets to maintMakefile to generate ChangeLog from the Git
repository.  This will require a version of gnulib be available.
Because ChangeLog is auto-generated, we have to switch our
automake mode to "foreign" or it will complain and fail.
2013-10-13 16:48:22 -04:00
Paul Smith
2fb91e19a0 Sanitize the registered function interface.
Expand the characters which are legal in a function name, and check
the name for validity.  Create a type for the function pointer.
Convert the last argument from a boolean to flags, to allow for expansion.
2013-10-05 16:10:30 -04:00
Paul Smith
543521cd47 Reset GNUMAKEFLAGS after parsing.
If we don't do this we'll continually add flags on recursion.  This
is mainly for users to set in their environment before invoking make.
2013-09-29 13:15:00 -04:00
Paul Smith
0296e40fc7 Allow loaded objects to opt out of the "auto-rebuild" feature. 2013-09-22 17:10:35 -04:00
Paul Smith
20ecc58126 [SV 31326] Enhance the info on static pattern errors. 2013-09-15 17:53:30 -04:00
Paul Smith
3aa2aa7e82 [SV 35248] Add --debug "n" flag to turn off current debug options. 2013-09-14 21:01:10 -04:00
Paul Smith
deff9dacc9 Enhance the output sync mode.
Create a new file, output.c, and collect functions that generate output there.
We introduce a new global context specifying where output should go (to stdout
or to a sync file), and the lowest level output generator chooses where to
write output based on that context.

This allows us to set the context globally, and all operations that write
output (including functions like $(info ...) etc.) will use it.

Removed the "--trace=dir" capability.  It was too confusing.  If you have
directory tracking enabled then output sync will print the enter/leave message
for each synchronized block.  If you don't want that, disable directory
tracking.
2013-09-12 04:07:52 -04:00
Paul Smith
5370238316 Update copyright for changes in 2013. 2013-05-17 01:47:42 -04:00
Paul Smith
c21c1455fd Add requirement for plugin_is_GPL_compatible symbol in loaded objects. 2013-05-14 22:53:42 -04:00
Paul Smith
c7732bd5ad Add a new variable: GNUMAKEFLAGS
This allows you to write portable makefiles that set GNU make-specific command
line options in the environment or makefile: add them to GNUMAKEFLAGS instead
of MAKEFLAGS and they will be seen by GNU make but ignored by other
implementations of make.
2013-05-13 02:48:18 -04:00
Paul Smith
381baeef7a Add new --trace[=MODE] flags, with --trace=dir
This mode replaces the previous heuristic setting enabled with -O, where we
would log directory enter/leave for each synchronized output.  Now we only
do that if --trace=dir is given.
2013-05-13 01:30:24 -04:00
Eli Zaretskii
a668c520b2 doc/make.texi (Loaded Object Example): Add a note about building
shared objects on MS-Windows.
2013-05-06 20:16:40 +03:00
Stefano Lattarini
7c77486d1f docs: port manual to Texinfo 5.x
* doc/make.texi: Here.  It was sufficient to change an '@itemx'
into an '@item'.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-05-05 20:51:05 -04:00
Paul Smith
15f7957939 Rename the -O "job" mode to "line" and "make" to "recurse". 2013-05-05 20:19:00 -04:00
Paul Smith
3484c9675a Add memory allocation cleanup to loadable objects.
Add gmk_alloc() and gmk_free() functions so loadable objects can access our
memory model.  Also provide a more extensive example in the manual.
2013-05-04 17:38:53 -04:00
Eli Zaretskii
e44c51ce41 Fix a typo in the manual. 2013-05-04 17:19:56 +03:00
Paul Smith
7f01830927 Add support for per-job output sync.
A new flag to the -O/--output-sync, "job", selects a per-job (that is, per
line of a recipe) output synchronization.  To support this move the close of
the temp file out of the sync_output() function and don't do it until we free
the child, since we may call sync_output() multiple times in a given recipe.
When we set up for a new temp file, if we're in per-job mode we truncate the
file and seek to the beginning to re-use it for every job.
2013-04-28 01:19:19 -04:00
Paul Smith
2bd957a89d Change the arg option for -O from numeric to string. 2013-04-15 13:22:51 -04:00
Paul Smith
4bf3c33f83 Rename the "parallel-sync" option to "output-sync". 2013-04-14 16:31:18 -04:00
Frank Heckenbach
cb64352c75 Initial patch for output synchronization. See Savannah bug #33138.
Based on work by David Boyce <David.S.Boyce@gmail.com>.
2013-04-14 15:38:07 -04:00
Paul Smith
6a52395ed1 Clarify LDFLAGS vs. LDLIBS. Fixes Savannah bug #37970. 2013-04-06 10:51:57 -04:00
Paul Smith
5058a94ee7 Expand the loadable object support.
Provide a simple API for loaded objects to interact with GNU make.  I still
won't guarantee that this API won't change but it's much closer to something
that's supported and provides easy-to-use interfaces with a public header
file.
2013-02-25 01:38:36 -05:00
Paul Smith
b70aa3709e Allow dynamically loaded objects to be rebuilt by make. 2013-01-20 00:55:57 -05:00
Paul Smith
a3bd466e25 Modify .gitignore for proper formatting. 2013-01-12 17:56:25 -05:00
Paul Smith
97fe6e7dd1 Rename CVS ignore files to .gitignore 2013-01-12 17:48:58 -05:00
Paul Smith
7670c84f77 Implement new "load" directive.
Provides support for dynamically loadable objects in GNU make, as a
"technology preview".
2012-10-29 07:05:21 +00:00
Paul Smith
adb50bd4c9 Simplify copyrights using ranges of years.
The new GNU Maintainer's Manual allows the use of year ranges in certain
situations; take advantage of this simplification.
2012-03-05 14:10:39 +00:00
Paul Smith
88f1bc8b55 Modify backslash/newline handling for POSIX.
We fixed Savannah 16670 but that broke previously-working makefiles
that relied on the GNU make behavior.  The POSIX behavior doesn't
seem to me to be better, and can be obtained using GNU make as well,
so put it back as the default behavior and require .POSIX to
get the POSIX behavior.
Add a new section to the manual discussing backslash/newline handling.
Update the test suite.
2012-03-03 18:45:08 +00:00
Paul Smith
ef6461611b Add support for "::=" simple assignment operator.
The next POSIX standard will define "::=" to have the same behavior
as GNU make's ":=", so add support for this new operator.
2012-01-30 00:21:57 +00:00
Paul Smith
fca11f6039 Create a new function $(file ...) 2012-01-29 18:12:22 +00:00
Paul Smith
4e2e5eb199 Disallow whitespace in variable names. 2012-01-16 02:44:04 +00:00
Paul Smith
3f6bb04e75 Update copyright notices. 2012-01-16 02:29:20 +00:00
Paul Smith
c992c4d80f Add GNU Guile as an optional embedded scripting language for make.
On configure-enabled systems, configure will detect Guile installed
(using pkg-config, which is how GNU Guile is distributed) and enable
it if so.

On all non-configure-enabled systems, currently, the default is for
Guile support to be disabled.
2012-01-15 22:41:53 +00:00
Paul Smith
a5c774a51b Ensure variables defined in $(call ...) have global scope
Add a note about using #!/usr/bin/make -f to the manual.
Clean up the w32 subdirectory in the dist tarball.
2011-09-12 05:29:58 +00:00
Paul Smith
bd6f63e563 Updated documentation to fix Savannah bugs #32058 and #31582 2011-05-02 15:11:23 +00:00
Paul Smith
b34438bee8 Add new feature: != shell assignment for portability with BSD make.
Feature submitted by David Wheeler.
2011-04-18 01:25:20 +00:00
Paul Smith
1454a04f81 * Fixups to the make man page
* Minor syntax cleanups in the manual
* In non-maintainer mode set NDEBUG to disable assert()
* Performance improvements in strcache:
    Build Info			1000	2000	4000
    3.82 -g			2.61s	8.85s	33.52s
    3.82 -O2			1.90s	7.62s	27.82s
    New -g (with asserts)	1.03s	2.31s	5.79s
    New -O2 (no asserts)	0.65s	1.50s	3.52s
2011-02-21 07:30:11 +00:00