summaryrefslogtreecommitdiff
path: root/build_w32.bat
Commit message (Collapse)AuthorAgeFilesLines
* Add support for .WARNINGS special variablePaul Smith2023-04-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new special variable, .WARNINGS, to allow per-makefile control over warnings. The command line settings will override this. Move the handling of warning flags to a new file: src/warning.c. Allow the decode to work with generic strings, and call it from decode_switches(). * Makefile.am: Add new file src/warning.c. * build_w32.bat: Ditto. * builddos.bat: Ditto. * po/POTFILES.in: Ditto. * src/makeint.h: #define for the .WARNINGS variable name. * src/warning.h: Add declarations for methods moved from main.c. Rename the enum warning_state to warning_action. * src/warning.c: New file. Move all warning encode/decode here from main.c. * src/main.c: Move methods into warning.c and call those methods instead. (main): Set .WARNINGS as a special variable. * src/job.c (construct_command_argv): Rename to warning_action. * src/read.c (tilde_expand): Ditto. * src/variable.c (set_special_var): Update warnings when the .WARNINGS special variable is set. * tests/scripts/options/warn: Check invalid warning options. * tests/scripts/variables/WARNINGS: Add tests for the .WARNINGS special variable.
* * README.W32: Add Windows 11Paul Smith2023-02-211-1/+1
| | | | * build_w32.bat: Ditto.
* Update the copyright year on all filesPaul Smith2023-01-011-1/+1
|
* Update URLs to use https rather than httpPaul Smith2022-10-181-1/+1
| | | | | * (all): Change http:// to https:// * README.W32: Remove invalid link to mingw.org.
* Add preprocessor macros for different platformsPaul Smith2022-10-181-3/+3
| | | | | | | | | | | | | * configure.ac: MK_CONFIGURE shows config.h was generated by configure. * src/config.ami: Define MK_AMIGAOS. * src/config.h-vms: Define MK_VMS. * src/configh.dos: Define MK_DJGPP. * src/config.h.W32: Define MK_W32 and WINDOWS32. * src/build_w32.bat: Let WINDOWS32 be defined by config.h. Remove unused setting of WIN32. * src/job.c: Clean up use of WIN32. * src/main.c: Ditto. * tests/scripts/features/default_names: Ditto.
* Sanitize tar file ownership, mode, and orderPaul Smith2022-09-081-0/+0
| | | | | | | | | | For reproducibility ensure all files in the dist tar file are owned by root, and sorted by name. Force the mode on all files to be writable by the owner and not writable by group or user, by default. Remove unnecessary execute permissions from build_w32.bat. Recommended by Tzvetelin Katchov <katchov@gnu.org>.
* Fix bootstrap.bat for bootstrapping on WindowsPaul Smith2022-08-221-18/+24
| | | | | | | | | | | | | | | | * README.git: Clarify that these methods are lightly tested. * build_w32.bat: Don't support any config step: fail if not completed. Move the config steps into bootstrap.bat. Don't print compile lines by default and add a --verbose option to show them. * bootstrap.bat: Ensure we have curl and sed before we do anything. Pull the latest necessary files from gnulib. Create a convert.sed script that can update the various template files, and update Basic.mk, config.h.W32, and gmk-default.h. * tests/run_make_tests.pl: Remove CRLF rather than using chop. If we run perl in Git for Bash it seems to handle newlines differently. * tests/scripts/features/temp_stdin: Remove the make copy and close STDIN so we can delete the temp file on Windows. * .gitignore: Ignore the convert.sed script.
* * build_w32.bat [WIN]: Use call for all invocationsPaul Smith2022-06-181-26/+28
|
* [SV 62100] Add '--shuffle' option supportSergei Trofimovich2022-06-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce non-deterministic ordering into goal and prerequisite traversal to help tease out inconsistent failures that may happen when running in parallel build mode. Introduce second order into each dependency chain: 1. Existing order is syntactic order reachable via 'dep->next' 2. New order is shuffled order stored as 'dep->shuf' in each 'dep' When updating goals and prerequisites and '--shuffle' is provided, use the shuffled order to walk the graph. When automatic variable are set always use the syntactic order of parameters. * Makefile.am: Add new src/shuffle.c and src/shuffle.h file. * build_w32.bat: Ditto. * builddos.bat: Ditto. * makefile.com: Ditto. * po/POTFILES.in: Ditto. * doc/make.texi: Add documentation for --shuffle. * doc/make.1: Ditto. * src/dep.h (DEP): Add the shuf pointer. * src/filedef.h (struct file): Add was_shuffled flag. * src/main.c: (shuffle_mode): Global flag for the shuffle mode. (usage): Add the --shuffle option. (switches): Ditto. (main): Set shuffle_mode based on the command line parameter. Reshuffle prerequisites if requested. * src/remake.c (update_goal_chain): Walk the shuffled list if enabled. (update_file_1): Ditto. * src/shuffle.h: Provide an interface for shuffling prerequisites. * src/shuffle.c: Implement option parsing and prerequisite shuffling. * tests/scripts/options/shuffle: Test shuffle option and modes.
* * <all>: Update copyright notices.Paul Smith2022-02-101-1/+1
|
* Clean up a few Windows build warnings (not all!)Paul Smith2021-09-051-3/+3
| | | | | | | * build_w32.bat: Quote uses of %VSWHERE% so it can contain spaces * src/hash.c (hash_init): Avoid use of an undefined struct. (hash_rehash): Ditto. * src/vpath.c (construct_vpath_list): Cast explicitly to void*.
* Add support for building with Tiny C for MS-WindowsChristian Jullien2020-02-291-2/+49
| | | | | | | | * src/config.h.W32.template (HAVE_DIRECT_H, HAVE_STRCASECMP) (HAVE_STRNCASECMP, HAVE_UMASK): Add __TINYC__ to MinGW condition. (BATCH_MODE_ONLY_SHELL): Make this the default for Tiny C. * build_w32.bat: Support building with Tiny C's tcc compiler.
* Update copyright statements for 2020Paul Smith2020-01-031-1/+1
|
* tests: Convert %CONFIG_FLAGS to get_config()Paul Smith2019-10-051-0/+1
| | | | | | | | | | | | * tests/config-flags.pm.W32: Create a predefined Windows file. * Makefile.am (test_FILES): Add it to the distribution. * build_w32.bat: Install tests/config-flags.pm if not existing. * tests/run_make_tests.pl (get_config): Create new function. * tests/scripts/features/archives: Call get_config() rather than using %CONFIG_FLAGS directly. * tests/scripts/features/load: Ditto. * tests/scripts/features/loadapi: Ditto. * tests/scripts/functions/wildcard: Ditto.
* Fix MS-Windows MinGW buildEli Zaretskii2019-08-281-42/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32/subproc/sub_proc.c (process_wait_for_multiple_objects): Fix format specifier for GetLastError's value. * src/job.c (reap_children): Define the 'remote_status_lose' label only for Posix platforms, to avoid compiler warning. * build_w32.bat (LNKOUT): New variable, using forward slashes. Use forward slashes in calls to :Compile, so that linking with GNU ld works. * src/makeint.h [!HAVE_UMASK]: Prototype for 'umask'. (UMASK, MODE_T): Don't define. * src/misc.c (get_tmpfile): Don't call UMASK, call umask, to avoid compilation warning on !HAVE_UMASK platforms. * src/output.c (output_tmpfd): Likewise. * src/misc.c (umask) [!HAVE_UMASK]: New no-op function. * src/config.h.W32.template (__USE_MINGW_ANSI_STDIO) [__MINGW32__]: Define to 1, to force Make use ANSI-compatible stdio functions, which also support the non-standard 'Id' and 'Ix' specifiers. (HAVE_UMASK) [__MINGW32__]: Define to 1. * src/arscan.c (ar_member_touch): Type-cast argument of strlen to avoid compiler warnings.
* Update maintainer mode to support debug wait points.Paul Smith2019-08-261-0/+10
| | | | | | | | | | | | | | Make a spin() method available when compiled in maintainer mode. If a file exists in the working directory with a specific name, make will sleep until the file is deleted. Ensure that maintainer mode is enabled on Windows, using the same algorithm we use on POSIX / autoconf systems. * build_w32.bat: If maintMakefile exists, enable maintainer mode. * src/main.c (main): Replace Windows-only suspend flag with spin(). * src/makeint.h: A SPIN() macro calls spin() in maintainer mode. * src/misc.c (spin): If a spin file exists sleep until it's deleted.
* Update copyright statements for 2019Paul Smith2019-05-191-1/+1
|
* Convert GNU make to use the gnulib portability libraryPaul Smith2018-07-021-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move content from glob/* and config/* into standard GNU directory locations lib/* and m4/*. Install the gnulib bootstrap script and its configuration file, and create a bootstrap.bat file for Windows. Update the README.git file with new requirements and instructions for building from Git. At this point we only install the alloca, getloadavg, and FDL modules from gnulib. We keep our old glob/fnmatch implementation since the gnulib versions require significant amounts of infrastructure which doesn't exist on Windows yet. Further work is required here. Due to a problem with gnulib's version of getloadavg, we need to bump the minimum required version of automake to 1.16.1 unfortunately. * README.git: Update instructions * NEWS: Move developer news to a separate section * configure.ac: Update for use with gnulib modules * bootstrap: Bootstrap from Git workspace (import from gnulib) * bootstrap.conf: Bootstrap configuration for GNU make * bootstrap.bat: Bootstrap from Git workspace for Windows * gl/modules/make-glob: Support our local fnmatch/glob implementation * config/acinclude.m4: Move to m4/ * config/dospaths.m4: Move to m4/ * glob/fnmatch.c: Move to lib/ * glob/fnmatch.h.in: Move to lib/ * glob/glob.c: Move to lib/ * glob/glob.h.in: Move to lib/ * Makefile.am: Update for new directories * build.template: Update for new directories * build_w32.bat: Update for new directories * builddos.bat: Update for new directories * maintMakefile: Update for new directories * makefile.com: Update for new directories * mk/Amiga.mk: Update for new directories * mk/Posix.mk.in: Update for new directories * mk/VMS.mk: Update for new directories * mk/Windows32.mk: Update for new directories * mk/msdosdjgpp.mk: Update for new directories * po/LINGUAS: One language per line (needed by gnulib) * INSTALL: Remove (obtained from gnulib) * src/alloca.c: Remove (obtained from gnulib) * src/getloadavg.c: Remove (obtained from gnulib) * po/Makevars: Remove (created by bootstrap) * config/*: Remove leftover files * glob/*: Remove leftover files
* * all: Update Copyright statements for 2018Paul Smith2018-07-011-1/+1
|
* * build_w32.bat: Support Visual Studio 17.Paul Smith2018-02-101-44/+94
|
* Rework directory structure to use GNU-recommended "src" directory.Paul Smith2017-11-191-53/+60
| | | | | | | | | | | | | | | | | Move the source code (other than glob) into the "src" subdirectory. Update all scripting and recommendations to support this change. * *.c, *.h, w32/*: Move to src/ * configure.ac, Makefile.am, maintMakefile: Locate new source files. * Basic.mk.template, mk/*: Update for new source file locations. * NEWS, README.DOS.template: Update for new locations. * build.template, build_w32.bat, builddos.bat: Ditto. * po/POTFILES.in: Ditto * tests/run_make_tests.pl, tests/scripts/features/load*: Ditto. * make.1: Move to doc. * mk/VMS.mk: Add support for building on VMS (hopefully). * makefile.vms, prepare_w32.bat: Remove. * SCOPTIONS: Update to define HAVE_CONFIG_H
* Remove unsupported build facilities.Paul Smith2017-11-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over time the non-standard build and install systems (nmake files, smake files, Visual Studio project files, etc.) have atrophied and maintaining them is not worth the effort, for such a simple utility as make. Remove all the non-standard build tool support and unify OS-specific build rules under a basic set of (GNU make) makefiles. Preserve the existing bootstrapping scripts (for POSIX, Windows, and MS-DOS). Also the existing VMS build scripts are left unchanged: I don't have enough experience with VMS to venture into this area. Perhaps one of the VMS maintainers might like to determine whether conversion would be appropriate. Rather than create libraries for w32 and glob (non-POSIX), simply link the object files directly to remove the complexity. * NEWS: Update with user-facing notes. * Makefile.am: Clean up to use the latest automake best practices. Build Windows code directly from the root makefile to avoid recursion. * README.Amiga, README.DOS.template, README.W32.template: Updated. * INSTALL: Point readers at the README.git file. * maintMakefile: Remove obsolete files. Create Basic.mk file. * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. * build_w32.bat: Copy Basic.mk to Makefile * configure.ac: We no longer need AM_PROG_AR. * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. * Makefile.DOS.template: Remove. * NMakefile.template, w32/subproc/NMakefile: Remove. * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. * configure.bat, glob/configure.bat: Remove. * w32/Makefile.am: Remove. * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
* Update copyright statements for 2017.Paul Smith2017-07-091-1/+1
|
* * README.W32.template: Update the build documentation.Paul Smith2016-06-241-5/+79
| | | | | * build_w32.bat: Fix issues with Visual Studio builds. Fix an error that always created Debug builds. Support 32bit and 64bit builds.
* Fix compile issues with Windows and VMS.Paul Smith2016-05-211-1/+1
| | | | | | | | | | * main.c (initialize_stopchar_map): isblank() is not part of C89. Install bits for space and tab directly. * makeint.h: Don't define vfork; autoconf handles this for us. * vmsjobs.c: Rename NEXT_TOKEN to V_NEXT_TOKEN to avoid conflicts. * dir.c (print_dir_data_base): Visual Studio C doesn't have int64_t. * w32/subproc/sub_proc.c (process_begin): Missing arg to memset(). * build_w32.bat: Don't use obsolete Visual Studio flags.
* Fix the MS-Windows MinGW buildEli Zaretskii2016-04-241-1/+1
| | | | | | | | | | * build_w32.bat (GccCompile): Use -std=gnu99, as some code uses C99 features ('for' loop initial declarations). * dir.c (print_dir_data_base) [WINDOWS32]: Cast 'mtime' to 'int64_t', and use %I64d to print it, to avoid compile-time warning about printing a 'time_t' value, which could be either a 32-bit or a 64 bit integral type.
* Extract jobserver implementation into OS-specific files.Paul Smith2016-03-081-268/+208
| | | | | | | | | | | * os.h, posixos.c, w32/w32os.c: New files implementing jobserver. * job.c, job.h, main.c, makeint.h: Move content to new files. * w32/include/sub_proc.h, w32/subproc/sub_proc.c: Ditto. * Makefile.am: Build and package OS-specific files. * build_w32.bat, make_msvc_net2003.vcproj, README.W32.template: Update for new files, and clean up the build. * POTFILES.in, maintMakefile, NMakefile.template: Ditto. * w32/subproc/build.bat: Delete as unused.
* Update Copyright statements for the new year.Paul Smith2016-02-281-1/+1
|
* Update Copyright statements for 2014.Paul Smith2014-09-301-1/+1
|
* Fix the MS-Windows build: now guile.c must always be compiled in.Eli Zaretskii2013-10-231-14/+3
| | | | | | | | * build_w32.bat: Always compile guile.c and link against guile.o. Reported by Alexey Pavlov <alexpux@gmail.com>. * makeint.h (guile_gmake_setup): Define prototype unconditionally, to avoid compiler warnings.
* Enhance the output sync mode.Paul Smith2013-09-121-3/+8
| | | | | | | | | | | | | | | 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.
* Minor fix in build_w32.bat.Eli Zaretskii2013-06-221-0/+1
| | | | | build_w32.bat (LinkGCC): Prevent a comment from being displayed at build time.
* Fix a bug in build_w32.bat when building a released tarball.Eli Zaretskii2013-05-171-1/+1
| | | | | build_w32.bat: Copy config.h.W32 to config.h regardless of whether or not we are building from SCM.
* Fix interfacing with and remaking dynamic objects on MS-Windows.Eli Zaretskii2013-05-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | load.c (load_object, load_file): Accept an additional argument DLP and return in it a pointer that can be used to unload the dynamic object. read.c (eval): Call load_file with an additional argument, and record the pointer returned there in the 'struct file' object of dynamic objects in that object's 'struct file'. commands.c (execute_file_commands): Unload dynamic objects before remaking them, to avoid failure to remake if the OS doesn't allow overwriting objects that are in use. filedef.h (struct file): New member dlopen_ptr. gnumake.h (GMK_EXPORT): Define to dllexport/dllimport decorations for Windows and to nothing on other platforms. (gmk_eval, gmk_expand, gmk_add_function): Add GMK_EXPORT qualifier to prototypes. makeint.h (MAIN): Define before including gnumake.h, to give correct dllexport decorations to exported functions. (load_file): Adjust prototype. loadapi.c: Don't include gnumake.h, since makeint.h already includes it, and takes care of defining MAIN before doing so. build_w32.bat (LinkGCC): Produce an import library for functions exported by Make for loadable dynamic objects. w32/compat/posixfcn.c (dlclose): New function. w32/include/dlfcn.h (dlclose): Add prototype. scripts/features/load: Fix signatures of testload_gmk_setup and explicit_setup, to bring them in line with the documentation.
* Support --output-sync on MS-Windows.Eli Zaretskii2013-04-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | w32/compat/posixfcn.c: New file, with emulations of Posix functions and Posix functionality for MS-Windows. w32/subproc/sub_proc.c: Include io.h. (process_noinherit): New function, forces a file descriptor to not be inherited by child processes. (process_easy): Accept two additional arguments, and use them to set up the standard output and standard error handles of the child process. w32/include/sub_proc.h (process_easy): Adjust prototype. (process_noinherit): Add prototype. read.c [WINDOWS32]: Include windows.h and sub_proc.h. makeint.h (LOCALEDIR) [WINDOWS32}: Define to NULL if not defined. This is needed because the MS-Windows build doesn't have a canonical place for LOCALEDIR. (WIN32_LEAN_AND_MEAN) [WINDOWS32]: Define, to avoid getting from windows.h header too much stuff that could conflict with the code. main.c <sync_mutex>: New static variable. <switches>: Add support for "--sync-mutex" switch. (decode_output_sync_flags): Decode the --sync-mutex= switch. (prepare_mutex_handle_string) [WINDOWS32]: New function. (main): Add "output-sync" to .FEATURES. job.h (CLOSE_ON_EXEC) [WINDOWS32]: Define to call process_noinherit. (F_GETFD, F_SETLKW, F_WRLCK, F_UNLCK, struct flock) [WINDOWS32]: New macros. (RECORD_SYNC_MUTEX): New macro, a no-op for Posix platforms. (sync_handle_t): New typedef. job.c <sync_handle>: Change type to sync_handle_t. (FD_NOT_EMPTY): Seek to the file's end. Suggested by Frank Heckenbach <f.heckenbach@fh-soft.de>. (pump_from_tmp_fd) [WINDOWS32]: Switch to_fd to binary mode for the duration of this function, and then change back before returning. (start_job_command) [WINDOWS32]: Support output_sync mode on MS-Windows. Use a system-wide mutex instead of locking stdout/stderr. Call process_easy with two additional arguments: child->outfd and child->errfd. (exec_command) [WINDOWS32]: Pass two additional arguments, both -1, to process_easy, to adjust for the changed function signature. function.c (windows32_openpipe) [WINDOWS32]: This function now returns an int, which is -1 if it fails and zero otherwise. It also calls 'error' instead of 'fatal', to avoid exiting prematurely. (func_shell_base) [WINDOWS32]: Call perror_with_name if windows32_openpipe fails, now that it always returns. This avoids a compiler warning that error_prefix is not used in the MS-Windows build. config.h.W32.template (OUTPUT_SYNC): Define. build_w32.bat: Add w32/compat/posixfcn.c to compilation and linking commands. From Frank Heckenbach <f.heckenbach@fh-soft.de>: job.c (sync_output): Don't discard the output if acquire_semaphore fails; instead, dump the output unsynchronized.
* Improve MS-Windows build scripts.Eli Zaretskii2013-04-251-53/+93
| | | | | | | | | | build_w32.bat: Improve. Remove 'setlocal', as it isn't supported on Windows 9X. Add --help and usage instructions. Support both debug and optimized builds with GCC under --debug. If building out of Git repo, always produce config.h, and edit gmk-default.scm into gmk-default.h. w32/subproc/build.bat: Support debug and optimized builds with GCC.
* Some cleanups for Windows builds after the output-sync option.Paul Smith2013-04-161-3/+12
| | | | Note currently output-sync is not supported on Windows.
* Modify instructions, etc. for Git support.Paul Smith2013-01-121-2/+2
|
* Simplify copyrights using ranges of years.Paul Smith2012-03-051-2/+1
| | | | | The new GNU Maintainer's Manual allows the use of year ranges in certain situations; take advantage of this simplification.
* Create a new function $(file ...)Paul Smith2012-01-291-6/+0
|
* Support a Windows build with Guile.Eli Zaretskii2012-01-281-15/+71
| | | | | | README.W32.template: Update with instructions for building with Guile. build_w32.bat: Support building with Guile. make.h [HAVE_STDINT_H]: Include stdint.h.
* Update copyright notices.Paul Smith2012-01-161-1/+1
|
* Add GNU Guile as an optional embedded scripting language for make.Paul Smith2012-01-151-1/+8
| | | | | | | | | 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.
* Update copyrights for 2010.Paul Smith2010-07-131-1/+1
|
* Fixes to build_w32.bat for building with MSVC 64bit.Paul Smith2010-07-121-4/+4
|
* Update copyright years.Paul Smith2009-10-251-1/+1
|
* * build_w32.bat (GCCBuild): Use "-gdwarf-2 -g3" instead ofEli Zaretskii2008-09-301-29/+29
| | | | | | "-gstabs+ -ggdb3". * w32/subproc/build.bat (GCCBuild): Likewise.
* Some Windows fixes to allow builds to succeed.Paul Smith2007-10-101-0/+5
|
* * Update to GPLv3Paul Smith2007-07-041-13/+14
| | | | | * Update copyright to 2007 * Fix download URL for translation files (thanks to Thiemo Seufer)
* Last of the copyright updates.Paul Smith2006-02-111-18/+18
|