summaryrefslogtreecommitdiff
path: root/tests/scripts/features/include
Commit message (Collapse)AuthorAgeFilesLines
* Adjust output strings to be alignedPaul Smith2023-04-021-3/+3
| | | | | | | | Change error and fatal messages to start with lowercase and not end with a period. Note a few very common messages were left as-is, just in case some other tools parse them. Also modify the test known-good-output to satisfy the messages.
* * tests/scripts/features/include [AIX]: Set explicit timestampsPaul Smith2023-02-191-3/+5
|
* Convert references from "GNU make" to "GNU Make"Paul Smith2023-01-011-1/+1
|
* [SV 63484] Force included makefiles to be explicitDmitry Goncharov2022-12-181-0/+15
| | | | | | | | | Ensure included makefiles are not treated as intermediate, even if they are created by an implicit rule. Reported by Patrick Oppenlander <patrick.oppenlander@gmail.com>. * src/read.c (eval_makefile): Mark makefiles as explicit. * tests/scripts/features/include: Add a test.
* [SV 63516] [DOS] Support include files with drivespecsPaul Smith2022-12-181-1/+11
| | | | | | | | | * src/makeint.h (HAVE_DRIVESPEC): Create a macro to check. * src/main.c (.FEATURES): Add "dospaths" as a feature. * src/read.c (eval_makefile) [DOS]: If the included makefile name starts with a drivespec, don't search the include directories. * doc/make.texi (Include): Document this behavior. * tests/scripts/features/include: Add a test.
* [SV 56301] Fail if an included makefile can't be builtDmitry Goncharov2022-09-201-28/+33
| | | | | | | | | | Fail if a mandatory include file fails to be built even if it's built as part of a grouped target where the other include file is optional. * src/main.c (main): If a makefile doesn't build set any_failed. * tests/scripts/features/include: Add tests. * tests/scripts/options/dash-k: Stop after include build failure.
* tests: Allow run_make_test() to avoid passing -fPaul Smith2022-02-271-1/+1
| | | | | | | | | | | | We already use undef makefile strings to mean "re-use the previous makefile", so if the string is empty we'll assume it means "don't use a makefile at all" (don't add -f). * tests/run_make_tests.pl (run_make_test): If the makefile string is empty, don't create a makefile or add -f. * tests/scripts/features/include: Change empty makefile to "\n". * tests/scripts/misc/close_stdout: Ditto. * tests/scripts/options/dash-r: Ditto.
* [SV 57778] Don't ignore included makefiles that can't be readDmitry Goncharov2021-09-061-2/+83
| | | | | | | | | | If we find an included makefile but it's not readable, stop immediately with an error rather than continuing to look in other directories. * src/read.c (eval_makefile): Only keep searching if the fopen error is ENOENT, else stop and fail. * tests/scripts/features/include: Add tests to verify this behavior.
* [SV 60795] Don't remake phony included makefiles and show errorsPaul Smith2021-09-061-1/+78
| | | | | | | | | | | | | | | | | | | | | | | Change the handling of included makefiles which are phony targets to be similar to double-colon rules with no prerequisites: simply don't build them at all during the remake a makefile phase. Ensure that any included makefile which is needed but not built results in an error. Update the documentation to make this clear. Add tests to verify this behavior. * doc/make.texi (Remaking Makefiles): Clarify double-colon exception. Document that phony targets are handled the same way. (Phony Targets): Ditto. * src/main.c (main): Check for phony targets when skipping goals. Rather than throwing out skipped but failed goals keep them separately then report them as errors. * src/read.c (eval): Set the file location on included makefiles even when there's no error. * tests/scripts/features/include: Add tests for handling included makefiles with both phony and double-colon rules to rebuild them.
* Fix build and test issues on WindowsPaul Smith2021-03-281-2/+8
| | | | | | | | | * src/dep.h (DEP): Remove extraneous semicolon. * src/dir.c (find_directory) [W32]: Replace removed variable. * tests/scripts/features/include: Allow the extra default makefile searched for on Windows. * tests/scripts/functions/file: Use $(info ...) to avoid "command too long" errors on Windows.
* [SV 57676] Support included files being built after failingPaul Smith2020-12-051-2/+14
| | | | | | | | | If a -include file does not exist, then some subsequent operation creates it, then allow it to be successfully included. * src/read.c (eval_makefile): If our last mtime was NONEXISTENT then reset it to 0 so we'll check it again. * tests/scripts/features/include: Add a test for this behavior.
* [SV 58735] Define the order that makefiles are rebuilt.Paul Smith2020-07-191-2/+23
| | | | | | | | | | | | Ensure that makefiles are rebuilt in the order in which make first considered them, and document this behavior in the manual. * NEWS: Add a note about the new behavior * doc/make.text (How make Processes a Makefile): Document it. * main.c (main): Inverse the list of makefile goals. * read.c (read_all_makefiles): Add default makefiles to the list at the front in reverse order, the same way other makefiles are added. * tests/scripts/features/include: Add tests to verify rebuild order.
* * job.c (child_error): Modify error message string.Paul Smith2019-09-221-1/+1
| | | | | | | | This reverts commit 6264deece3bb77798240a906ceed79097adbcf48. Further investigation discovers that the real issue is that GNU Emacs compile mode doesn't have a matching regex for GNU make error messages generated when targets fail. I submitted a patch to GNU Emacs adding a matcher for compile mode.
* * job.c (child_error): Modify error message string.Paul Smith2017-10-301-1/+1
| | | | | Ensure Emacs compile-mode's next-error doesn't match target failure messages. Syntax errors in makefiles are still matched.
* Add test suite support to WindowsPaul Smith2017-06-041-46/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* [SV 40236] Handle included file open failures properly.Paul Smith2016-12-261-11/+19
| | | | | | | | * read.c (eval_makefile): Set deps->error if we discovered any error reading makefiles, and set NONEXISTENT_MTIME so we know it needs to be rebuilt. * main.c (main): Clean up management of makefile_mtimes. * tests/scripts/features/include: Add open failure testcases.
* Portability changes for the test suite.Paul Smith2016-12-261-4/+4
| | | | | | * 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.
* * main.c (main): [SV 40234] Show correct error message.Paul Smith2016-12-261-0/+8
|
* [SV 102] Don't show unnecessary include file errors.Paul Smith2016-04-091-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | Delay the generation of error messages for included files until we are sure that we can't rebuild that included file. * dep.h (struct dep): Don't reuse "changed"; make a separate field to keep "flags". Get rid of dontcare and use the flag. (struct goaldep): Create a new structure for goal prereqs that tracks an errno value and the floc where the include happened. Rework the structures to ensure they are supersets as expected. In maintainer mode with GCC, use inline to get type checking. * read.c (eval_makefile): Return a struct goaldep for the new makefile. Ensure errno is set properly to denote a failure. (read_all_makefiles): Switch to goaldep and check errno. (eval): Don't show included file errors; instead remember them. * remake.c (update_goal_chain): Set global variables to the current goaldep we're building, and the entire chain. (show_goal_error): Check if the current failure is a consequence of building an included makefile and if so print an error. (complain): Call show_goal_error() on rule failure. * job.c (child_error): Call show_goal_error() on child error. * main.c (main): Switch from struct dep to goaldep. * misc.c (free_dep_chain): Not used; make into a macro. * tests/scripts/features/include: Update and include new tests. * tests/scripts/options/dash-B, tests/scripts/options/dash-W, tests/scripts/options/print-directory, tests/scripts/variables/MAKE_RESTARTS: Update known-good-output.
* Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines.Paul Smith2012-03-041-6/+6
| | | | Fixes Savannah bug #34530.
* - Include <alloca.h> even on non-__GNUC__ systems.Paul Smith2009-10-031-0/+11
| | | | - Add some tests for unresolved bugs.
* Fix Savannah bugs #15110, #25493, #12686, and #17740.Boris Kolpackov2009-09-301-2/+50
|
* Various fixes and updates from testers of the beta3 release (mostly WindowsPaul Smith2005-07-041-1/+1
| | | | and OS/2 changes).
* Fix strerror() handling for systems which set ANSI_STRING.Paul Smith2005-06-271-0/+10
| | | | | Don't print errors if "include" is specified with no arguments. New test suite for the $(shell ...) function.
* Fixed Savannah bugs #13216 and #13218.Boris Kolpackov2005-05-311-0/+18
|
* Implemented dontcare flag inheritance when rebuilding makefiles.Boris Kolpackov2004-09-281-1/+11
|
* Various enhancementsPaul Smith2004-05-161-6/+27
| | | | | | | - OS/2 Patches - OpenVMS updates - Sanitize the handling of -include/sinclude with and without -k - Fix the setting of $< for order-only rules.
* * A few fixes.Paul Smith2000-01-231-3/+6
|
* * Added the test suite to the main distribution.Paul Smith1999-09-141-0/+58