Commit graph

282 commits

Author SHA1 Message Date
Paul Smith
0a3a0756b9 Update Copyright statements for 2014. 2014-09-30 09:32:42 -04:00
Paul Smith
3712e8a819 * tests/scripts/features/load: Avoid unused variable warnings. 2014-09-30 09:32:41 -04:00
Paul Smith
621e9edfe9 * tests/config-flags.pm.in, tests/scripts/features/archives: [SV 43046]
Use the "ar" program detected by configure when running the test suite.
2014-09-07 20:14:26 -04:00
Hartmut Becker
579ee85941 * config_flags_pm.com, [RENAMED test_make.com] run_make_tests.com:
Moved into tests directory.
2014-09-07 17:30:37 -04:00
Paul Smith
55c00544cc * read.c (eval): [SV 41677] Correct test for TAB vs. 8 spaces. 2014-07-07 03:43:57 -04:00
John Malmberg
e44d6a12bb Update the regression test harness to support VMS.
* config_flags_pm.com, test_make.com: set up and run the regression
test environment on VMS.
* tests/run_make_tests.pl [VMS]: Use an alternate rmdir()
implementation on VMS.
(run_make_with_options) [VMS]: Provide VMS-specific quoting and shell
invocations.
(set_more_defaults) [VMS]: Set default values when running on VMS.
* tests/test_driver.pl (vms_get_process_logicals) [VMS]: Retrieve the
proper values from %ENV on VMS.
(resetENV) [VMS]: Use it.
(toplevel) [VMS]: Fix a bug with opendir() on some logical_devices.
(compare_output) [VMS]: Convert VMS test output to a "standard" format.
(_run_command) [VMS]: Handle signals and exit codes the VMS way.
(remove_directory_tree_inner) [VMS]: Unlink all versions of the file.
2014-07-07 02:47:30 -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
0faa98a0bb [SV 42249] Propagate correct rule status results.
* remake.c (update_file, update_file_1, check_dep): Return an enum
  update_status value instead of an int, and keep the highest value we
  find as we walk the graph so that the ultimate status is correct.
