Commit graph

54 commits

Author SHA1 Message Date
Paul Smith
7ef56bc8dc Update copyright statements for 2017. 2017-07-09 21:52:28 -04:00
Paul Smith
fda00f88d3 Add test suite support to Windows
* main.c (main): Sanitize program name detection on Windows.
* makeint.h: 'program' is a const string on all platforms now.
* tests/run_make_tests.bat: Windows bat file to invoke tests
* tests/test_driver.pl: Obtain system-specific error messages.
(get_osname): Compute the $port_type here.  Add more $osname checks
for different Windows Perl ports.
(_run_command): Rewrite the timeout capability to work properly
with Windows.  Don't use Perl fork/exec; instead use system(1,...)
which allows a more reliable/proper kill operation.
Also, allow options to be given as a list instead of a string, to
allow more complex quoting of command-line arguments.
* tests/run_make_tests.pl (run_make_with_options): Allow options
to be provided as a list in addition to a simple string.
(set_more_defaults): Write sample makefiles and run make on them
instead of trying to run echo and invoking make with -f-, to avoid
relying on shell and echo to get basic configuration values.  Also
create a $sh_name variable instead of hard-coding /bin/sh.
* tests/scripts/features/archives: Skip on Windows.
* tests/scripts/features/escape: Use list method for passing options.
* tests/scripts/features/include: Use system-specific error messages.
* tests/scripts/features/output-sync: "Command not found" errors
generate very different / odd output on Windows.  This needs to be
addressed but for now disable these tests on Windows.
* tests/scripts/functions/abspath: Disable on Windows.
* tests/scripts/functions/file: Use system-specific error messages.
* tests/scripts/functions/shell: "Command not found" errors generate
very different / odd output on Windows.  This needs to be addressed
but for now disable these tests on Windows.
* tests/scripts/misc/close_stdout: Disable on Windows.
* tests/scripts/options/dash-k: Use system-specific error messages.
* tests/scripts/options/dash-l: Disable on Windows.
* tests/scripts/options/eval: Use list method for passing options.
* tests/scripts/options/general: Skip some non-portable tests.
* tests/scripts/targets/ONESHELL: Skip some non-portable tests.
* tests/scripts/targets/POSIX: Skip some non-portable tests.
* tests/scripts/variables/MAKEFILES: Skip some non-portable tests.
* tests/scripts/variables/SHELL: Use a makefile not -f- for testing.
2017-06-04 18:37:20 -04:00
Enrique Olaizola
d9d4e06084 * tests/run_make_tests.pl: [SV 50902] Find Perl modules 2017-06-04 10:19:57 -04:00
Paul Smith
45bf0e3a67 Portability changes for the test suite.
* tests/test_driver.pl: Save error strings for later comparison.
* tests/run_make_tests.pl: Create portable commands for later use.
* tests/*: Use these new variables.
2016-12-26 09:01:59 -05:00
Paul Smith
65115e7095 * tests/run_make_tests.pl: Add file/lineno info to .run file. 2016-04-04 01:38:37 -04:00
Paul Smith
40277b8850 * tests/run_make_tests.pl: Preserve $make_command
* tests/scripts/options/dash-n: Use $make_command.  This fixes
a spurious failure when running tests with valgrind enabled.
2016-03-23 01:26:55 -04:00
Paul Smith
798ebd241b Update Copyright statements for the new year. 2016-02-28 12:55:20 -05:00
John Malmberg
e75662bc6a Set up for running tests on VMS.
* run_make_tests.pl: set $port_type to be 'VMS-DCL' when the test are
run from the VMS DCL Interpreter.  When the tests are run from GNV
on VMS, the $port_type will be 'UNIX'.
* run_make_tests.com: VMS search list support.  This is needed for
using a search list such as prj_root = lcl_root:,vms_root:,src_root:
for building and testing.
2014-10-20 01:23:47 -04:00
Paul Smith
0a3a0756b9 Update Copyright statements for 2014. 2014-09-30 09:32:42 -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
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
65931ce7a9 Regression test portability to Solaris. 2013-09-22 17:10:34 -04:00
Paul Smith
1b90248893 [SV 27374] Fatal immediately on unrecoverable fopen() errors. 2013-09-15 17:09:01 -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
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
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
23c2b99e9d Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines.
Fixes Savannah bug #34530.
2012-03-04 00:24:20 +00:00
Paul Smith
a77c5c0910 Fix Savannah bug #35410: handle escape chars in filter/filter-out
Also add a valgrind suppression file for Guile-enabled make.
2012-03-03 22:12:46 +00:00
Paul Smith
3f6bb04e75 Update copyright notices. 2012-01-16 02:29:20 +00:00
Paul Smith
5acda13ace - Fix the NEWS file to be accurate
- Add oneshell to $(.FEATURES) (forgot that!)
- Fix Savannah bug #30612: handling of archive references with >1 object
2010-08-14 02:50:14 +00:00
Paul Smith
9903cda2a7 Update copyrights for 2010. 2010-07-13 01:20:10 +00:00
Paul Smith
7ba7dbca47 Add the beginning of the .ONESHELL special feature.
Original patch by David Boyce.  Modified by Paul Smith.
2010-07-12 05:23:19 +00:00
Paul Smith
5f188b39a4 Update copyright years. 2009-10-25 18:56:44 +00:00
Paul Smith
f907a4d90c - Update manual description for pattern rule search algorithm
- Add new "-all" flag to the test suite to run tests that don't pass yet
- Add some non-passing tests
- Fix from Andreas Buening for OS/2.
2009-09-28 23:08:49 +00:00
Paul Smith
8f30b68871 - Add xcalloc() and call it
- Fix memory errors found by valgrind
- Remove multi_glob() and empower parse_file_seq() to do its job:
  the goal here is to remove the confusing reverse/re-reverse we do on
  the file lists: needed for future fixes.
- Add a prefix arg to parse_file_seq()
- Make concat() variadic so it can take arbitrary #'s of strings
2009-09-16 17:07:01 +00:00
Paul Smith
c8840352ac - Fix Savannah bug #19108
- Fix Savannah bug #17752
- Test suite:
  * When tests fail keep a "run" file containing the command invoked.
  * Support for the Valgrind "memcheck" and "massif" tools.
2009-06-10 02:21:09 +00:00
Paul Smith
bb4d040fad Fix Savannah bug #20452.
Add a new feature to the test suite suggested by Icarus Sparry:
set a timer before invoking a test, so that if it loops infinitely we
will wake up and have a chance to kill the process and continue.
2007-07-14 02:57:46 +00:00
Paul Smith
891ebd4d97 * Update to GPLv3
* Update copyright to 2007
* Fix download URL for translation files (thanks to Thiemo Seufer)
2007-07-04 19:35:15 +00:00
Paul Smith
6ccf33cdbd This is a major update, which switches virtually every allocated-but-not-freed
string into the strcache.  As a side-effect, many more structure members and
function arguments can/should be declared const.

As mentioned in the changelog, unfortunately measurement shows that this
change does not yet reduce memory.  The problem is with secondary expansion:
because of this we store all the prerequisites in the string cache twice.
First we store the prerequisite string after initial expansion but before
secondary expansion, then we store each individual file after secondary
expansion and expand_deps().  I plan to change expand_deps() to be callable
in either context (eval or snap_deps) then have non-second-expansion
targets call expand_deps() during eval, so that we only need to store that
dependency list once.
2007-03-20 03:02:26 +00:00
Paul Smith
7595f38f62 Fixed a number of documentation bugs, plus some build/install issues:
16304, 16468, 16577, 17701, 17880, 16051, 16652, 16698
Plus some from the mailing list.

Imported a patch from Eli to allow Cygwin builds to support DOS-style
pathnames.
2006-10-01 05:38:38 +00:00
Paul Smith
afc4906aca Some test updates for Windows.
Handle SHELL set on the command line properly for windows.
2006-03-08 20:15:08 +00:00
Paul Smith
a6bdc58385 Last of the copyright updates. 2006-02-11 22:16:04 +00:00
Paul Smith
24338ec929 More copyright/license updates. 2006-02-11 20:00:39 +00:00
Paul Smith
5a7a42cfce - New code capability: a read-only string cache. Start of solution for
Savannah bug #15182, but not much uses it yet.  Coming shortly.
- Added short-circuiting $(and ..) and $(or ...) functions.
2006-02-10 05:29:00 +00:00
Paul Smith
4bd6db9df1 Update the make.1 man page.
Use rm -f instead of rm in the test scripts.  Fixes bug #15085.
2005-12-13 14:44:17 +00:00
Paul Smith
11095a90f1 Make second expansion optional (partial implementation).
I decided this feature was too impacting to make the permanent default
behavior.  This set of changes makes the default behavior of make the
old behavior (no second expansion).  If you want second expansion, you
must define the .SECONDEXPANSION: special target before the first target
that needs it.

This set of changes ONLY fixes explicit and static pattern rules to work
like this.  Implicit rules still have second expansion enabled all the
time: I'll work on that next.

Note that there is still a backward-incompatibility: now to get the old
SysV behavior using $$@ etc. in the prerequisites list you need to set
.SECONDEXPANSION: as well.
2005-10-24 13:01:39 +00:00
Paul Smith
5ee856d96d Try using POSIX::getcwd to find the working directory wherever it exists.
This should help the tests run more accurately on Windows (hopefully...)
2005-08-31 13:38:17 +00:00
Paul Smith
d2516343bc * New feature: -L option
* New function: $(info ...)
* Disallow $(eval ...) to create prereq relationships inside command scripts
  (caused core dumps)
* Try to allow more tests to succeed in Windows/DOS by sanitizing CRLF and \
* Various bug fixes and code cleanups (see the ChangeLog entry)
2005-02-28 07:48:22 +00:00
Paul Smith
9d153cc1b1 Add configure operations to support MINGW on Windows. 2005-02-26 01:41:48 +00:00
Paul Smith
c90f47e832 Flush stdout after printing directory info.
Fix references to MINGW #define constants.
Remove WINDOWS32 ifdef from sub_proc.h.
Only add variables to the command line for recursion once.
New features in run_make_test: #PWD# and #MAKEPATH# replacements.
Test the multi-variable fix in the recursion regression test.
2005-02-10 00:10:57 +00:00
Paul Smith
29d78ddb28 Update the test template. A few fixes in run_make_test().
Rename implicit_prereq_eval to patternrules, to be the start of a suite
of tests of pattern rules.
2004-09-22 04:36:17 +00:00
Boris Kolpackov
73e7767ffc Fixed bug in implicit rule prerequisite evaluation code. Added test. 2004-09-21 20:23:12 +00:00
Paul Smith
9714e501fb Add some more unit tests for variable flavors.
Allow run_make_tests() to be invoked with an undef makefile string, in
which case it re-uses the previous string.
2004-09-21 05:39:04 +00:00
Paul Smith
0799ce730d Fix some bugs in variable pattern substitution (e.g. $(VAR:A=B)),
reported by Markus Mauhart <qwe123@chello.at>.  One was a simple typo; to
fix the other we call patsubst_expand() for all instances of variable
substitution, even when there is no '%'.  We used to call subst_expand()
with a special flag set in the latter case, but it didn't work properly
in all situations.  Easier to just use patsubst_expand() since that's
what it is.
2004-09-21 04:00:31 +00:00
Paul Smith
08c8105c54 Various enhancements
- OS/2 Patches
  - OpenVMS updates
  - Sanitize the handling of -include/sinclude with and without -k
  - Fix the setting of $< for order-only rules.
2004-05-16 19:16:52 +00:00
Paul Smith
1a5beef51f - Fix bug #1405: allow multiple pattern-specific variables to match a target.
- Fix some uncleanliness about the implementation of patterns-specific vars.
- Some enhancements to the OS/2 port.
2003-05-02 01:44:59 +00:00
Paul Smith
21cf8c6444 Install Greg McGary's patches to port the id-utils hashing functions to
GNU make.  Also he provides some other performance fixups after doing
some profiling of make on large makefiles.

Modify the test suite to allow the use of Valgrind to find memory problems.
2002-07-11 06:38:57 +00:00
Paul Smith
90f23f1ea6 * Updates for VMS, Windows, and DOS ports.
* Clean up some warnings.
2000-02-05 07:50:47 +00:00