* tests/scripts/options/dash-q: Add a test for updating prerequisites.
2014-05-01 09:51:04 -04:00
Paul Smith
9c8b68a905 * main.c (die): Close output_context AND make_sync.
die() can be invoked inside a separate output_context, if the
$(error ...) function is expanded as part of a recipe.
2014-01-12 10:54:29 -05:00
Paul Smith
f5f5adb62c * features/loadapi (test_expand): Allocate memory for the nul byte. 2013-11-24 04:08:30 -05:00
Paul Smith
9d58570c77 * makeint.h (STOP_SET): [SV 40371] Cast to unsigned char.
* tests/scripts/misc/utf8: Test variable names with characters >127.
Fix suggested by Robert Bogomip <bob.bogo@milohedge.com>
2013-10-27 17:43:21 -04:00
Paul Smith
107ab16bf6 [SV 40240] Use configure info to build load test shared libs
* tests/config-flags.pm.in: A new file containing variable assignments
for the test suite; these variables are set by configure to contain
the values detected there for compilers, flags, etc.
* tests/run_make_tests.pl: Require the config-flags.pm file
* tests/scripts/features/load, tests/scripts/features/loadapi: Use the
configure-provided values when building the shared test library.
* configure.ac: Replace tests/config-flags.pm.in
* Makefile.am: Make sure tests/config-flags.pm is up to date
2013-10-19 15:39:15 -04:00
Paul Smith
74ed682c54 * GNUMAKEFLAGS: Remove -O so it passes in NO_OUTPUT_SYNC mode. 2013-10-19 12:05:58 -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
52191d9d61 GNU Make release 4.0. 2013-10-09 02:09:21 -04:00
Paul Smith
dc9ae5e017 [SV 39709] Fix some typos. 2013-10-09 01:53:55 -04:00
Paul Smith
b539908f73 Clean up some tests for use on Windows. 2013-10-05 19:30:48 -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
b1c7f0df4e Fix portability issues for Guile 1.8. 2013-09-30 10:56:20 -04:00
Paul Smith
d0944ee2e8 Solaris /bin/sh can't handle multiple options ("-e -c"). 2013-09-30 00:12:18 -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
e8122ecb5d Rename dash-w to print-directory.
Avoid conflicts with dash-W on case-insensitive filesystems.
2013-09-23 11:24:51 -04:00
Paul Smith
fd30db1290 [SV 31155] Parse order-only tokens in second expansion results. 2013-09-22 17:10:35 -04:00
Paul Smith
65931ce7a9 Regression test portability to Solaris. 2013-09-22 17:10:34 -04:00
Paul Smith
7e77685bc3 Portability enhancements for Mac OSX.
Don't dup stdout into stderr in the test suite.
Don't rely on $port_type eq "UNIX" to mean case-preserving.
Check against the real output of ar when creating archives.
2013-09-22 17:09:46 -04:00
Paul Smith
300d1296fb Create a target that tests alternative configurations. 2013-09-21 18:10:08 -04:00
Paul Smith
822f8dae41 Remove obsolete tests. 2013-09-21 17:41:11 -04:00
Paul Smith
6c3e88e60f Ensure that output generated while reading makefiles is synced. 2013-09-21 17:24:59 -04:00
Paul Smith
9cd01958da Ensure that stderr from shell functions in recipes is synced. 2013-09-21 17:08:42 -04:00
Paul Smith
4120f91846 Don't write "Entering" every time we re-exec for remake makefiles. 2013-09-21 14:24:44 -04:00
Paul Smith
1b90248893 [SV 27374] Fatal immediately on unrecoverable fopen() errors. 2013-09-15 17:09:01 -04:00
Paul Smith
a4d8444b59 [SV 39934] Verify jobserver FDs before something else uses them. 2013-09-15 15:21:33 -04:00
Paul Smith
0a81d50d66 [SV 39203] Don't set MAKEFLAGS when restarting.
We are restarting with the original command line flags, so if we set
MAKEFLAGS as well that will cause double flags.
2013-09-15 13:30:21 -04:00
Paul Smith
c5bfa40044 Support the -Orecurse option properly.
In this mode we still collect all the output from a given target and
dump it at once.  However we don't treat recursive lines any differently
from non-recursive lines.  Also we don't print enter/leave messages
after every dump.  However we do ensure that we always print them once
to stdout, so the parent make will collect it properly.
2013-09-14 01:04:04 -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
40a49f244d [Bug #39310] Parse simple pattern prereqs for globbing.
We tried to get some efficiency by avoiding a parse_file_seq() for simple
pattern prerequisites, but this also means no wildcard expansion was
happening, so add it back.  Add regression tests for wildcards in target and
prerequisite lists.
2013-07-22 02:23:02 -04:00
Paul Smith
5601726151 Keep a local count of the max dependency list size.
This global variable could be modified during recursion so keep our
own local copy to compare against.
2013-07-09 19:14:40 -04:00
Paul Smith
dc922e3f4c [SV #38442] Add library names to the string cache. 2013-05-26 16:53:17 -04:00
Paul Smith
c11024b3b3 [SV #38945] Copy the entire buffer back when overwriting CR 2013-05-26 14:41:45 -04:00
Paul Smith
bf60bbd67a [SV #39035] Compare OUT to the beginning of the OUT var/func, not IN. 2013-05-26 13:56:51 -04:00
Paul Smith
8ab3564a71 Fix regression tests after MAKEFLAGS enhancements. 2013-05-22 07:51:46 -04:00
Paul Smith
96cf67bd29 Update source file format: remove TABs, use GNU coding styles. 2013-05-17 02:29:46 -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
2627d83221 Use level o_env_override for MAKEFLAGS so it's reset even with -e.
Fixes Savannah bug #2216.
2013-05-13 02:30:14 -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
Stefano Lattarini
13f13b96b3 cosmetics: fix few innocuous typos
Most of these were found using Lucas De Marchi's 'codespell' tool.

* ChangeLog: Fix minor typos.
* ChangeLog.2: Likewise.
* README.Amiga: Likewise.
* TODO.private: Likewise.
* function.c: Likewise.
* glob/glob.h: Likewise.
* job.c: Likewise.
* main.c: Likewise.
* readme.vms: Likewise.
* remake.c: Likewise.
* tests/ChangeLog: Likewise.
* tests/NEWS: Likewise.
* tests/README: Likewise.
* tests/scripts/variables/private: Likewise.
* vmsdir.h: Likewise.
* signame.c: Likewise.  While at it, improve line wrapping in the
touched comment.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-05-05 20:50:37 -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
1d992d8fe7 Ensure command lines are written synchronously with -O.
If output-sync is enabled, have make write the command line to the temp file
instead of printing it directly to the screen to ensure that the output is
ordered properly.  Also, remove extraneous enter/leave operations by having
them printed directly when dumping temp file output.
2013-05-05 17:03:51 -04:00