mirror of
https://github.com/mirror/make.git
synced 2026-08-20 00:43:29 +08:00
Compare commits
387 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdfe0446b6 | ||
|
|
12b14f0484 | ||
|
|
4e12a5fa45 | ||
|
|
e56243fe57 | ||
|
|
7449abfe1b | ||
|
|
53b9770b40 | ||
|
|
766baeef0a | ||
|
|
ee204c78f2 | ||
|
|
e64674b718 | ||
|
|
564fb212a7 | ||
|
|
30cc10093b | ||
|
|
69c5a2128b | ||
|
|
577dd1ff6d | ||
|
|
86f2f8bcb5 | ||
|
|
c72205b28b | ||
|
|
057e33d6b5 | ||
|
|
e4499a1fb5 | ||
|
|
57b043c7fb | ||
|
|
f389aabde6 | ||
|
|
acbef3f612 | ||
|
|
3822f77c1d | ||
|
|
1cf3932a39 | ||
|
|
33bda40086 | ||
|
|
e666a6a021 | ||
|
|
5920d6d2b3 | ||
|
|
2e6468c811 | ||
|
|
393d2a2d4a | ||
|
|
bd7d03f8cd | ||
|
|
a4a173928f | ||
|
|
0e113897f7 | ||
|
|
b0eab8ecb9 | ||
|
|
f84821b249 | ||
|
|
99d1423059 | ||
|
|
7fbd58cd6b | ||
|
|
3ede0b96ac | ||
|
|
1d289b424a | ||
|
|
96285f875b | ||
|
|
bd4ce86785 | ||
|
|
e1c072aa7e | ||
|
|
af0074547d | ||
|
|
4a7a8278e8 | ||
|
|
00fa3ca3a5 | ||
|
|
00e590fdef | ||
|
|
4c64a5f986 | ||
|
|
414af96a50 | ||
|
|
1b976397e5 | ||
|
|
9bc5491712 | ||
|
|
57b13c8020 | ||
|
|
02a4c2913a | ||
|
|
8acb89c8c4 | ||
|
|
271e572ba2 | ||
|
|
bde990bfea | ||
|
|
60e54608bd | ||
|
|
60905a8afb | ||
|
|
ebe1d37104 | ||
|
|
c0cb9c8b3d | ||
|
|
34ee9adaed | ||
|
|
64f5375fe0 | ||
|
|
da81e0815f | ||
|
|
9be3c0e2b2 | ||
|
|
9da708772c | ||
|
|
0967624050 | ||
|
|
ba950a796a | ||
|
|
005a251689 | ||
|
|
76b6e668a6 | ||
|
|
5ff6ae6177 | ||
|
|
7c202b50fa | ||
|
|
f0182df865 | ||
|
|
0a6c38eff8 | ||
|
|
4b45e2828d | ||
|
|
4f3a41c60a | ||
|
|
757a9d06e3 | ||
|
|
31394f7f53 | ||
|
|
b6884c73b7 | ||
|
|
8bffc8d53c | ||
|
|
a9609084f4 | ||
|
|
8d820d57f6 | ||
|
|
73e11a5024 | ||
|
|
85cdc9e9ae | ||
|
|
7e60ffe83e | ||
|
|
715c787dc6 | ||
|
|
e304a03b6d | ||
|
|
2273ab7069 | ||
|
|
2e388a18a1 | ||
|
|
39bf50b2da | ||
|
|
a0c17b5af1 | ||
|
|
a483334f97 | ||
|
|
069f2bca99 | ||
|
|
40847ce9b8 | ||
|
|
a01c5bee02 | ||
|
|
38e96eadea | ||
|
|
d7cfbf1961 | ||
|
|
ee167c650e | ||
|
|
4d00ceba26 | ||
|
|
1c045bca52 | ||
|
|
4ed31830cb | ||
|
|
d7ff21ecd7 | ||
|
|
da2b275658 | ||
|
|
f32ca1666f | ||
|
|
9ce370249b | ||
|
|
b5de783f77 | ||
|
|
389dcb608f | ||
|
|
8c888d95f6 | ||
|
|
1710573272 | ||
|
|
80ca781adf | ||
|
|
4a31ca461f | ||
|
|
214865ed5c | ||
|
|
5d6508a475 | ||
|
|
ac11ec5497 | ||
|
|
d603b2e6ac | ||
|
|
8fd614e238 | ||
|
|
92032bc16a | ||
|
|
67e6d81256 | ||
|
|
a1bb739165 | ||
|
|
05769ca009 | ||
|
|
e2234bc1ab | ||
|
|
f9ba22e029 | ||
|
|
eedea52afb | ||
|
|
a9975756d0 | ||
|
|
a37fa47e32 | ||
|
|
9ff4d6af92 | ||
|
|
a370268739 | ||
|
|
1129df27b8 | ||
|
|
749a54d7a4 | ||
|
|
fa937343f5 | ||
|
|
3112c87993 | ||
|
|
8bde7db16f | ||
|
|
5d985c2851 | ||
|
|
3f194b69e3 | ||
|
|
b7acb10e86 | ||
|
|
b36a8ec92a | ||
|
|
23554ee658 | ||
|
|
0ce880e5ee | ||
|
|
c808f10d08 | ||
|
|
1dfd55ca36 | ||
|
|
0bc699a761 | ||
|
|
63b42fa235 | ||
|
|
a7b0dfddac | ||
|
|
73ac4526b9 | ||
|
|
afbecbd9dc | ||
|
|
192469952f | ||
|
|
8a731d1b2c | ||
|
|
48c8a116a9 | ||
|
|
fb779d2f1e | ||
|
|
1af314465e | ||
|
|
b80837c553 | ||
|
|
aa44e66c8f | ||
|
|
a7e0dd98e4 | ||
|
|
0c44ca2683 | ||
|
|
b280989ab7 | ||
|
|
9860296198 | ||
|
|
4fd56724ad | ||
|
|
0ca31088dc | ||
|
|
ef7a1b7d6e | ||
|
|
0c5a9f9b92 | ||
|
|
6264deece3 | ||
|
|
b9c25de370 | ||
|
|
193f1e81ed | ||
|
|
d8728efc80 | ||
|
|
baa57d2cf9 | ||
|
|
7ef56bc8dc | ||
|
|
ac97214635 | ||
|
|
22fd578693 | ||
|
|
78b5fec689 | ||
|
|
75b5268faf | ||
|
|
66a9b5c3ba | ||
|
|
b552b05251 | ||
|
|
5345adf82f | ||
|
|
248f70510e | ||
|
|
b90fabc8d6 | ||
|
|
816a867ff5 | ||
|
|
8ff529b1cb | ||
|
|
5acc59c704 | ||
|
|
68be4f74fc | ||
|
|
2b8e3bb23f | ||
|
|
c4f30e6012 | ||
|
|
fbf71ec25a | ||
|
|
e20c48e385 | ||
|
|
fda00f88d3 | ||
|
|
d9d4e06084 | ||
|
|
a95cb30ab5 | ||
|
|
d351c1fef2 | ||
|
|
3daaa4dd3e | ||
|
|
a359e32eb5 | ||
|
|
bee153c762 | ||
|
|
c5ccc4930c | ||
|
|
45bf0e3a67 | ||
|
|
c6966b3238 | ||
|
|
0029ea8941 | ||
|
|
053d49367c | ||
|
|
80861cce43 | ||
|
|
72af7ce8af | ||
|
|
e4a9c9b825 | ||
|
|
3d7c17c5a9 | ||
|
|
9c487cc537 | ||
|
|
1c9790e6f5 | ||
|
|
b13dcfe501 | ||
|
|
212cb00923 | ||
|
|
ac90d80b2a | ||
|
|
a3f6e49705 | ||
|
|
db72ca1b7d | ||
|
|
8d0aff7e81 | ||
|
|
bc9d72beb0 | ||
|
|
d3bba301ce | ||
|
|
15066b73f4 | ||
|
|
7ed37f0166 | ||
|
|
912a0df127 | ||
|
|
0b41373312 | ||
|
|
6f339b22eb | ||
|
|
e26560508c | ||
|
|
9ab8af7cd8 | ||
|
|
f522852f07 | ||
|
|
a3d8c086d5 | ||
|
|
4762480ae9 | ||
|
|
ef6c059e1e | ||
|
|
cf4ed2ebe8 | ||
|
|
5a4f9a67a3 | ||
|
|
2987163ac4 | ||
|
|
ec61980122 | ||
|
|
9bb994e831 | ||
|
|
e2ebea35f1 | ||
|
|
c73ed7dd1c | ||
|
|
ba8383efd8 | ||
|
|
6f7fb050b4 | ||
|
|
45200a42d3 | ||
|
|
4c9e10fd94 | ||
|
|
6e640321fd | ||
|
|
7241d136f4 | ||
|
|
c2be1df880 | ||
|
|
f1a9625001 | ||
|
|
047bd5a16f | ||
|
|
3fc99a48e1 | ||
|
|
87a5f98d24 | ||
|
|
53554e41e8 | ||
|
|
5bd7ad2b22 | ||
|
|
65115e7095 | ||
|
|
75dd0bd8bc | ||
|
|
8b54c5cff9 | ||
|
|
65c447289e | ||
|
|
86b20728fe | ||
|
|
b8a8af6550 | ||
|
|
360b76af84 | ||
|
|
c9e6ab9ac7 | ||
|
|
40277b8850 | ||
|
|
35047f824a | ||
|
|
e97159745d | ||
|
|
2b9dd215d5 | ||
|
|
fc2ddebdae | ||
|
|
b4682cb479 | ||
|
|
09202bc880 | ||
|
|
9ae02b7916 | ||
|
|
247b71e690 | ||
|
|
e33f3d72bf | ||
|
|
fd1dd7c398 | ||
|
|
14b2d7effb | ||
|
|
85c788572d | ||
|
|
8164c8ab3d | ||
|
|
fb7a7adc8a | ||
|
|
4f8be4bb28 | ||
|
|
e2b39edc22 | ||
|
|
8530d77c68 | ||
|
|
89e18c12eb | ||
|
|
bccd01354b | ||
|
|
5f9d341160 | ||
|
|
798ebd241b | ||
|
|
4db6d0c694 | ||
|
|
b754a35df7 | ||
|
|
168f12375d | ||
|
|
83443c706a | ||
|
|
4a5377aef7 | ||
|
|
48391c2817 | ||
|
|
42745a900f | ||
|
|
43181f1f82 | ||
|
|
c18b23f7b2 | ||
|
|
fe5585528f | ||
|
|
0205d3d08c | ||
|
|
9ef06be018 | ||
|
|
ac9a39dad7 | ||
|
|
c6ac580785 | ||
|
|
9efd477e98 | ||
|
|
5036dd120a | ||
|
|
7e849f3b81 | ||
|
|
a80a8b8a10 | ||
|
|
e4ac28e830 | ||
|
|
1fae20a2b7 | ||
|
|
292da6f686 | ||
|
|
3c487e7ed5 | ||
|
|
c0380823a2 | ||
|
|
1faae1d4ed | ||
|
|
18eb093f56 | ||
|
|
894ee7f6c8 | ||
|
|
e75662bc6a | ||
|
|
d1df4b21f3 | ||
|
|
a66bf2d736 | ||
|
|
31c2024b2e | ||
|
|
7df0fe77d8 | ||
|
|
9fc787c658 | ||
|
|
1afb0ad372 | ||
|
|
86a058029b | ||
|
|
0a3a0756b9 | ||
|
|
3712e8a819 | ||
|
|
9ed452b041 | ||
|
|
b11bef0bea | ||
|
|
bd716a1ec1 | ||
|
|
b484efca56 | ||
|
|
562344122f | ||
|
|
9a2451af0b | ||
|
|
7f9ce6e97b | ||
|
|
621e9edfe9 | ||
|
|
986632ec23 | ||
|
|
95ffcda425 | ||
|
|
dcca1b5b0e | ||
|
|
9cad73ad82 | ||
|
|
8e7a28a6a4 | ||
|
|
98de32a681 | ||
|
|
5369be5079 | ||
|
|
8de07f3e4a | ||
|
|
f970315766 | ||
|
|
579ee85941 | ||
|
|
7e51810bb5 | ||
|
|
bd30df4478 | ||
|
|
1f2fd22fec | ||
|
|
ab1210b1fe | ||
|
|
241787d8e4 | ||
|
|
faeeb27166 | ||
|
|
cab353d1dd | ||
|
|
8b01e6bebf | ||
|
|
55c00544cc | ||
|
|
8d577c2ff4 | ||
|
|
e44d6a12bb | ||
|
|
423c3955d9 | ||
|
|
ac67346d0f | ||
|
|
e364498113 | ||
|
|
85047eb904 | ||
|
|
0faa98a0bb | ||
|
|
8411528fdd | ||
|
|
d2a3e9ca9c | ||
|
|
e1863c05d8 | ||
|
|
b981bfd197 | ||
|
|
88713683fe | ||
|
|
a7cac0f0e3 | ||
|
|
165ccf3137 | ||
|
|
24620378ba | ||
|
|
9c8b68a905 | ||
|
|
432cb6575d | ||
|
|
a4937bc897 | ||
|
|
889303cdfe | ||
|
|
99385ee6f7 | ||
|
|
f5f5adb62c | ||
|
|
865d90bb1e | ||
|
|
30b25acc4e | ||
|
|
f8905059c3 | ||
|
|
12a3104c3d | ||
|
|
7b485daffb | ||
|
|
757849cd93 | ||
|
|
9d58570c77 | ||
|
|
d49ab08ae0 | ||
|
|
10a4b120bd | ||
|
|
309768aff1 | ||
|
|
9c28d5125d | ||
|
|
a7794f483b | ||
|
|
5d653b535a | ||
|
|
53b4a9e668 | ||
|
|
d4723d643d | ||
|
|
107ab16bf6 | ||
|
|
07f2666b91 | ||
|
|
f4b746b8c2 | ||
|
|
d7f25cfda5 | ||
|
|
b9a01a8b3b | ||
|
|
d654bff457 | ||
|
|
74ed682c54 | ||
|
|
e498e464dc | ||
|
|
d1d737d0fa | ||
|
|
87e5b64f41 | ||
|
|
70df3c35bf | ||
|
|
01a745025d | ||
|
|
4792e154b6 | ||
|
|
188b2a0f23 | ||
|
|
52191d9d61 | ||
|
|
dc9ae5e017 | ||
|
|
723e047428 | ||
|
|
b69b04dc8c | ||
|
|
b539908f73 | ||
|
|
2fb91e19a0 | ||
|
|
f96c114e22 | ||
|
|
98197303b1 | ||
|
|
f8786092ad |
27
.ccls
Normal file
27
.ccls
Normal file
@@ -0,0 +1,27 @@
|
||||
clang
|
||||
%h --include=makeint.h
|
||||
-DHAVE_CONFIG_H
|
||||
-Isrc
|
||||
-Ilib
|
||||
-DLIBDIR="/usr/local/lib"
|
||||
-DINCLUDEDIR="/usr/local/include"
|
||||
-DLOCALEDIR="/usr/local/share/locale"
|
||||
-DMAKE_MAINTAINER_MODE
|
||||
-pthread
|
||||
-isystem
|
||||
/usr/include/guile/2.0
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Wwrite-strings
|
||||
-Wshadow
|
||||
-Wdeclaration-after-statement
|
||||
-Wbad-function-cast
|
||||
-Wformat-security
|
||||
-Wtype-limits
|
||||
-Wunused-but-set-parameter
|
||||
-Wlogical-op
|
||||
-Wpointer-arith
|
||||
-Wignored-qualifiers
|
||||
-Wformat-signedness
|
||||
-Wduplicated-cond
|
||||
18
.dir-locals.el
Normal file
18
.dir-locals.el
Normal file
@@ -0,0 +1,18 @@
|
||||
(
|
||||
(nil . ((bug-reference-bug-regexp . "\\(\\)\\bSV[- ]\\([0-9]+\\)")
|
||||
(bug-reference-url-format . "https://savannah.gnu.org/bugs/?%s")
|
||||
(ccls-initialization-options . (:index (:threads 6
|
||||
:initialBlacklist ("/make-[0-9]" "tests/work/" "/\\.deps" "/\\..*cache" "/\\.git"))))
|
||||
(lsp-file-watch-ignored . ("/\\.git$"
|
||||
"/\\..*cache$"
|
||||
;; autotools content
|
||||
"/\\.deps$"
|
||||
"/autom4te\\.cache$"
|
||||
"/build-aux$"
|
||||
;; make-specific content
|
||||
"/doc/manual$"
|
||||
"/tests/work$"
|
||||
"/make-[0-9]"))
|
||||
))
|
||||
(c-mode . ((c-file-style . "gnu")))
|
||||
)
|
||||
38
.gitignore
vendored
38
.gitignore
vendored
@@ -1,46 +1,70 @@
|
||||
# Development artifacts
|
||||
ID
|
||||
TAGS
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
.*cache
|
||||
.*gdbinit
|
||||
.gdb_history
|
||||
.vscode
|
||||
*~
|
||||
#*
|
||||
.#*
|
||||
|
||||
# Configure artifacts
|
||||
ABOUT-NLS
|
||||
INSTALL
|
||||
Makefile
|
||||
Makefile.in
|
||||
Basic.mk
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
autom4te.cache/
|
||||
build-aux/
|
||||
config.cache
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
/mk/Posix.mk
|
||||
stamp-h1
|
||||
.dirstamp
|
||||
|
||||
# Build artifacts
|
||||
.deps
|
||||
.deps/
|
||||
gmk-default.h
|
||||
loadavg
|
||||
make
|
||||
*.i
|
||||
*.o
|
||||
*.a
|
||||
*.exe
|
||||
*.dll.a
|
||||
*.obj
|
||||
*.lib
|
||||
*.pdb
|
||||
*.sbr
|
||||
|
||||
# Windows build artifacts
|
||||
WinDebug/
|
||||
WinRel/
|
||||
GccDebug/
|
||||
GccRel/
|
||||
|
||||
# Distribution artifacts
|
||||
.dep_segment
|
||||
Makefile.DOS
|
||||
NMakefile
|
||||
.check-git-HEAD
|
||||
ChangeLog
|
||||
README
|
||||
README.DOS
|
||||
README.OS2
|
||||
README.W32
|
||||
SMakefile
|
||||
build.sh
|
||||
build.sh.in
|
||||
build.cfg
|
||||
config.ami
|
||||
config.h-vms
|
||||
config.h.W32
|
||||
configh.dos
|
||||
make-[0-9]*/
|
||||
make-[0-9]*.tar.*
|
||||
checkcfg.*.log
|
||||
|
||||
12
.purify
12
.purify
@@ -1,12 +0,0 @@
|
||||
# Solaris (2.5.1) has a couple if issues.
|
||||
#
|
||||
suppress plk malloc; setvbuf "libc*"; main "main.c"
|
||||
suppress umr kstat_read; kstat_chain_update; kstat_open; getloadavg
|
||||
suppress umr kstat_chain_update; kstat_open; getloadavg
|
||||
|
||||
# The command line options stuff leaks a little bit. No big deal.
|
||||
#
|
||||
suppress mlk malloc; xmalloc "misc.c"; decode_env_switches "main.c"
|
||||
suppress plk malloc; xmalloc "misc.c"; decode_env_switches "main.c"
|
||||
suppress mlk malloc; xmalloc "misc.c"; concat "misc.c"; decode_env_switches "main.c"
|
||||
suppress plk malloc; xmalloc "misc.c"; concat "misc.c"; decode_env_switches "main.c"
|
||||
4
AUTHORS
4
AUTHORS
@@ -67,12 +67,14 @@ Other contributors:
|
||||
David A. Wheeler <dwheeler@dwheeler.com>
|
||||
David Boyce <dsb@boyski.com>
|
||||
Frank Heckenbach <f.heckenbach@fh-soft.de>
|
||||
Kaz Kylheku <kaz@kylheku.com>
|
||||
Christof Warlich <cwarlich@gmx.de>
|
||||
|
||||
With suggestions/comments/bug reports from a cast of ... well ...
|
||||
hundreds, anyway :)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
135
Basic.mk.template
Normal file
135
Basic.mk.template
Normal file
@@ -0,0 +1,135 @@
|
||||
# Basic GNU -*-Makefile-*- to build GNU make
|
||||
#
|
||||
# NOTE:
|
||||
# If you have no 'make' program at all to process this makefile:
|
||||
# * On Windows, run ".\buildw32.bat" to bootstrap one.
|
||||
# * On MS-DOS, run ".\builddos.bat" to bootstrap one.
|
||||
#
|
||||
# Once you have a GNU make program created, you can use it with this makefile
|
||||
# to keep it up to date if you make changes, as:
|
||||
#
|
||||
# make.exe -f Basic.mk
|
||||
#
|
||||
# Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
all:
|
||||
|
||||
src = src/
|
||||
lib = lib/
|
||||
|
||||
make_SOURCES = %make_SOURCES%
|
||||
glob_SOURCES = %glob_SOURCES%
|
||||
loadavg_SOURCES = %loadavg_SOURCES%
|
||||
alloca_SOURCES = %alloca_SOURCES%
|
||||
w32_SOURCES = %w32_SOURCES%
|
||||
vms_SOURCES = %vms_SOURCES%
|
||||
amiga_SOURCES = %amiga_SOURCES%
|
||||
|
||||
posix_SOURCES = $(src)posixos.c
|
||||
remote_SOURCES = $(src)remote-stub.c
|
||||
|
||||
OUTDIR =
|
||||
SRCDIR = .
|
||||
|
||||
OBJEXT = o
|
||||
EXEEXT =
|
||||
|
||||
PREFIX = /usr/local
|
||||
INCLUDEDIR = $(PREFIX)/include
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
LOCALEDIR = $(PREFIX)/share
|
||||
|
||||
PROG = $(OUTDIR)make$(EXEEXT)
|
||||
|
||||
prog_SOURCES = $(make_SOURCES) $(remote_SOURCES)
|
||||
|
||||
BUILT_SOURCES =
|
||||
|
||||
OBJECTS = $(patsubst %.c,$(OUTDIR)%.$(OBJEXT),$(prog_SOURCES))
|
||||
|
||||
OBJDIRS = $(addsuffix .,$(sort $(dir $(OBJECTS))))
|
||||
|
||||
# Use the default value of CC
|
||||
LD = $(CC)
|
||||
|
||||
# Reserved for command-line override
|
||||
CPPFLAGS =
|
||||
CFLAGS = -g -O2
|
||||
LDFLAGS =
|
||||
|
||||
extra_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src -I$(OUTDIR)lib -I$(SRCDIR)/lib \
|
||||
-DLIBDIR=\"$(LIBDIR)\" -DINCLUDEDIR=\"$(INCLUDEDIR)\" -DLOCALEDIR=\"$(LOCALDIR)\"
|
||||
extra_CFLAGS =
|
||||
extra_LDFLAGS = $(extra_CFLAGS) $(CFLAGS)
|
||||
|
||||
C_SOURCE = -c
|
||||
OUTPUT_OPTION = -o $@
|
||||
LINK_OUTPUT = -o $@
|
||||
|
||||
# Command lines
|
||||
|
||||
# $(call COMPILE.cmd,<src>,<tgt>)
|
||||
COMPILE.cmd = $(CC) $(extra_CFLAGS) $(CFLAGS) $(extra_CPPFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OUTPUT_OPTION) $(C_SOURCE) $1
|
||||
|
||||
# $(call LINK.cmd,<objectlist>)
|
||||
LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $1 $(LDLIBS) $(LINK_OUTPUT)
|
||||
|
||||
# $(CHECK.cmd)
|
||||
CHECK.cmd = cd $(SRCDIR)/tests && ./run_make_tests -make $(shell cd $(<D) && pwd)/$(<F)
|
||||
|
||||
# $(call MKDIR.cmd,<dirlist>)
|
||||
MKDIR.cmd = mkdir -p $1
|
||||
|
||||
# $(call RM.cmd,<filelist>)
|
||||
RM.cmd = rm -f $1
|
||||
|
||||
# $(call CP.cmd,<from>,<to>)
|
||||
CP.cmd = cp $1 $2
|
||||
|
||||
CLEANSPACE = $(call RM.cmd,$(OBJECTS) $(PROG) $(BUILT_SOURCES))
|
||||
|
||||
# Load overrides for the above variables.
|
||||
include $(firstword $(wildcard $(SRCDIR)/mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk) $(OUTDIR)mk/Posix.mk $(SRCDIR)/mk/Posix.mk))
|
||||
|
||||
VERSION = %VERSION%
|
||||
|
||||
VPATH = $(SRCDIR)
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
$(PROG): $(OBJECTS)
|
||||
$(call LINK.cmd,$^)
|
||||
|
||||
$(OBJECTS): $(OUTDIR)%.$(OBJEXT): %.c
|
||||
$(call COMPILE.cmd,$<)
|
||||
|
||||
$(OBJECTS): | $(OBJDIRS) $(BUILT_SOURCES)
|
||||
|
||||
$(OBJDIRS):
|
||||
$(call MKDIR.cmd,$@)
|
||||
|
||||
check:
|
||||
$(CHECK.cmd)
|
||||
|
||||
clean:
|
||||
$(CLEANSPACE)
|
||||
|
||||
$(filter %.h,$(BUILT_SOURCES)): %.h : %.in.h
|
||||
$(call RM.cmd,$@)
|
||||
$(call CP.cmd,$<,$@)
|
||||
|
||||
.PHONY: all check clean
|
||||
@@ -1703,7 +1703,7 @@ Thu Sep 14 18:29:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
||||
existing variable's origin, is `o_env', make it `o_env_override'.
|
||||
|
||||
* load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
|
||||
* compatMakefile: Changed the comment for `LOAD_AVG' accordinly.
|
||||
* compatMakefile: Changed the comment for `LOAD_AVG' accordingly.
|
||||
|
||||
Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
||||
|
||||
@@ -3218,7 +3218,7 @@ Sun Feb 5 19:52:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
||||
* variable.c (expand_function: `shell'): Use
|
||||
`shell_function_completed'. Block children before forking and
|
||||
unblock after `shell_function_pid' is set properly and
|
||||
`shell_functon_completed' is reset to 0.
|
||||
`shell_function_completed' is reset to 0.
|
||||
|
||||
* commands.c (child_handler): When the child of the `shell' function
|
||||
completes, set `shell_function_completed' to 1 if it actually ran,
|
||||
@@ -4465,7 +4465,7 @@ Fri Sep 16 13:59:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
`maxsuffix', and must be called before count_implicit_rule_limits.
|
||||
|
||||
* rule.c (pattern_search): If an existent (non-intermediate)
|
||||
dependendency was found via a terminal rule, set its
|
||||
dependency was found via a terminal rule, set its
|
||||
`tried_implicit' flag, so it will never have implicit rule search done.
|
||||
|
||||
* glob.c: Bug fix to avoid alloca(0).
|
||||
@@ -4826,7 +4826,7 @@ Sat Jul 30 15:47:23 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
new entry as the old entry's prev pointer.
|
||||
|
||||
* dir.c: Re-indented the `struct dir' definition to be right.
|
||||
(dir_load): Cleaned up slighty.
|
||||
(dir_load): Cleaned up slightly.
|
||||
(file_exists_p): Removed comment saying we could use `access', since
|
||||
that is a bad idea (except for setuid programs). Cleaned up slightly.
|
||||
|
||||
|
||||
@@ -1,3 +1,61 @@
|
||||
2013-10-09 Paul Smith <psmith@gnu.org>
|
||||
|
||||
Version 4.0 released.
|
||||
|
||||
* configure.ac: Updated for the release.
|
||||
* NEWS: Updated for the release.
|
||||
|
||||
* maintMakefile (tag-release): New target to add a Git tag.
|
||||
* read.c (eval): Typo fix.
|
||||
* ChangeLog.1: Typo fixes.
|
||||
* w32/subproc/sub_proc.c (process_cleanup): Typo fix.
|
||||
|
||||
2013-10-07 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* w32/compat/posixfcn.c (tmpfile): Move declaration of h before
|
||||
the first executable statement. Reported by Gisle Vanem
|
||||
<gvanem@yahoo.no>.
|
||||
|
||||
2013-10-05 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* makeint.h (MAP_USERFUNC): A new map type for function names.
|
||||
* main.c (initialize_stopchar_map): Set up the function name map.
|
||||
|
||||
* gnumake.h (gmk_func_ptr): Define a type for function pointers.
|
||||
(gmk_add_function): Convert the last argument to FLAGS.
|
||||
(GMK_FUNC_*): Define flags for the function. Change the default
|
||||
behavior to "expand" since that's the most common one.
|
||||
|
||||
* function.c (function_table_entry): Use new function pointer type.
|
||||
(lookup_function): Accept any valid function name character based
|
||||
on the MAP_USERFUNC values.
|
||||
(define_new_function): Use the new calling signature. Verify that
|
||||
registered functions have valid names.
|
||||
|
||||
* guile.c (guile_gmake_setup): Use new calling signatures.
|
||||
* loadapi.c (gmk_add_function): Ditto.
|
||||
* variable.h (define_new_function): Ditto.
|
||||
|
||||
* doc/make.texi (Loaded Object API): Make the registered function
|
||||
API documentation more clear.
|
||||
|
||||
2013-10-03 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* function.c (abspath): Reset root_len to one for Cygwin only when
|
||||
HAVE_DOS_PATHS is defined. Suggested by Christopher Faylor.
|
||||
|
||||
2013-10-02 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* w32/compat/posixfcn.c (tmpfile): New function, a replacement for
|
||||
the Windows libc version.
|
||||
|
||||
Fix $abspath on Cygwin when HAVE_DOS_PATHS is in effect.
|
||||
* function.c (IS_ABSOLUTE) [__CYGWIN__]: Special definition for
|
||||
Cygwin.
|
||||
(abspath) [__CYGWIN__]: Reset root_len to 1 if the absolute file
|
||||
name has the Posix /foo/bar form.
|
||||
[HAVE_DOS_PATHS]: Use root_len instead of hard-coded 2.
|
||||
|
||||
2013-10-01 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* configure.ac: Update version to 3.99.93.
|
||||
231
INSTALL
231
INSTALL
@@ -1,231 +0,0 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PREFIX', the package will
|
||||
use PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
@@ -1,587 +0,0 @@
|
||||
# -*-Makefile-*- template for DJGPP
|
||||
# Makefile.in generated automatically by automake 1.2 from Makefile.am
|
||||
#
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = .
|
||||
VPATH = $(srcdir)
|
||||
# $DJDIR is defined automatically by DJGPP to point
|
||||
# to the root of the DJGPP installation tree.
|
||||
prefix = /dev/env/DJDIR
|
||||
exec_prefix = ${prefix}
|
||||
|
||||
bindir = /bin
|
||||
datadir = /share
|
||||
libdir = /lib
|
||||
infodir = /info
|
||||
mandir = /man
|
||||
includedir = /include
|
||||
oldincludedir = c:/djgpp/include
|
||||
|
||||
DESTDIR = /dev/env/DJDIR
|
||||
|
||||
pkgdatadir = $(datadir)/make
|
||||
pkglibdir = $(libdir)/make
|
||||
pkgincludedir = $(includedir)/make
|
||||
localedir = $(datadir)/locale
|
||||
|
||||
INSTALL = ${exec_prefix}/bin/ginstall -c
|
||||
INSTALL_PROGRAM = ${exec_prefix}/bin/ginstall -c
|
||||
INSTALL_DATA = ${exec_prefix}/bin/ginstall -c -m 644
|
||||
INSTALL_SCRIPT = ${exec_prefix}/bin/ginstall -c
|
||||
transform = s,x,x,
|
||||
|
||||
# This will fail even if they don't have a Unix-like shell (stock DOS
|
||||
# shell doesn't know about `false'). The only difference is that they
|
||||
# get "Error -1" instead of "Error 1".
|
||||
EXIT_FAIL = false
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
EXEEXT = .exe
|
||||
OBJEXT = o
|
||||
|
||||
AR = ar
|
||||
AWK = gawk
|
||||
CC = gcc
|
||||
CPP = gcc -E
|
||||
LIBOBJS =
|
||||
MAKEINFO = ${exec_prefix}/bin/makeinfo
|
||||
PACKAGE = make
|
||||
PERL = perl
|
||||
RANLIB = ranlib
|
||||
REMOTE = stub
|
||||
VERSION = %VERSION%
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.2
|
||||
|
||||
bin_PROGRAMS = %PROGRAMS%$(EXEEXT)
|
||||
|
||||
make_SOURCES = %SOURCES%
|
||||
# This should include the glob/ prefix
|
||||
libglob_a_SOURCES = %GLOB_SOURCES%
|
||||
make_LDADD = glob/libglob.a
|
||||
|
||||
man_MANS = make.1
|
||||
|
||||
INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"$(prefix)$(libdir)\" -DINCLUDEDIR=\"$(prefix)$(includedir)\" -DLOCALEDIR=\"$(prefix)$(localedir)\"
|
||||
|
||||
BUILT_SOURCES = README build.sh-in
|
||||
|
||||
EXTRA_DIST = $(BUILT_SOURCES) $(man_MANS) README.customs remote-cstms.c make-stds.texi texinfo.tex SCOPTIONS SMakefile Makefile.ami README.Amiga config.ami amiga.c amiga.h NMakefile README.DOS configh.dos configure.bat makefile.com README.W32 build_w32.bat config.h-W32 subproc.bat make.lnk config.h-vms makefile.vms README.VMS vmsdir.h vmsfunctions.c vmsify.c gmk-default.scm gmk-default.h
|
||||
|
||||
SUBDIRS = glob doc
|
||||
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = build.sh
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
MAKE_HOST = i386-pc-msdosdjgpp
|
||||
|
||||
|
||||
DEFS = -I. -I$(srcdir) -I.
|
||||
CPPFLAGS = -DHAVE_CONFIG_H
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
make_OBJECTS = %OBJECTS%
|
||||
make_DEPENDENCIES = glob/libglob.a
|
||||
make_LDFLAGS =
|
||||
libglob_a_LIBADD =
|
||||
libglob_a_OBJECTS = %GLOB_OBJECTS%
|
||||
noinst_LIBRARIES = glob/libglob.a
|
||||
CFLAGS = -O2 -g
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXINFO_TEX = $(srcdir)/config/texinfo.tex
|
||||
INFO_DEPS = doc/make.info
|
||||
DVIS = doc/make.dvi
|
||||
TEXINFOS = doc/make.texi
|
||||
noinst_TEXINFOS = doc/fdl.texi doc/make-stds.texi
|
||||
man1dir = $(mandir)/man1
|
||||
MANS = $(man_MANS)
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh-in config.h-in configure configure.ac getloadavg.c
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP = --best
|
||||
SOURCES = $(make_SOURCES)
|
||||
OBJECTS = $(make_OBJECTS)
|
||||
HEADERS = $(wildcard $(srcdir)/*.h)
|
||||
|
||||
default: all
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .dvi .info .o .obj .ps .texi .tex .html
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
clean-hdr:
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
|
||||
maintainer-clean-hdr:
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do if test -f $$p; then echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`"; $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`; else :; fi; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`.exe; done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT) *$(EXEEXT) make.new core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c *_tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
make$(EXEEXT): $(make_OBJECTS) $(make_DEPENDENCIES)
|
||||
@command.com /c if exist make del make
|
||||
@command.com /c if exist make.exe del make.exe
|
||||
$(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS)
|
||||
|
||||
# Documentation
|
||||
|
||||
make.info: make.texi
|
||||
make.dvi: make.texi
|
||||
make.ps: make.dvi make.texi
|
||||
make.html: make.texi
|
||||
|
||||
|
||||
DVIPS = dvips
|
||||
|
||||
.texi.info:
|
||||
@command.com /c if exist make.info* del make.info*
|
||||
@command.com /c if exist make.i* del make.i*
|
||||
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||
|
||||
.texi:
|
||||
@command.com /c if exist make.info* del make.info*
|
||||
@command.com /c if exist make.i* del make.i*
|
||||
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
|
||||
# Other documentation formats
|
||||
|
||||
html: html-recursive
|
||||
|
||||
.texi.html:
|
||||
@command.com /c if exist make.html* del make.html*
|
||||
$(MAKEINFO) --html -I$(srcdir) --no-split $< -o ./$@
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
@for file in $(INFO_DEPS); do iifile=`echo $$file | sed "s|doc/||"`; d=$(srcdir); for ifile in `cd $$d && echo $$file`; do if test -f $$d/$$ifile; then echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$iifile"; $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$iifile; else : ; fi; done; done
|
||||
@$(POST_INSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then for file in $(INFO_DEPS); do iifile=`echo $$file | sed "s|doc/||"`; echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$iifile"; install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$iifile || :; done; else : ; fi
|
||||
|
||||
uninstall-info:
|
||||
$(PRE_UNINSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then ii=yes; else ii=; fi; for file in $(INFO_DEPS); do test -z $ii || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; done
|
||||
$(NORMAL_UNINSTALL)
|
||||
for file in $(INFO_DEPS); do (cd $(DESTDIR)$(infodir) && rm -f $$file); done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
for base in $(INFO_DEPS); do d=$(srcdir); for file in `cd $$d && eval echo $$base*`; do test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -f $(srcdir)/doc/make.aux $(srcdir)/doc/make.cp $(srcdir)/doc/make.cps $(srcdir)/doc/make.dvi \
|
||||
$(srcdir)/doc/make.fn $(srcdir)/doc/make.fns $(srcdir)/doc/make.ky $(srcdir)/doc/make.kys \
|
||||
$(srcdir)/doc/make.ps $(srcdir)/doc/make.log $(srcdir)/doc/make.pg $(srcdir)/doc/make.toc \
|
||||
$(srcdir)/doc/make.tp $(srcdir)/doc/make.tps $(srcdir)/doc/make.vr $(srcdir)/doc/make.vrs \
|
||||
$(srcdir)/doc/make.op $(srcdir)/doc/make.tr $(srcdir)/doc/make.cv $(srcdir)/doc/make.cn \
|
||||
$(srcdir)/doc/make.html
|
||||
|
||||
clean-aminfo:
|
||||
|
||||
distclean-aminfo:
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
for i in $(INFO_DEPS); do rm -f $$i*; done
|
||||
|
||||
install-man1:
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man1:
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) install-man1
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) uninstall-man1
|
||||
|
||||
# Assume that the only thing to do in glob is to build libglob.a,
|
||||
# but do a sanity check: if $SUBDIRS will ever have more than
|
||||
# a single directory, yell bloody murder.
|
||||
all-recursive:
|
||||
ifeq ($(findstring glob, $(SUBDIRS)), glob)
|
||||
@command.com /c if not exist glob\\nul md glob
|
||||
@echo Making all in glob
|
||||
$(MAKE) -C glob -f ../Makefile INCLUDES='-I$(srcdir) -I$(srcdir)/glob' DEFS='-I.. -I$(srcdir)' VPATH=$(srcdir)/glob libglob.a
|
||||
endif
|
||||
|
||||
$(SUBDIRS):
|
||||
command.com /c md $@
|
||||
|
||||
libglob.a: $(libglob_a_OBJECTS)
|
||||
command.com /c if exist libglob.a del libglob.a
|
||||
$(AR) cru libglob.a $(libglob_a_OBJECTS) $(libglob_a_LIBADD)
|
||||
$(RANLIB) libglob.a
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive check-recursive:
|
||||
ifeq ($(words $(SUBDIRS)), 2)
|
||||
@echo Making $(shell echo $@ | sed s/-recursive//) in glob
|
||||
$(MAKE) -C glob -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
|
||||
@echo Making $(shell echo $@ | sed s/-recursive//) in doc
|
||||
$(MAKE) -C doc -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
|
||||
else
|
||||
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
|
||||
@$(EXIT_FAIL)
|
||||
endif
|
||||
|
||||
tags-in-glob: $(libglob_a_SOURCES)
|
||||
etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS
|
||||
|
||||
tags-recursive:
|
||||
ifeq ($(words $(SUBDIRS)), 2)
|
||||
$(MAKE) tags-in-glob
|
||||
else
|
||||
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
|
||||
@$(EXIT_FAIL)
|
||||
endif
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES)
|
||||
mkid $(srcdir)/$(SOURCES) $(srcdir)/$(libglob_a_SOURCES) ./config.h $(HEADERS)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(srcdir)/$(SOURCES) config.h $(TAGS_DEPENDENCIES)
|
||||
etags -i ./glob/TAGS $(ETAGS_ARGS) $(srcdir)/$(SOURCES) ./config.h $(HEADERS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
rm -rf $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; cd $(distdir)/=build && ../configure --srcdir=.. --prefix=$$dc_install_base && $(MAKE) && $(MAKE) dvi && $(MAKE) check && $(MAKE) install && $(MAKE) installcheck && $(MAKE) dist
|
||||
rm -rf $(distdir)
|
||||
@echo "========================"; echo "$(distdir).tar.gz is ready for distribution"; echo "========================"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do d=$(srcdir); test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; for subdir in $(SUBDIRS); do test -d $(distdir)/$$subdir || mkdir $(distdir)/$$subdir || exit 1; chmod 777 $(distdir)/$$subdir; (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir)/$$subdir distdir=../$(distdir)/$$subdir distdir) || exit 1; done
|
||||
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
|
||||
|
||||
info: info-recursive
|
||||
info-recursive:
|
||||
ifeq ($(findstring doc, $(SUBDIRS)), doc)
|
||||
@command.com /c if not exist doc\\nul md doc
|
||||
@echo Making all in doc
|
||||
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.info
|
||||
endif
|
||||
|
||||
dvi: dvi-recursive
|
||||
dvi-recursive:
|
||||
ifeq ($(findstring doc, $(SUBDIRS)), doc)
|
||||
@command.com /c if not exist doc\\nul md doc
|
||||
@echo Making all in doc
|
||||
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.dvi
|
||||
endif
|
||||
|
||||
ps: ps-recursive
|
||||
ps-recursive:
|
||||
ifeq ($(findstring doc, $(SUBDIRS)), doc)
|
||||
@command.com /c if not exist doc\\nul md doc
|
||||
@echo Making all in doc
|
||||
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.ps
|
||||
endif
|
||||
|
||||
html-recursive:
|
||||
ifeq ($(findstring doc, $(SUBDIRS)), doc)
|
||||
@command.com /c if not exist doc\\nul md doc
|
||||
@echo Making all in doc
|
||||
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.html
|
||||
endif
|
||||
|
||||
check: all-am check-recursive check-local
|
||||
@:
|
||||
installcheck: installcheck-recursive
|
||||
all-recursive-am: config.h
|
||||
$(MAKE) all-recursive
|
||||
|
||||
all-am: Makefile $(PROGRAMS) config.h info
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-data-am: install-info-am
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info
|
||||
|
||||
install-exec: install-exec-recursive install-exec-am
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-data-recursive install-data-am
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-recursive uninstall-recursive:
|
||||
@:
|
||||
|
||||
install: install-recursive install-exec-am install-data-am
|
||||
@:
|
||||
|
||||
uninstall: uninstall-recursive uninstall-am
|
||||
|
||||
all: all-recursive-am all-am
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs: installdirs-recursive
|
||||
$(mkinstalldirs) $(bindir) $(infodir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS mostlyclean-compile mostlyclean-aminfo mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-aminfo clean-tags clean-generic mostlyclean-am
|
||||
|
||||
distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile distclean-aminfo distclean-tags distclean-generic clean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS maintainer-clean-compile maintainer-clean-aminfo maintainer-clean-tags maintainer-clean-generic distclean-am
|
||||
|
||||
mostlyclean: mostlyclean-recursive mostlyclean-am
|
||||
|
||||
clean: clean-noinstLIBRARIES clean-recursive clean-am
|
||||
|
||||
distclean: distclean-recursive distclean-am
|
||||
rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f config.status
|
||||
|
||||
.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
|
||||
maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \
|
||||
clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
|
||||
install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile install-info-am uninstall-info \
|
||||
mostlyclean-aminfo distclean-aminfo clean-aminfo \
|
||||
maintainer-clean-aminfo install-data-recursive uninstall-data-recursive \
|
||||
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
|
||||
uninstalldirs-recursive all-recursive check-recursive check-am \
|
||||
installcheck-recursive info-recursive dvi-recursive \
|
||||
mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info dvi check-local installcheck \
|
||||
all-recursive-am all-am install-exec-am install-data-am uninstall-am \
|
||||
install-exec install-data install uninstall all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean \
|
||||
html
|
||||
|
||||
|
||||
# --------------- Local DIST Section
|
||||
|
||||
# Install the w32 subdirectory
|
||||
#
|
||||
dist-hook:
|
||||
(cd $(srcdir); \
|
||||
w32=`find w32 -follow \( -name .git -prune \) -o -type f -print`; \
|
||||
tar chf - $$w32) \
|
||||
| (cd $(distdir); tar xfBp -)
|
||||
|
||||
# --------------- Local CHECK Section
|
||||
|
||||
# Note: check-loadavg is NOT a prerequisite of check-local, since
|
||||
# there's no uptime utility, and the test it does doesn't make sense
|
||||
# on MSDOS anyway.
|
||||
check-local: check-shell check-regression
|
||||
@banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
echo
|
||||
|
||||
.PHONY: check-loadavg check-shell check-regression
|
||||
|
||||
# > check-shell
|
||||
#
|
||||
# check-shell is designed to fail if they don't have a Unixy shell
|
||||
# installed. The test suite requires such a shell.
|
||||
check-shell:
|
||||
@echo If Make says Error -1, you do not have Unix-style shell installed
|
||||
@foo=bar.exe :
|
||||
|
||||
# > check-loadavg
|
||||
#
|
||||
loadavg: loadavg.c config.h
|
||||
@rm -f loadavg
|
||||
$(LINK) -DTEST $(make_LDFLAGS) loadavg.c $(LIBS)
|
||||
# We copy getloadavg.c into a different file rather than compiling it
|
||||
# directly because some compilers clobber getloadavg.o in the process.
|
||||
loadavg.c: getloadavg.c
|
||||
ln $(srcdir)/getloadavg.c loadavg.c || \
|
||||
cp $(srcdir)/getloadavg.c loadavg.c
|
||||
check-loadavg: loadavg
|
||||
@echo The system uptime program believes the load average to be:
|
||||
-uptime
|
||||
@echo The GNU load average checking code believes:
|
||||
-./loadavg
|
||||
|
||||
# > check-regression
|
||||
#
|
||||
# Look for the make test suite, and run it if found. Look in MAKE_TEST if
|
||||
# specified, or else in the srcdir or the distdir, their parents, and _their_
|
||||
# parents.
|
||||
#
|
||||
check-regression:
|
||||
@if test -f "$(srcdir)/tests/run_make_tests"; then \
|
||||
if $(PERL) -v >/dev/null 2>&1; then \
|
||||
case `cd $(srcdir); pwd` in `pwd`) : ;; \
|
||||
*) test -d tests || mkdir tests; \
|
||||
for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
|
||||
rm -rf tests/$$f; cp -pr $(srcdir)/tests/$$f tests; \
|
||||
done ;; \
|
||||
esac; \
|
||||
echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make.exe $(MAKETESTFLAGS)"; \
|
||||
cd tests && $(PERL) ./run_make_tests.pl -make ../make.exe $(MAKETESTFLAGS); \
|
||||
else \
|
||||
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
||||
fi; \
|
||||
else \
|
||||
echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
|
||||
fi
|
||||
|
||||
# --------------- Maintainer's Section
|
||||
|
||||
# Note this requires GNU make. Not to worry, since it will only be included
|
||||
# in the Makefile if we're in the maintainer's environment.
|
||||
#include $(srcdir)/maintMakefile
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
# --------------- DEPENDENCIES
|
||||
215
Makefile.am
215
Makefile.am
@@ -1,6 +1,6 @@
|
||||
# This is a -*-Makefile-*-, or close enough
|
||||
#
|
||||
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
@@ -16,143 +16,121 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news
|
||||
ACLOCAL_AMFLAGS = -I config
|
||||
AUTOMAKE_OPTIONS = dist-lzip silent-rules std-options subdir-objects nostdinc
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
MAKE_HOST = @MAKE_HOST@
|
||||
|
||||
# Only process if target is MS-Windows
|
||||
if WINDOWSENV
|
||||
MAYBE_W32 = w32
|
||||
W32INC = -I $(top_srcdir)/w32/include
|
||||
W32LIB = -Lw32 -lw32
|
||||
endif
|
||||
|
||||
SUBDIRS = glob config po doc $(MAYBE_W32)
|
||||
SUBDIRS = lib po doc
|
||||
|
||||
bin_PROGRAMS = make
|
||||
include_HEADERS = gnumake.h
|
||||
include_HEADERS = src/gnumake.h
|
||||
|
||||
if USE_CUSTOMS
|
||||
remote = remote-cstms.c
|
||||
else
|
||||
remote = remote-stub.c
|
||||
endif
|
||||
man_MANS = doc/make.1
|
||||
|
||||
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
|
||||
function.c getopt.c getopt1.c implicit.c job.c load.c \
|
||||
loadapi.c main.c misc.c output.c read.c remake.c rule.c \
|
||||
signame.c strcache.c variable.c version.c vpath.c hash.c \
|
||||
$(remote)
|
||||
make_SRCS = src/ar.c src/arscan.c src/commands.c src/commands.h \
|
||||
src/debug.h src/default.c src/dep.h src/dir.c src/expand.c \
|
||||
src/file.c src/filedef.h src/function.c src/getopt.c \
|
||||
src/getopt.h src/getopt1.c src/gettext.h src/guile.c \
|
||||
src/hash.c src/hash.h src/implicit.c src/job.c src/job.h \
|
||||
src/load.c src/loadapi.c src/main.c src/makeint.h src/misc.c \
|
||||
src/os.h src/output.c src/output.h src/read.c src/remake.c \
|
||||
src/rule.c src/rule.h src/signame.c src/strcache.c \
|
||||
src/variable.c src/variable.h src/version.c src/vpath.c
|
||||
|
||||
if HAVE_GUILE
|
||||
make_SOURCES += guile.c
|
||||
endif
|
||||
w32_SRCS = src/w32/pathstuff.c src/w32/w32os.c src/w32/compat/dirent.c \
|
||||
src/w32/compat/posixfcn.c src/w32/include/dirent.h \
|
||||
src/w32/include/dlfcn.h src/w32/include/pathstuff.h \
|
||||
src/w32/include/sub_proc.h src/w32/include/w32err.h \
|
||||
src/w32/subproc/misc.c src/w32/subproc/proc.h \
|
||||
src/w32/subproc/sub_proc.c src/w32/subproc/w32err.c
|
||||
|
||||
EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
|
||||
vms_SRCS = src/vms_exit.c src/vms_export_symbol.c src/vms_progname.c \
|
||||
src/vmsdir.h src/vmsfunctions.c src/vmsify.c
|
||||
|
||||
noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
|
||||
debug.h getopt.h gettext.h hash.h output.h
|
||||
amiga_SRCS = src/amiga.c src/amiga.h
|
||||
|
||||
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
|
||||
$(GUILE_LIBS)
|
||||
# Only process if target is MS-Windows
|
||||
if WINDOWSENV
|
||||
make_LDADD += $(W32LIB)
|
||||
endif
|
||||
glob_SRCS = lib/fnmatch.c lib/fnmatch.h lib/glob.c lib/glob.h
|
||||
|
||||
man_MANS = make.1
|
||||
alloca_SRCS = lib/alloca.c
|
||||
|
||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
|
||||
loadavg_SRCS = lib/getloadavg.c
|
||||
|
||||
AM_CPPFLAGS = $(GLOBINC)
|
||||
AM_CFLAGS = $(GUILE_CFLAGS)
|
||||
# Only process if target is MS-Windows
|
||||
if WINDOWSENV
|
||||
AM_CPPFLAGS += $(W32INC)
|
||||
endif
|
||||
make_SOURCES = $(make_SRCS)
|
||||
EXTRA_make_SOURCES = $(amiga_SRCS) $(vms_SRCS)
|
||||
|
||||
|
||||
# Extra stuff to include in the distribution.
|
||||
|
||||
EXTRA_DIST = README build.sh.in $(man_MANS) \
|
||||
README.customs README.OS2 \
|
||||
SCOPTIONS SMakefile \
|
||||
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
|
||||
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
|
||||
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
|
||||
make_msvc_net2003.sln make_msvc_net2003.vcproj \
|
||||
README.VMS makefile.vms makefile.com config.h-vms \
|
||||
vmsdir.h vmsfunctions.c vmsify.c \
|
||||
gmk-default.scm gmk-default.h
|
||||
|
||||
# This is built during configure, but behind configure's back
|
||||
|
||||
DISTCLEANFILES = build.sh
|
||||
|
||||
# Forward targets
|
||||
|
||||
html:
|
||||
cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||
|
||||
.PHONY: html
|
||||
|
||||
# --------------- Internationalization Section
|
||||
make_LDADD = $(LIBOBJS) $(GUILE_LIBS) lib/libgnu.a $(GETLOADAVG_LIBS) \
|
||||
@LIBINTL@
|
||||
|
||||
localedir = $(datadir)/locale
|
||||
|
||||
# --------------- Local INSTALL Section
|
||||
AM_CPPFLAGS = -Isrc -I$(top_srcdir)/src -Ilib -I$(top_srcdir)/lib \
|
||||
-DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\"
|
||||
|
||||
# If necessary, change the gid of the app and turn on the setgid flag.
|
||||
#
|
||||
AM_CFLAGS = $(GUILE_CFLAGS)
|
||||
|
||||
# Whether or not make needs to be installed setgid.
|
||||
# The value should be either 'true' or 'false'.
|
||||
# On many systems, the getloadavg function (used to implement the '-l'
|
||||
# switch) will not work unless make is installed setgid kmem.
|
||||
#
|
||||
inst_setgid = @NEED_SETGID@
|
||||
if WINDOWSENV
|
||||
make_SOURCES += $(w32_SRCS)
|
||||
AM_CPPFLAGS += -I $(top_srcdir)/src/w32/include
|
||||
else
|
||||
make_SOURCES += src/posixos.c
|
||||
endif
|
||||
|
||||
# Install make setgid to this group so it can get the load average.
|
||||
#
|
||||
inst_group = @KMEM_GROUP@
|
||||
if USE_CUSTOMS
|
||||
make_SOURCES += src/remote-cstms.c
|
||||
else
|
||||
make_SOURCES += src/remote-stub.c
|
||||
endif
|
||||
|
||||
install-exec-local:
|
||||
@if $(inst_setgid); then \
|
||||
app=$(DESTDIR)$(bindir)/`echo $(bin_PROGRAMS)|sed '$(transform)'`; \
|
||||
if chgrp $(inst_group) $$app && chmod g+s $$app; then \
|
||||
echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
|
||||
else \
|
||||
echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
|
||||
echo "otherwise the '-l' option will probably not work."; \
|
||||
echo "You may need special privileges to complete the installation"; \
|
||||
echo "of $$app."; \
|
||||
fi; \
|
||||
else true; fi
|
||||
# Extra stuff to include in the distribution.
|
||||
|
||||
mk_FILES = Basic.mk mk/msdosdjgpp.mk mk/Amiga.mk mk/VMS.mk mk/Windows32.mk
|
||||
# We don't need this, since the standard automake output will do.
|
||||
#mk/Posix.mk.in
|
||||
|
||||
m4_FILES = m4/gnulib-cache.m4
|
||||
|
||||
test_FILES = tests/run_make_tests tests/run_make_tests.bat \
|
||||
tests/run_make_tests.pl tests/test_driver.pl \
|
||||
tests/config-flags.pm.in tests/config_flags_pm.com \
|
||||
tests/config-flags.pm.W32 \
|
||||
tests/mkshadow tests/thelp.pl tests/guile.supp tests/README
|
||||
# test/scripts are added via dist-hook below.
|
||||
|
||||
EXTRA_DIST = ChangeLog README build.sh build.cfg.in $(man_MANS) \
|
||||
README.customs README.OS2 \
|
||||
README.Amiga SCOPTIONS src/config.ami \
|
||||
README.DOS builddos.bat src/configh.dos \
|
||||
README.W32 build_w32.bat src/config.h.W32 \
|
||||
README.VMS makefile.com src/config.h-vms src/vmsjobs.c \
|
||||
vms_export_symbol_test.com \
|
||||
src/gmk-default.scm src/gmk-default.h \
|
||||
$(mk_FILES) $(m4_FILES) $(test_FILES)
|
||||
|
||||
# --------------- Generate the Guile default module content
|
||||
|
||||
guile.$(OBJEXT): gmk-default.h
|
||||
gmk-default.h: $(srcdir)/gmk-default.scm
|
||||
src/guile.$(OBJEXT): src/gmk-default.h
|
||||
src/gmk-default.h: $(top_srcdir)/src/gmk-default.scm
|
||||
(echo 'static const char *const GUILE_module_defn = " '\\ \
|
||||
&& sed -e 's/;.*//' -e '/^[ \t]*$$/d' -e 's/"/\\"/g' -e 's/$$/ \\/' \
|
||||
$(srcdir)/gmk-default.scm \
|
||||
&& echo '";') > $@
|
||||
$(top_srcdir)/src/gmk-default.scm \
|
||||
&& echo '";') > src/gmk-default.h
|
||||
|
||||
# --------------- Local DIST Section
|
||||
|
||||
# Install the w32 and tests subdirectories
|
||||
# Install the mk and tests subdirectories
|
||||
#
|
||||
dist-hook:
|
||||
(cd $(srcdir); \
|
||||
sub=`find w32 tests -follow \( -name .git -o -name .deps -o -name work -o -name .gitignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name Makefile \) -prune -o -type f -print`; \
|
||||
(cd $(top_srcdir); \
|
||||
sub=`find tests/scripts -follow \( -name .git -o -name .deps -o -name work -o -name .gitignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name \*.out -o -name Makefile \) -prune -o -type f -print`; \
|
||||
tar chf - $$sub) \
|
||||
| (cd $(distdir); tar xfBp -)
|
||||
|
||||
|
||||
# --------------- Local CHECK Section
|
||||
|
||||
check-local: check-regression check-loadavg
|
||||
check-local: check-regression
|
||||
@banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo; \
|
||||
@@ -161,20 +139,6 @@ check-local: check-regression check-loadavg
|
||||
echo "$$dashes"; \
|
||||
echo
|
||||
|
||||
.PHONY: check-loadavg check-regression
|
||||
|
||||
check-loadavg: loadavg$(EXEEXT)
|
||||
@echo The system uptime program believes the load average to be:
|
||||
-uptime
|
||||
@echo The GNU load average checking code thinks:
|
||||
-./loadavg$(EXEEXT)
|
||||
|
||||
# The loadavg function is invoked during "make check" to test getloadavg.
|
||||
check_PROGRAMS = loadavg
|
||||
nodist_loadavg_SOURCES = getloadavg.c
|
||||
loadavg_CPPFLAGS = -DTEST
|
||||
loadavg_LDADD = @GETLOADAVG_LIBS@
|
||||
|
||||
# > check-regression
|
||||
#
|
||||
# Look for the make test suite, and run it if found and we can find perl.
|
||||
@@ -183,25 +147,28 @@ loadavg_LDADD = @GETLOADAVG_LIBS@
|
||||
#
|
||||
MAKETESTFLAGS =
|
||||
|
||||
check-regression:
|
||||
@if test -f '$(srcdir)/tests/run_make_tests'; then \
|
||||
.PHONY: check-regression
|
||||
|
||||
check-regression: tests/config-flags.pm
|
||||
@if test -f '$(top_srcdir)/tests/run_make_tests'; then \
|
||||
ulimit -n 128; \
|
||||
if $(PERL) -v >/dev/null 2>&1; then \
|
||||
case `cd '$(srcdir)'; pwd` in `pwd`) : ;; \
|
||||
case `cd '$(top_srcdir)'; pwd` in `pwd`) : ;; \
|
||||
*) test -d tests || mkdir tests; \
|
||||
rm -f srctests; \
|
||||
if ln -s '$(srcdir)/tests' srctests; then \
|
||||
for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
|
||||
if ln -s '$(top_srcdir)/tests' srctests; then \
|
||||
for f in run_make_tests run_make_tests.pl test_driver.pl scripts jhelp.pl; do \
|
||||
rm -f tests/$$f; ln -s ../srctests/$$f tests; \
|
||||
done; fi ;; \
|
||||
esac; \
|
||||
echo "cd tests && $(PERL) ./run_make_tests.pl -srcdir $(abs_srcdir) -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
|
||||
cd tests && $(PERL) ./run_make_tests.pl -srcdir '$(abs_srcdir)' -make '../make$(EXEEXT)' $(MAKETESTFLAGS); \
|
||||
echo "cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir $(abs_top_srcdir) -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
|
||||
cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir '$(abs_top_srcdir)' -make '../make$(EXEEXT)' $(MAKETESTFLAGS); \
|
||||
else \
|
||||
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
||||
fi; \
|
||||
else \
|
||||
echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
|
||||
fi
|
||||
else \
|
||||
echo "Can't find the GNU Make test suite ($(top_srcdir)/tests)."; \
|
||||
fi
|
||||
|
||||
|
||||
# --------------- Maintainer's Section
|
||||
|
||||
308
Makefile.ami
308
Makefile.ami
@@ -1,308 +0,0 @@
|
||||
# -*-Makefile-*- for GNU make on Amiga
|
||||
#
|
||||
# NOTE: If you have no 'make' program at all to process this makefile, run
|
||||
# 'build.sh' instead.
|
||||
#
|
||||
# Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Makefile for GNU Make
|
||||
#
|
||||
|
||||
CC = sc
|
||||
RM = delete
|
||||
|
||||
CFLAGS =
|
||||
CPPFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
# Define these for your system as follows:
|
||||
# -DNO_ARCHIVES To disable 'ar' archive support.
|
||||
# -DNO_FLOAT To avoid using floating-point numbers.
|
||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||
# Some compilers apparently accept this
|
||||
# without complaint but produce losing code,
|
||||
# so beware.
|
||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||
# See also 'config.h'.
|
||||
defines =
|
||||
|
||||
# Which flavor of remote job execution support to use.
|
||||
# The code is found in 'remote-$(REMOTE).c'.
|
||||
REMOTE = stub
|
||||
|
||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||
# your C library, you can comment these out.
|
||||
GETOPT = getopt.o getopt1.o
|
||||
GETOPT_SRC = $(srcdir)getopt.c $(srcdir)getopt1.c $(srcdir)getopt.h
|
||||
|
||||
# If you are using the GNU C library, or have the GNU glob functions in
|
||||
# your C library, you can comment this out. GNU make uses special hooks
|
||||
# into the glob functions to be more efficient (by using make's directory
|
||||
# cache for globbing), so you must use the GNU functions even if your
|
||||
# system's C library has the 1003.2 glob functions already. Also, the glob
|
||||
# functions in the AIX and HPUX C libraries are said to be buggy.
|
||||
GLOB = glob/glob.lib
|
||||
|
||||
# If your system doesn't have alloca, or the one provided is bad, define this.
|
||||
ALLOCA = alloca.o
|
||||
ALLOCA_SRC = $(srcdir)alloca.c
|
||||
|
||||
# If your system needs extra libraries loaded in, define them here.
|
||||
# System V probably need -lPW for alloca. HP-UX 7.0's alloca in
|
||||
# libPW.a is broken on HP9000s300 and HP9000s400 machines. Use
|
||||
# alloca.c instead on those machines.
|
||||
LOADLIBES =
|
||||
|
||||
# Any extra object files your system needs.
|
||||
extras = amiga.o
|
||||
|
||||
# Common prefix for machine-independent installed files.
|
||||
prefix =
|
||||
# Common prefix for machine-dependent installed files.
|
||||
exec_prefix =
|
||||
|
||||
# Directory to install 'make' in.
|
||||
bindir = sc:c
|
||||
# Directory to find libraries in for '-lXXX'.
|
||||
libdir = lib:
|
||||
# Directory to search by default for included makefiles.
|
||||
includedir = include:
|
||||
# Directory to install the Info files in.
|
||||
infodir = doc:
|
||||
# Directory to install the man page in.
|
||||
mandir = t:
|
||||
# Number to put on the man page filename.
|
||||
manext = 1
|
||||
# Prefix to put on installed 'make' binary file name.
|
||||
binprefix =
|
||||
# Prefix to put on installed 'make' man page file name.
|
||||
manprefix = $(binprefix)
|
||||
|
||||
# Whether or not make needs to be installed setgid.
|
||||
# The value should be either 'true' or 'false'.
|
||||
# On many systems, the getloadavg function (used to implement the '-l'
|
||||
# switch) will not work unless make is installed setgid kmem.
|
||||
install_setgid = false
|
||||
# Install make setgid to this group so it can read /dev/kmem.
|
||||
group = sys
|
||||
|
||||
# Program to install 'make'.
|
||||
INSTALL_PROGRAM = copy
|
||||
# Program to install the man page.
|
||||
INSTALL_DATA = copy
|
||||
# Generic install program.
|
||||
INSTALL = copy
|
||||
|
||||
# Program to format Texinfo source into Info files.
|
||||
MAKEINFO = makeinfo
|
||||
# Program to format Texinfo source into DVI files.
|
||||
TEXI2DVI = texi2dvi
|
||||
|
||||
# Programs to make tags files.
|
||||
ETAGS = etags -w
|
||||
CTAGS = ctags -w
|
||||
|
||||
#guile = guile.o
|
||||
|
||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||
remote-$(REMOTE).o $(GETOPT) $(ALLOCA) $(extras) $(guile)
|
||||
|
||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
||||
$(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h \
|
||||
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
||||
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo
|
||||
|
||||
all: make
|
||||
info: make.info
|
||||
dvi: make.dvi
|
||||
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
|
||||
.PHONY: all check info dvi
|
||||
|
||||
make.info: make.texinfo
|
||||
$(MAKEINFO) -I$(srcdir) $(srcdir)make.texinfo -o make.info
|
||||
|
||||
make.dvi: make.texinfo
|
||||
$(TEXI2DVI) $(srcdir)make.texinfo
|
||||
|
||||
make.ps: make.dvi
|
||||
dvi2ps make.dvi > make.ps
|
||||
|
||||
make: $(objs) $(GLOB)
|
||||
$(CC) Link $(LDFLAGS) $(objs) Lib $(GLOB) $(LOADLIBES) To make.new
|
||||
-delete make
|
||||
rename make.new make
|
||||
|
||||
TMPFILE = t:Make$$
|
||||
|
||||
$(GLOB):
|
||||
cd glob @@\
|
||||
$(MAKE) -$(MAKEFLAGS) -f Makefile
|
||||
|
||||
# -I. is needed to find config.h in the build directory.
|
||||
OUTPUT_OPTION =
|
||||
.c.o:
|
||||
$(CC) $(defines) IDir "" IDir glob \
|
||||
$(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
|
||||
|
||||
# For some losing Unix makes.
|
||||
SHELL = /bin/sh
|
||||
#@SET_MAKE@
|
||||
|
||||
glob/libglob.a: FORCE config.h
|
||||
cd glob; $(MAKE) libglob.a
|
||||
FORCE:
|
||||
|
||||
.PHONY: install installdirs
|
||||
install: installdirs \
|
||||
$(bindir)$(binprefix)make $(infodir)make.info \
|
||||
$(mandir)$(manprefix)make.$(manext)
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
|
||||
|
||||
$(bindir)$(binprefix)make: make
|
||||
$(INSTALL_PROGRAM) make $@.new
|
||||
@if $(install_setgid); then \
|
||||
if chgrp $(group) $@.new && chmod g+s $@.new; then \
|
||||
echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
|
||||
else \
|
||||
echo "$@ needs to be owned by group $(group) and setgid;"; \
|
||||
echo "otherwise the '-l' option will probably not work."; \
|
||||
echo "You may need special privileges to install $@."; \
|
||||
fi; \
|
||||
else true; fi
|
||||
# Some systems can't deal with renaming onto a running binary.
|
||||
-$(RM) $@.old
|
||||
-mv $@ $@.old
|
||||
mv $@.new $@
|
||||
|
||||
$(infodir)make.info: make.info
|
||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
||||
for file in $${dir}/make.info*; do \
|
||||
name="`basename $$file`"; \
|
||||
$(INSTALL_DATA) $$file \
|
||||
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
||||
done
|
||||
# Run install-info only if it exists.
|
||||
# Use 'if' instead of just prepending '-' to the
|
||||
# line so we notice real errors from install-info.
|
||||
# We use '$(SHELL) -c' because some shells do not
|
||||
# fail gracefully when there is an unknown command.
|
||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
||||
install-info --infodir=$(infodir) $$dir/make.info; \
|
||||
else true; fi
|
||||
|
||||
$(mandir)$(manprefix)make.$(manext): make.man
|
||||
$(INSTALL_DATA) $(srcdir)make.man $@
|
||||
|
||||
|
||||
loadavg: loadavg.c config.h
|
||||
$(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
|
||||
loadavg.c $(LOADLIBES) -o $@
|
||||
# We copy getloadavg.c into a different file rather than compiling it
|
||||
# directly because some compilers clobber getloadavg.o in the process.
|
||||
loadavg.c: getloadavg.c
|
||||
ln $(srcdir)getloadavg.c loadavg.c || \
|
||||
cp $(srcdir)getloadavg.c loadavg.c
|
||||
check-loadavg: loadavg
|
||||
@echo The system uptime program believes the load average to be:
|
||||
-uptime
|
||||
@echo The GNU load average checking code believes:
|
||||
./loadavg
|
||||
check: check-loadavg
|
||||
|
||||
|
||||
.PHONY: clean realclean distclean mostlyclean
|
||||
clean: glob-clean
|
||||
-$(RM) make loadavg "#?.o" core make.dvi
|
||||
|
||||
distclean: clean glob-realclean
|
||||
-$(RM) Makefile config.h config.status build.sh
|
||||
-$(RM) config.log config.cache
|
||||
-$(RM) TAGS tags
|
||||
-$(RM) make.?? make.??s make.log make.toc make.*aux
|
||||
-$(RM) loadavg.c
|
||||
|
||||
realclean: distclean
|
||||
-$(RM) make.info*
|
||||
mostlyclean: clean
|
||||
|
||||
.PHONY: glob-clean glob-realclean
|
||||
glob-clean glob-realclean:
|
||||
cd glob @@\
|
||||
$(MAKE) $@
|
||||
|
||||
# This tells versions [3.59,3.63) of GNU make not to export all variables.
|
||||
.NOEXPORT:
|
||||
|
||||
# The automatically generated dependencies below may omit config.h
|
||||
# because it is included with '#include <config.h>' rather than
|
||||
# '#include "config.h"'. So we add the explicit dependency to make sure.
|
||||
$(objs): config.h
|
||||
|
||||
# Automatically generated dependencies will be put at the end of the file.
|
||||
|
||||
# Automatically generated dependencies.
|
||||
commands.o: commands.c makeint.h dep.h filedef.h variable.h job.h \
|
||||
commands.h
|
||||
job.o: job.c makeint.h job.h filedef.h commands.h variable.h
|
||||
dir.o: dir.c makeint.h
|
||||
file.o: file.c makeint.h dep.h filedef.h job.h commands.h variable.h
|
||||
misc.o: misc.c makeint.h dep.h
|
||||
main.o: main.c makeint.h dep.h filedef.h variable.h job.h commands.h \
|
||||
getopt.h
|
||||
guile.o: guile.c makeint.h dep.h debug.h variable.h gmk-default.h
|
||||
read.o: read.c makeint.h dep.h filedef.h job.h commands.h variable.h \
|
||||
glob/glob.h
|
||||
remake.o: remake.c makeint.h filedef.h job.h commands.h dep.h
|
||||
rule.o: rule.c makeint.h dep.h filedef.h job.h commands.h variable.h \
|
||||
rule.h
|
||||
implicit.o: implicit.c makeint.h rule.h dep.h filedef.h
|
||||
default.o: default.c makeint.h rule.h dep.h filedef.h job.h commands.h \
|
||||
variable.h
|
||||
variable.o: variable.c makeint.h dep.h filedef.h job.h commands.h \
|
||||
variable.h
|
||||
expand.o: expand.c makeint.h filedef.h job.h commands.h variable.h
|
||||
function.o: function.c makeint.h filedef.h variable.h dep.h job.h \
|
||||
commands.h amiga.h
|
||||
vpath.o: vpath.c makeint.h filedef.h variable.h
|
||||
strcache.o: strcache.c makeint.h hash.h
|
||||
version.o: version.c
|
||||
ar.o: ar.c makeint.h filedef.h dep.h
|
||||
arscan.o: arscan.c makeint.h
|
||||
signame.o: signame.c signame.h
|
||||
remote-stub.o: remote-stub.c makeint.h filedef.h job.h commands.h
|
||||
getopt.o: getopt.c
|
||||
getopt1.o : getopt1.c getopt.h
|
||||
getloadavg.o: getloadavg.c
|
||||
amiga.o: amiga.c makeint.h variable.h amiga.h
|
||||
461
NEWS
461
NEWS
@@ -1,15 +1,197 @@
|
||||
GNU make NEWS -*-indented-text-*-
|
||||
History of user-visible changes.
|
||||
1 Oct 2013
|
||||
3 January 2020
|
||||
|
||||
See the end of this file for copyrights and conditions.
|
||||
|
||||
All changes mentioned here are more fully described in the GNU make
|
||||
manual, which is contained in this distribution as the file doc/make.texi.
|
||||
All user-visible changes are more fully described in the GNU make manual,
|
||||
which is contained in this distribution as the file doc/make.texi.
|
||||
See the README file and the GNU make manual for instructions for
|
||||
reporting bugs.
|
||||
|
||||
Version 3.99.93
|
||||
Version 4.2.93 (03 Jan 2020)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=108&set=custom
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
Number signs (#) appearing inside a macro reference or function invocation
|
||||
no longer introduce comments and should not be escaped with backslashes:
|
||||
thus a call such as:
|
||||
foo := $(shell echo '#')
|
||||
is legal. Previously the number sign needed to be escaped, for example:
|
||||
foo := $(shell echo '\#')
|
||||
Now this latter will resolve to "\#". If you want to write makefiles
|
||||
portable to both versions, assign the number sign to a variable:
|
||||
H := \#
|
||||
foo := $(shell echo '$H')
|
||||
This was claimed to be fixed in 3.81, but wasn't, for some reason.
|
||||
To detect this change search for 'nocomment' in the .FEATURES variable.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
Previously appending using '+=' to an empty variable would result in a value
|
||||
starting with a space. Now the initial space is only added if the variable
|
||||
already contains some value. Similarly, appending an empty string does not
|
||||
add a trailing space.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
Contrary to the documentation, suffix rules with prerequisites were being
|
||||
treated BOTH as simple targets AND as pattern rules. Behavior now matches
|
||||
the documentation, and pattern rules are no longer created in this case.
|
||||
|
||||
* New feature: Grouped explicit targets
|
||||
Pattern rules have always had the ability to generate multiple targets with
|
||||
a single invocation of the recipe. It's now possible to declare that an
|
||||
explicit rule generates multiple targets with a single invocation. To use
|
||||
this, replace the ":" token with "&:" in the rule. To detect this feature
|
||||
search for 'grouped-target' in the .FEATURES special variable.
|
||||
Implementation contributed by Kaz Kylheku <kaz@kylheku.com>
|
||||
|
||||
* New feature: .EXTRA_PREREQS variable
|
||||
Words in this variable are considered prerequisites of targets but they are
|
||||
not added to any of the automatic variable values when expanding the
|
||||
recipe. This variable can either be global (applies to all targets) or
|
||||
a target-specific variable. To detect this feature search for 'extra-prereqs'
|
||||
in the .FEATURES special variable.
|
||||
|
||||
* Makefiles can now specify the '-j' option in their MAKEFLAGS variable and
|
||||
this will cause make to enable that parallelism mode.
|
||||
|
||||
* GNU make will now use posix_spawn() on systems where it is available.
|
||||
If you prefer to use fork/exec even on systems where posix_spawn() is
|
||||
present, you can use the --disable-posix-spawn option to configure. Aron
|
||||
Barath <baratharon@caesar.elte.hu> provided the basic implementation.
|
||||
|
||||
* Error messages printed when invoking non-existent commands have been cleaned
|
||||
up and made consistent.
|
||||
|
||||
* The previous limit of 63 jobs under -jN on MS-Windows is now
|
||||
increased to 4095. That limit includes the subprocess started by
|
||||
the $(shell) function.
|
||||
|
||||
* A new option --no-silent has been added, that cancels the effect of the
|
||||
-s/--silent/--quiet flag.
|
||||
|
||||
* A new option -E has been added as a short alias for --eval.
|
||||
|
||||
* All wildcard expansion within GNU make, including $(wildcard ...), will sort
|
||||
the results. See https://savannah.gnu.org/bugs/index.php?52076
|
||||
|
||||
* Interoperate with newer GNU libc and musl C runtime libraries.
|
||||
|
||||
* Performance improvements provided by Paolo Bonzini <pbonzini@redhat.com>
|
||||
|
||||
GNU make Developer News
|
||||
|
||||
* Import the GNU standard bootstrap script to replace the hand-rolled
|
||||
"make update" method for building code from a GNU make Git repository.
|
||||
|
||||
* Rework the source distribution to move source files into the src/*
|
||||
subdirectory. This aligns with modern best practices in GNU.
|
||||
|
||||
* Replace local portability code with Gnulib content. Unfortunately due to a
|
||||
problem with Gnulib support for getloadavg, this forces a requirement on
|
||||
Automake 1.16 or above in order to build from Git. See README.git.
|
||||
|
||||
|
||||
Version 4.2.1 (10 Jun 2016)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=107&set=custom
|
||||
|
||||
This release is a bug-fix release.
|
||||
|
||||
|
||||
Version 4.2 (22 May 2016)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=106&set=custom
|
||||
|
||||
* New variable: $(.SHELLSTATUS) is set to the exit status of the last != or
|
||||
$(shell ...) function invoked in this instance of make. This will be "0" if
|
||||
successful or not "0" if not successful. The variable value is unset if no
|
||||
!= or $(shell ...) function has been invoked.
|
||||
|
||||
* The $(file ...) function can now read from a file with $(file <FILE).
|
||||
The function is expanded to the contents of the file. The contents are
|
||||
expanded verbatim except that the final newline, if any, is stripped.
|
||||
|
||||
* The makefile line numbers shown by GNU make now point directly to the
|
||||
specific line in the recipe where the failure or warning occurred.
|
||||
Sample changes suggested by Brian Vandenberg <phantall@gmail.com>
|
||||
|
||||
* The interface to GNU make's "jobserver" is stable as documented in the
|
||||
manual, for tools which may want to access it.
|
||||
|
||||
WARNING: Backward-incompatibility! The internal-only command line option
|
||||
--jobserver-fds has been renamed for publishing, to --jobserver-auth.
|
||||
|
||||
* The amount of parallelism can be determined by querying MAKEFLAGS, even when
|
||||
the job server is enabled (previously MAKEFLAGS would always contain only
|
||||
"-j", with no number, when job server was enabled).
|
||||
|
||||
* VMS-specific changes:
|
||||
|
||||
* Perl test harness now works.
|
||||
|
||||
* Full support for converting Unix exit status codes to VMS exit status
|
||||
codes. BACKWARD INCOMPATIBILITY Notice: On a child failure the VMS exit
|
||||
code is now the encoded Unix exit status that Make usually generates, not
|
||||
the VMS exit status of the child.
|
||||
|
||||
|
||||
Version 4.1 (05 Oct 2014)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=105&set=custom
|
||||
|
||||
* New variables: $(MAKE_TERMOUT) and $(MAKE_TERMERR) are set to non-empty
|
||||
values if stdout or stderr, respectively, are believed to be writing to a
|
||||
terminal. These variables are exported by default.
|
||||
|
||||
* Allow a no-text-argument form of the $(file ...) function. Without a text
|
||||
argument nothing is written to the file: it is simply opened in the
|
||||
requested mode, then closed again.
|
||||
|
||||
* Change the fatal error for mixed explicit and implicit rules, that was
|
||||
introduced in GNU make 3.82, to a non-fatal error. However, this syntax is
|
||||
still deprecated and may return to being illegal in a future version of GNU
|
||||
make. Makefiles that rely on this syntax should be fixed.
|
||||
See https://savannah.gnu.org/bugs/?33034
|
||||
|
||||
* VMS-specific changes:
|
||||
|
||||
* Support for library files added, including support for using the GNV ar
|
||||
utility.
|
||||
|
||||
* Partial support for properly encoding Unix exit status codes into VMS exit
|
||||
status codes.
|
||||
|
||||
WARNING: Backward-incompatibility! These are different exit status codes
|
||||
than Make exited with in the past.
|
||||
|
||||
* Macros to hold the current make command are set up to translate the
|
||||
argv[0] string to a VMS format path name and prefix it with "MCR " so that
|
||||
the macro has a space in it.
|
||||
|
||||
WARNING: Backward-incompatibility! This may break complex makefiles that
|
||||
do processing on those macros. This is unlikely because so much in that
|
||||
area was not and is still not currently working on VMS, it is unlikely to
|
||||
find such a complex makefile, so this is more likely to impact
|
||||
construction of a future makefile.
|
||||
|
||||
* A command file is always used to run the commands for a recipe.
|
||||
|
||||
WARNING: Backward-incompatibility! Running the make self tests has
|
||||
exposed that there are significant differences in behavior when running
|
||||
with the command file mode. It is unknown if this will be noticed by most
|
||||
existing VMS makefiles.
|
||||
|
||||
Version 4.0 (09 Oct 2013)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
@@ -143,15 +325,6 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=104&set
|
||||
results from wildcard expansions, use the $(sort ...) function to request
|
||||
it explicitly.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
In previous versions of make it was acceptable to list one or more explicit
|
||||
targets followed by one or more pattern targets in the same rule and it
|
||||
worked "as expected". However, this was not documented as acceptable and if
|
||||
you listed any explicit targets AFTER the pattern targets, the entire rule
|
||||
would be mis-parsed. This release removes this ability completely: make
|
||||
will generate an error message if you mix explicit and pattern targets in
|
||||
the same rule.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
As a result of parser enhancements, three backward-compatibility issues
|
||||
exist: first, a prerequisite containing an "=" cannot be escaped with a
|
||||
@@ -225,6 +398,57 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=104&set
|
||||
after the variable name, to allow for simple, conditional, or appending
|
||||
multi-line variable assignment.
|
||||
|
||||
* VMS-specific changes:
|
||||
|
||||
* Michael Gehre (at VISTEC-SEMI dot COM) supplied a fix for a problem with
|
||||
timestamps of object modules in OLBs. The timestamps were not correctly
|
||||
adjusted to GMT based time, if the local VMS time was using a daylight
|
||||
saving algorithm and if daylight saving was switched off.
|
||||
|
||||
* John Eisenbraun (at HP dot COM) supplied fixes and and an enhancement to
|
||||
append output redirection in action lines.
|
||||
|
||||
* Rework of ctrl+c and ctrl+y handling.
|
||||
|
||||
* Fix a problem with cached strings, which showed on case-insensitive file
|
||||
systems.
|
||||
|
||||
* Build fixes for const-ified code in VMS specific sources.
|
||||
|
||||
* A note on appending the redirected output. With this change, a simple
|
||||
mechanism is implemented to make ">>" work in action lines. In VMS
|
||||
there is no simple feature like ">>" to have DCL command or program
|
||||
output redirected and appended to a file. GNU make for VMS already
|
||||
implements the redirection of output. If such a redirection is detected,
|
||||
an ">" on the action line, GNU make creates a DCL command procedure to
|
||||
execute the action and to redirect its output. Based on that, now ">>"
|
||||
is also recognized and a similar but different command procedure is
|
||||
created to implement the append. The main idea here is to create a
|
||||
temporary file which collects the output and which is appended to the
|
||||
wanted output file. Then the temporary file is deleted. This is all done
|
||||
in the command procedure to keep changes in make small and simple. This
|
||||
obviously has some limitations but it seems good enough compared with
|
||||
the current ">" implementation. (And in my opinion, redirection is not
|
||||
really what GNU make has to do.) With this approach, it may happen that
|
||||
the temporary file is not yet appended and is left in SYS$SCRATCH.
|
||||
The temporary file names look like "CMDxxxxx.". Any time the created
|
||||
command procedure can not complete, this happens. Pressing Ctrl+Y to
|
||||
abort make is one case. In case of Ctrl+Y the associated command
|
||||
procedure is left in SYS$SCRATCH as well. Its name is CMDxxxxx.COM.
|
||||
|
||||
* Change in the Ctrl+Y handling. The CtrlY handler now uses $delprc to
|
||||
delete all children. This way also actions with DCL commands will be
|
||||
stopped. As before the CtrlY handler then sends SIGQUIT to itself,
|
||||
which is handled in common code.
|
||||
|
||||
* Change in deleteing temporary command files. Temporary command files
|
||||
are now deleted in the vms child termination handler. That deletes
|
||||
them even if a Ctrl+C was pressed.
|
||||
|
||||
* The behavior of pressing Ctrl+C is not changed. It still has only an
|
||||
effect, after the current action is terminated. If that doesn't happen
|
||||
or takes too long, Ctrl+Y should be used instead.
|
||||
|
||||
|
||||
Version 3.81 (01 Apr 2006)
|
||||
|
||||
@@ -239,8 +463,8 @@ Version 3.81 (01 Apr 2006)
|
||||
any prerequisite that does not exist, even though that prerequisite
|
||||
might have caused the target to rebuild. Starting with the _next_
|
||||
release of GNU make, '$?' will contain all prerequisites that caused
|
||||
the target to be considered out of date. See this Savannah bug:
|
||||
http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=16051
|
||||
the target to be considered out of date.
|
||||
See http://savannah.gnu.org/bugs/?16051
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
GNU make now implements a generic "second expansion" feature on the
|
||||
@@ -444,6 +668,42 @@ Version 3.80 (03 Oct 2002)
|
||||
|
||||
* Updated to autoconf 2.54 and automake 1.7. Users should not be impacted.
|
||||
|
||||
* VMS-specific changes:
|
||||
|
||||
* In default.c define variable ARCH as IA64 for VMS on Itanium systems.
|
||||
|
||||
* In makefile.vms avoid name collision for glob and globfree.
|
||||
|
||||
* This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
|
||||
|
||||
It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
|
||||
by Klaus Kämpf <kkaempf@rmi.de>, the code was based on the VMS port of
|
||||
GNU Make 3.60 by Mike Moretti.
|
||||
|
||||
It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
|
||||
tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
|
||||
versions of DECC were used. VAXC was tried: it fails; but it doesn't
|
||||
seem worth to get it working. There are still some PTRMISMATCH warnings
|
||||
during the compile. Although perl is working on VMS the test scripts
|
||||
don't work. The function $shell is still missing.
|
||||
|
||||
There is a known bug in some of the VMS CRTLs. It is in the shipped
|
||||
versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
|
||||
available ECOs for VMS V7.1 and newer versions. It is fixed in versions
|
||||
shipped with newer VMS versions and all ECO kits after October 1999. It
|
||||
only shows up during the daylight saving time period (DST): stat()
|
||||
returns a modification time 1 hour ahead. This results in GNU make
|
||||
warning messages. For a just created source you will see:
|
||||
|
||||
$ gmake x.exe
|
||||
gmake.exe;1: *** Warning: File 'x.c' has modification time in the future
|
||||
(940582863 > 940579269)
|
||||
cc /obj=x.obj x.c
|
||||
link x.obj /exe=x.exe
|
||||
gmake.exe;1: *** Warning: Clock skew detected. Your build may be
|
||||
incomplete.
|
||||
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=102
|
||||
@@ -500,6 +760,56 @@ Version 3.79 (04 Apr 2000)
|
||||
|
||||
* Hartmut Becker provided many updates for the VMS port of GNU make.
|
||||
See the README.VMS file for more details.
|
||||
|
||||
* VMS-specific changes:
|
||||
|
||||
* Fix a problem with automatically remaking makefiles. GNU make uses an
|
||||
execve to restart itself after a successful remake of the makefile. On
|
||||
UNIX systems execve replaces the running program with a new one and
|
||||
resets all signal handling to the default. On VMS execve creates a child
|
||||
process, signal and exit handlers of the parent are still active, and,
|
||||
unfortunately, corrupt the exit code from the child. Fix in job.c:
|
||||
ignore SIGCHLD.
|
||||
|
||||
* Added some switches to reflect latest features of DECC. Modifications in
|
||||
makefile.vms.
|
||||
|
||||
* Set some definitions to reflect latest features of DECC. Modifications in
|
||||
config.h-vms (which is copied to config.h).
|
||||
|
||||
* Added extern strcmpi declaration to avoid 'implicitly declared' messages.
|
||||
Modification in make.h.
|
||||
|
||||
* Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
|
||||
Compaq c/c++ compilers. Modifications in default.c.
|
||||
|
||||
* Usage of opendir() and friends, suppress file version. Modifications in
|
||||
dir.c.
|
||||
|
||||
* Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
|
||||
Modifications in job.c.
|
||||
|
||||
* Added support to have case sensitive targets and dependencies but to
|
||||
still use case blind file names. This is especially useful for Java
|
||||
makefiles on VMS:
|
||||
|
||||
.SUFFIXES :
|
||||
.SUFFIXES : .class .java
|
||||
.java.class :
|
||||
javac "$<
|
||||
HelloWorld.class : HelloWorld.java
|
||||
|
||||
* A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
|
||||
It needs to be enabled to get this feature; default is disabled. The
|
||||
macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
|
||||
Modifications in file.c and config.h-vms.
|
||||
|
||||
* Bootstrap make to start building make is still makefile.com, but make
|
||||
needs to be re-made with a make to make a correct version: ignore all
|
||||
possible warnings, delete all objects, rename make.exe to a different
|
||||
name and run it.
|
||||
|
||||
* Made some minor modifications to the bootstrap build makefile.com.
|
||||
|
||||
Version 3.78 (22 Sep 1999)
|
||||
|
||||
@@ -602,6 +912,45 @@ Version 3.77 (28 Jul 1998)
|
||||
|
||||
* Updates to the Windows 95/NT port from Rob Tulloh (see README.W32),
|
||||
and to the DOS port from Eli Zaretski (see README.DOS).
|
||||
|
||||
* VMS-specific changes:
|
||||
|
||||
* This is the VMS port of GNU Make.
|
||||
It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
|
||||
This port was done by Klaus Kämpf <kkaempf@rmi.de>
|
||||
|
||||
* There is first-level support available from proGIS Software, Germany.
|
||||
Visit their web-site at http://www.progis.de to get information
|
||||
about other vms software and forthcoming updates to gnu make.
|
||||
|
||||
* /bin/sh style I/O redirection is supported. You can now write lines like
|
||||
mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
|
||||
|
||||
* Makefile variables are looked up in the current environment. You can set
|
||||
symbols or logicals in DCL and evaluate them in the Makefile via
|
||||
$(<name-of-symbol-or-logical>). Variables defined in the Makefile
|
||||
override VMS symbols/logicals !
|
||||
|
||||
* Functions for file names are working now. See the GNU Make manual for
|
||||
$(dir ...) and $(wildcard ...). Unix-style and VMS-style names are
|
||||
supported as arguments.
|
||||
|
||||
* The default rules are set up for GNU C. Building an executable from a
|
||||
single source file is as easy as 'make file.exe'.
|
||||
|
||||
* The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
|
||||
different VMS systems can now be written by checking $(ARCH) as in
|
||||
ifeq ($(ARCH),ALPHA)
|
||||
$(ECHO) "On the Alpha"
|
||||
else
|
||||
$(ECHO) "On the VAX"
|
||||
endif
|
||||
|
||||
* Command lines of excessive length are correctly broken and written to a
|
||||
batch file in sys$scratch for later execution. There's no limit to the
|
||||
lengths of commands (and no need for .opt files :-) any more.
|
||||
|
||||
* Empty commands are handled correctly and don't end in a new DCL process.
|
||||
|
||||
Version 3.76.1 (19 Sep 1997)
|
||||
|
||||
@@ -650,8 +999,54 @@ Version 3.76 (16 Sep 1997)
|
||||
concerning this port to Eli Zaretskii <eliz@is.elta.co.il> or DJ
|
||||
Delorie <dj@delorie.com>.
|
||||
|
||||
* John W. Eaton has updated the VMS port to support libraries and VPATH.
|
||||
|
||||
* VMS-specific changes:
|
||||
|
||||
* John W. Eaton has updated the VMS port to support libraries and VPATH.
|
||||
|
||||
* The cd command is supported if it's called as $(CD). This invokes
|
||||
the 'builtin_cd' command which changes the directory.
|
||||
Calling 'set def' doesn't do the trick, since a sub-shell is
|
||||
spawned for this command, the directory is changed *in this sub-shell*
|
||||
and the sub-shell ends.
|
||||
|
||||
* Libraries are not supported. They were in GNU Make 3.60 but somehow I
|
||||
didn't care porting the code. If there is enough interest, I'll do it at
|
||||
some later time.
|
||||
|
||||
* The variable $^ separates files with commas instead of spaces (It's the
|
||||
natural thing to do for VMS).
|
||||
|
||||
* See defaults.c for VMS default suffixes and my definitions for default
|
||||
rules and variables.
|
||||
|
||||
* The shell function is not implemented yet.
|
||||
|
||||
* Load average routines haven't been implemented for VMS yet.
|
||||
|
||||
* The default include directory for including other makefiles is
|
||||
SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
|
||||
SYS$LIBRARY: instead; maybe it wouldn't work that way).
|
||||
|
||||
* The default makefiles make looks for are: makefile.vms, gnumakefile,
|
||||
makefile., and gnumakefile. .
|
||||
|
||||
* The stat() function and handling of time stamps in VMS is broken, so I
|
||||
replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
|
||||
somewhere in the future. Be warned, the time resolution inside make is
|
||||
less than what vms provides. This might be a problem on the faster Alphas.
|
||||
|
||||
* You can use a : in a filename only if you precede it with a backslash ('\').
|
||||
E.g.- hobbes\:[bogas.files]
|
||||
|
||||
* Make ignores success, informational, or warning errors (-S-, -I-, or -W-).
|
||||
But it will stop on -E- and -F- errors. (unless you do something
|
||||
to override this in your makefile, or whatever).
|
||||
|
||||
* Remote stuff isn't implemented yet.
|
||||
|
||||
* Multiple line DCL commands, such as "if" statements, must be put inside
|
||||
command files. You can run a command file by using \@.
|
||||
|
||||
Version 3.75 (27 Aug 1996)
|
||||
|
||||
* The directory messages printed by `-w' and implicitly in sub-makes,
|
||||
@@ -672,6 +1067,14 @@ Version 3.75 (27 Aug 1996)
|
||||
* Rob Tulloh of Tivoli Systems has contributed a port to Windows NT or 95.
|
||||
See README.W32 for details, and direct all Windows-related questions to
|
||||
<rob_tulloh@tivoli.com>.
|
||||
|
||||
* VMS-specific changes:
|
||||
|
||||
* Lots of default settings are adapted for VMS. See default.c.
|
||||
|
||||
* Long command lines are now converted to command files.
|
||||
|
||||
* Comma (',') as a separator is now allowed. See makefile.vms for an example.
|
||||
|
||||
Version 3.73 (05 Apr 1995)
|
||||
|
||||
@@ -767,7 +1170,7 @@ Version 3.69 (07 Nov 1993)
|
||||
have reversed the change made in version 3.68 because it turned out to
|
||||
cause a paradoxical situation in cases like:
|
||||
|
||||
export variable = $(shell echo value)
|
||||
export variable = $(shell echo value)
|
||||
|
||||
When Make attempted to put this variable in the environment for a
|
||||
recipe, it would try expand the value by running the shell command
|
||||
@@ -790,8 +1193,8 @@ Version 3.68 (28 Jul 1993)
|
||||
foo.a(b.o) bar.a(c.o) bar.a(d.o)'.
|
||||
|
||||
* A suffix rule `.X.a' now produces two pattern rules:
|
||||
(%.o): %.X # Previous versions produced only this.
|
||||
%.a: %.X # Now produces this as well, just like other suffixes.
|
||||
(%.o): %.X # Previous versions produced only this.
|
||||
%.a: %.X # Now produces this as well, just like other suffixes.
|
||||
|
||||
* The new flag `--warn-undefined-variables' says to issue a warning message
|
||||
whenever Make expands a reference to an undefined variable.
|
||||
@@ -861,15 +1264,15 @@ Version 3.63 (22 Jan 1993)
|
||||
no longer automatically put into the environments of the recipe lines that
|
||||
Make runs. Instead, only variables specified on the command line or in
|
||||
the environment are exported by default. To export others, use:
|
||||
export VARIABLE
|
||||
export VARIABLE
|
||||
or you can define variables with:
|
||||
export VARIABLE = VALUE
|
||||
export VARIABLE = VALUE
|
||||
or:
|
||||
export VARIABLE := VALUE
|
||||
export VARIABLE := VALUE
|
||||
You can use just:
|
||||
export
|
||||
export
|
||||
or:
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
to get the old behavior. See the node `Variables/Recursion' in the manual
|
||||
for a full description.
|
||||
|
||||
@@ -889,9 +1292,9 @@ Version 3.63 (22 Jan 1993)
|
||||
|
||||
* A single `include' directive can now specify more than one makefile to
|
||||
include, like this:
|
||||
include file1 file2
|
||||
include file1 file2
|
||||
You can also use shell file name patterns in an `include' directive:
|
||||
include *.mk
|
||||
include *.mk
|
||||
|
||||
* The default directories to search for included makefiles, and for
|
||||
libraries specified with `-lNAME', are now set by configuration.
|
||||
@@ -1027,7 +1430,7 @@ Version 3.49
|
||||
* The `wildcard' variable expansion function now expands ~ and ~USER.
|
||||
|
||||
* Messages indicating failed recipe lines now contain the target name:
|
||||
make: *** [target] Error 1
|
||||
make: *** [target] Error 1
|
||||
|
||||
* The `-p' output format has been changed somewhat to look more like
|
||||
makefile rules and to give all information that Make has about files.
|
||||
@@ -1207,7 +1610,7 @@ Version 3.05
|
||||
(Changes from versions 1 through 3.05 were never recorded. Sorry.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
# -*-Makefile-*- to build GNU make with nmake
|
||||
#
|
||||
# NOTE: If you have no 'make' program at all to process this makefile,
|
||||
# run 'build_w32.bat' instead.
|
||||
#
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
LINK = link
|
||||
CC = cl
|
||||
MAKE = nmake
|
||||
|
||||
OUTDIR=.
|
||||
MAKEFILE=NMakefile
|
||||
SUBPROC_MAKEFILE=NMakefile
|
||||
|
||||
CFLAGS_any = /nologo /MT /W4 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H
|
||||
CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
|
||||
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
||||
|
||||
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||
/INCREMENTAL:no /PDB:WinDebug/make.pdb /OUT:WinDebug/make.exe /DEBUG
|
||||
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||
/INCREMENTAL:no /OUT:WinRel/make.exe
|
||||
|
||||
all: config.h subproc Release Debug
|
||||
|
||||
#
|
||||
# Make sure we build the subproc library first. It has it's own
|
||||
# makefile. To be portable to Windows 95, we put the instructions
|
||||
# on how to build the library into a batch file. On NT, we could
|
||||
# simply have done foo && bar && dog, but this doesn't port.
|
||||
#
|
||||
subproc: w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib
|
||||
|
||||
w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib: w32/subproc/misc.c w32/subproc/sub_proc.c w32/subproc/w32err.c
|
||||
subproc.bat $(SUBPROC_MAKEFILE) $(MAKE)
|
||||
if exist WinDebug\make.exe erase WinDebug\make.exe
|
||||
if exist WinRel\make.exe erase WinRel\make.exe
|
||||
|
||||
config.h: config.h.W32
|
||||
copy $? $@
|
||||
|
||||
Release:
|
||||
$(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
|
||||
Debug:
|
||||
$(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
|
||||
|
||||
clean:
|
||||
if exist WinDebug\nul rmdir /s /q WinDebug
|
||||
if exist WinRel\nul rmdir /s /q WinRel
|
||||
if exist w32\subproc\WinDebug\nul rmdir /s /q w32\subproc\WinDebug
|
||||
if exist w32\subproc\WinRel\nul rmdir /s /q w32\subproc\WinRel
|
||||
if exist config.h erase config.h
|
||||
erase *.pdb
|
||||
|
||||
$(OUTDIR):
|
||||
if not exist .\$@\nul mkdir .\$@
|
||||
|
||||
LIBS = kernel32.lib user32.lib advapi32.lib
|
||||
|
||||
#guile = $(OUTDIR)/guile.obj
|
||||
|
||||
OBJS = \
|
||||
$(OUTDIR)/ar.obj \
|
||||
$(OUTDIR)/arscan.obj \
|
||||
$(OUTDIR)/commands.obj \
|
||||
$(OUTDIR)/default.obj \
|
||||
$(OUTDIR)/dir.obj \
|
||||
$(OUTDIR)/expand.obj \
|
||||
$(OUTDIR)/file.obj \
|
||||
$(OUTDIR)/function.obj \
|
||||
$(OUTDIR)/getloadavg.obj \
|
||||
$(OUTDIR)/getopt.obj \
|
||||
$(OUTDIR)/getopt1.obj \
|
||||
$(OUTDIR)/hash.obj \
|
||||
$(OUTDIR)/implicit.obj \
|
||||
$(OUTDIR)/job.obj \
|
||||
$(OUTDIR)/main.obj \
|
||||
$(OUTDIR)/misc.obj \
|
||||
$(OUTDIR)/output.obj \
|
||||
$(OUTDIR)/read.obj \
|
||||
$(OUTDIR)/remake.obj \
|
||||
$(OUTDIR)/remote-stub.obj \
|
||||
$(OUTDIR)/rule.obj \
|
||||
$(OUTDIR)/signame.obj \
|
||||
$(OUTDIR)/strcache.obj \
|
||||
$(OUTDIR)/variable.obj \
|
||||
$(OUTDIR)/version.obj \
|
||||
$(OUTDIR)/vpath.obj \
|
||||
$(OUTDIR)/glob.obj \
|
||||
$(OUTDIR)/fnmatch.obj \
|
||||
$(OUTDIR)/dirent.obj \
|
||||
$(OUTDIR)/pathstuff.obj \
|
||||
$(guile)
|
||||
|
||||
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
||||
$(LINK) @<<
|
||||
$(LDFLAGS) $(LIBS) $(OBJS)
|
||||
<<
|
||||
|
||||
.c{$(OUTDIR)}.obj:
|
||||
$(CC) $(CFLAGS) /c $<
|
||||
|
||||
$(OUTDIR)/glob.obj : glob/glob.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
$(OUTDIR)/fnmatch.obj : glob/fnmatch.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
$(OUTDIR)/dirent.obj : w32/compat/dirent.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
19
README.Amiga
19
README.Amiga
@@ -42,15 +42,18 @@ place). You have to use "$(wildcard src/*.c)" instead.
|
||||
COMPILING FROM SCRATCH
|
||||
----------------------
|
||||
|
||||
To recompile, you need SAS/C 6.51. make itself is not necessary, there
|
||||
is an smakefile.
|
||||
To recompile, you need SAS/C 6.51.
|
||||
|
||||
1. Copy config.ami to config.h
|
||||
2. If you use make to compile, copy Makefile.ami to Makefile and
|
||||
glob/Makefile.ami to glob/Makefile. Copy make into the current
|
||||
directory.
|
||||
As of GNU make 4.3, the build environment has been cleaned up and alternate
|
||||
make files (including smakefiles) have been removed. If you have an existing
|
||||
version of GNU make available you _should_ be able to run:
|
||||
|
||||
3. Run smake/make
|
||||
make -f Basic.mk
|
||||
|
||||
However this is untested.
|
||||
|
||||
If you have an Amiga system and would like to collaborate on getting
|
||||
bootstrapping to work properly please contact bug-make@gnu.org.
|
||||
|
||||
INSTALLATION
|
||||
|
||||
@@ -61,7 +64,7 @@ If you plan to use recursive makes, install make resident:
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
@@ -27,8 +27,8 @@ New (since 3.74) DOS-specific features:
|
||||
8. Can be built without (a previous version of) Make.
|
||||
|
||||
9. The build process requires only standard tools. (Optional
|
||||
targets like "install:" and "clean:" still need additional
|
||||
programs, though, see below.)
|
||||
targets like "check:" still need additional programs, though,
|
||||
see below.)
|
||||
|
||||
10. Beginning with v3.78, the test suite works in the DJGPP
|
||||
environment (requires Perl and auxiliary tools; see below).
|
||||
@@ -55,78 +55,34 @@ To build from sources:
|
||||
either DJTAR (which is part of the DJGPP development
|
||||
environment), or the DJGPP port of GNU Tar.
|
||||
|
||||
2. Invoke the 'configure.bat' batch file.
|
||||
2. If you have a working Make already, you can run:
|
||||
|
||||
If you are building Make in-place, i.e. in the same directory
|
||||
where its sources are kept, just type "configure.bat" and press
|
||||
[Enter]. Otherwise, you need to supply the path to the source
|
||||
directory as an argument to the batch file, like this:
|
||||
make -f Basic.mk
|
||||
|
||||
c:\djgpp\gnu\make-%VERSION%\configure.bat c:/djgpp/gnu/make-%VERSION%
|
||||
3. If you don't have a working Make already you can bootstrap one
|
||||
by running:
|
||||
|
||||
Note the forward slashes in the source path argument: you MUST
|
||||
use them here.
|
||||
.\builddos.bat
|
||||
|
||||
3. If configure.bat doesn't find a working Make, it will suggest to
|
||||
use the 'dosbuild.bat' batch file to build Make. Either do as it
|
||||
suggests or install another Make program (a pre-compiled binary
|
||||
should be available from the usual DJGPP sites) and rerun
|
||||
configure.bat.
|
||||
|
||||
4. If you will need to run Make on machines without an FPU, you
|
||||
might consider building a version of Make which doesn't issue
|
||||
floating-point instructions (they don't help much on MSDOS
|
||||
anyway). To this end, edit the Makefile created by
|
||||
configure.bat and add -DNO_FLOAT to the value of CPPFLAGS.
|
||||
|
||||
5. Invoke Make.
|
||||
|
||||
If you are building from outside of the source directory, you
|
||||
4. If you are building from outside of the source directory, you
|
||||
need to tell Make where the sources are, like this:
|
||||
|
||||
make srcdir=c:/djgpp/gnu/make-%VERSION%
|
||||
make -f c:/djgpp/gnu/make/Basic.mk SRCDIR=c:/djgpp/gnu/make
|
||||
|
||||
(configure.bat will tell you this when it finishes). You MUST
|
||||
use a full, not relative, name of the source directory here, or
|
||||
else Make might fail.
|
||||
or:
|
||||
|
||||
6. After Make finishes, if you have a Unix-style shell installed,
|
||||
you can use the 'install' target to install the package. You
|
||||
will also need GNU Fileutils and GNU Sed for this (they should
|
||||
be available from the DJGPP sites).
|
||||
c:/djgpp/gnu/make/builddos.bat c:/djgpp/gnu/make
|
||||
|
||||
By default, GNU make will install into your DJGPP installation
|
||||
area. If you wish to use a different directory, override the
|
||||
DESTDIR variable when invoking "make install", like this:
|
||||
|
||||
make install DESTDIR=c:/other/dir
|
||||
|
||||
This causes the make executable to be placed in c:/other/dir/bin,
|
||||
the man pages in c:/other/dir/man, etc.
|
||||
|
||||
Without a Unix-style shell, you will have to install programs
|
||||
and the docs manually. Copy make.exe to a directory on your
|
||||
PATH, make.i* info files to your Info directory, and update the
|
||||
file 'dir' in your Info directory by adding the following item
|
||||
to the main menu:
|
||||
|
||||
* Make: (make.info). The GNU make utility.
|
||||
|
||||
If you have the 'install-info' program (from the GNU Texinfo
|
||||
package), it will do that for you if you invoke it like this:
|
||||
|
||||
install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
|
||||
|
||||
(If your Info directory is other than C:\DJGPP\INFO, change this
|
||||
command accordingly.)
|
||||
|
||||
7. The 'clean' targets also require Unix-style shell, and GNU Sed
|
||||
and 'rm' programs (the latter from Fileutils).
|
||||
|
||||
8. To run the test suite, type "make check". This requires a Unix
|
||||
5. To run the test suite, type "make check". This requires a Unix
|
||||
shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
|
||||
and Sh-utils.
|
||||
|
||||
6. To install copy make.exe to the preferred location.
|
||||
|
||||
Since GNU make 4.3, support for customized platform installations
|
||||
has been removed. If you'd like to collaborate on reinstating
|
||||
these capabilities, contact bug-make@gnu.org.
|
||||
|
||||
|
||||
Notes:
|
||||
-----
|
||||
@@ -324,7 +280,7 @@ Bug reports:
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
@@ -160,7 +160,7 @@ from the make source tree.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
745
README.VMS
745
README.VMS
@@ -1,284 +1,515 @@
|
||||
This version of GNU make has been tested on
|
||||
OpenVMS V8.3 (Alpha) and V8.4 (Integrity).
|
||||
Overview: -*-text-mode-*-
|
||||
---------
|
||||
|
||||
Build instructions
|
||||
This version of GNU make has been tested on:
|
||||
OpenVMS V8.3/V8.4 (Alpha) and V8.4 (Integrity) AND V7.3 (VAX)
|
||||
|
||||
This version of GNU Make is intended to be run from DCL to run
|
||||
make scripts with a special syntax that is described below. It
|
||||
likely will not be able to run unmodified Unix makefiles.
|
||||
|
||||
There is an older implementation of GNU Make that was ported to GNV.
|
||||
Work is now in progress to merge that port to get a single version
|
||||
of GNU Make available. When that merge is done, GNU Make will auto
|
||||
detect that it is running under a Posix shell and then operate as close to
|
||||
GNU Make on Unix as possible.
|
||||
|
||||
The descriptions below are for running GNU make from DCL or equivalent.
|
||||
|
||||
Recipe differences:
|
||||
-------------------
|
||||
|
||||
GNU Make for OpenVMS can not currently run native Unix make files because of
|
||||
differences in the implementation.
|
||||
|
||||
I am trying to document the current behavior in this section. This is based
|
||||
on the information in the file NEWS. and running the test suite.
|
||||
TODO: More tests are needed to validate and demonstrate the OpenVMS
|
||||
expected behavior.
|
||||
|
||||
In some cases the older behavior of GNU Make when run from DCL is not
|
||||
compatible with standard makefile behavior.
|
||||
|
||||
This behavior can be changed when running GNU Make from DCL by setting
|
||||
either DCL symbols or logical names of the format GNV$. The settings
|
||||
are enabled with a string starting with one of '1', 'T', or 'E' for "1",
|
||||
"TRUE", or "ENABLE". They are disabled with a '0', 'F', or 'D' for "1",
|
||||
"FALSE", or "DISABLE". If they are not explicitly set to one of these
|
||||
values, then they will be set to their default values.
|
||||
|
||||
The value of the setting DECC$FILENAME_UNIX_REPORT or
|
||||
DECC$FILENAME_UNIX_ONLY will now cause the $(dir x) function to return
|
||||
'./' or '[]' as appropriate.
|
||||
|
||||
The name GNV$MAKE_OLD_VMS when enabled will cause GNU Make to behave as
|
||||
much as the older method as can be done with out disabling VMS features.
|
||||
When it is disabled GNU Make have the new behavior which more closely
|
||||
matches Unix Make behavior.
|
||||
|
||||
The default is currently the old behavior when running GNU Make from DCL.
|
||||
In the future this may change. When running make from GNV Bash the new
|
||||
behavior is the default.
|
||||
|
||||
This is a global setting that sets the default behavior for several other
|
||||
options that can be individually changed. Many of the individual settings
|
||||
are to make it so that the self tests for GNU Make need less VMS specific
|
||||
modifications.
|
||||
|
||||
The name GNV$MAKE_COMMA when enabled will cause GNU Make to expect a comma
|
||||
for a path separator and use a comma for the separator for a list of files.
|
||||
When disabled, it will cause GNU Make to use a colon for a path separator
|
||||
and a space for the separator for a list of files. The default is to be
|
||||
enabled if the GNU Make is set to the older behavior.
|
||||
|
||||
The name GNV$MAKE_SHELL_SIM when enabled will cause GNU Make to try to
|
||||
simulate a Posix shell more closely. The following behaviors occur:
|
||||
|
||||
* Single quotes are converted to double quotes and any double
|
||||
quotes inside of them are doubled. No environment variable expansion
|
||||
is simulated.
|
||||
* A exit command status will be converted to a Posix Exit
|
||||
where 0 is success and non-zero is failure.
|
||||
* The $ character will cause environment variable expansion.
|
||||
* Environent variables can be set on the command line before a command.
|
||||
|
||||
VMS generally uses logical name search lists instead of path variables
|
||||
where the resolution is handled by VMS independent of the program. Which
|
||||
means that it is likely that nothing will notice if the default path
|
||||
specifier is changed in the future.
|
||||
|
||||
Currently the built in VMS specific macros and recipes depend on the comma
|
||||
being used as a file list separator.
|
||||
TODO: Remove this dependency as other functions in GNU Make depend on a
|
||||
space being used as a separator.
|
||||
|
||||
The format for recipes are a combination of Unix macros, a subset of
|
||||
simulated UNIX commands, some shell emulation, and OpenVMS commands.
|
||||
This makes the resulting makefiles unique to the OpenVMS port of GNU make.
|
||||
|
||||
If you are creating a OpenVMS specific makefile from scratch, you should also
|
||||
look at MMK (Madgoat Make) available at https://github.com/endlesssoftware/mmk
|
||||
MMK uses full OpenVMS syntax and a persistent subprocess is used for the
|
||||
recipe lines, allowing multiple line rules.
|
||||
|
||||
The default makefile search order is "makefile.vms", "gnumakefile",
|
||||
"makefile". TODO: See if that lookup is case sensitive.
|
||||
|
||||
When Make is invoked from DCL, it will create a foreign command
|
||||
using the name of executable image, with any facility prefix removed,
|
||||
for the duration of the make program, so it can be used internally
|
||||
to recursively run make(). The macro MAKE_COMMAND will be set to
|
||||
this foreign command.
|
||||
|
||||
When make is launched from an exec*() command from a C program,
|
||||
the foreign command is not created. The macro MAKE_COMMAND will be
|
||||
set to the actual command passed as argv[0] to the exec*() function.
|
||||
|
||||
If the DCL symbol or logical name GNV$MAKE_USE_MCR exists, then
|
||||
the macro MAKE_COMMAND will be set to be an "MCR" command with the
|
||||
absolute path used by DCL to launch make. The foreign command
|
||||
will not be created.
|
||||
|
||||
The macro MAKE is set to be the same value as the macro MAKE_COMMAND
|
||||
on all platforms.
|
||||
|
||||
Each recipe command is normally run as a separate spawned processes,
|
||||
except for the cases documented below where a temporary DCL command
|
||||
file may be used.
|
||||
|
||||
BUG: Testing has shown that the commands in the temporary command files
|
||||
are not always created properly. This issue is still under investigation.
|
||||
|
||||
Any macros marked as exported are temporarily created as DCL symbols
|
||||
for child images to use. DCL symbol substitution is not done with these
|
||||
commands.
|
||||
Untested: Symbol substitution.
|
||||
|
||||
When a temporary DCL command file is used, DCL symbol substitution
|
||||
will work.
|
||||
|
||||
For VMS 7.3-1 and earlier, command lines are limited to 255 characters
|
||||
or 1024 characters in a command file.
|
||||
For VMS 7.3-2 and later, command lines are limited to 4059 characters
|
||||
or 8192 characters in a command file.
|
||||
|
||||
VMS limits each token of a command line to 256 characters, and limits
|
||||
a command line to 127 tokens.
|
||||
|
||||
Command lines above the limit length are written to a command file
|
||||
in sys$scratch:.
|
||||
|
||||
In order to handle Unix style extensions to VMS DCL, GNU Make has
|
||||
parsed the recipe commands and them modified them as needed. The
|
||||
parser has been re-written to resolve numerous bugs in handling
|
||||
valid VMS syntax and potential buffer overruns.
|
||||
|
||||
The new parser may need whitespace characters where DCL does not require
|
||||
it, and also may require that quotes are matched were DCL forgives if
|
||||
they are not. There is a small chance that existing VMS specific makefiles
|
||||
will be affected.
|
||||
|
||||
The '<', '>' was previously implemented using command files. Now
|
||||
GNU Make will check to see if the is already a VMS "PIPE" command and
|
||||
if it is not, will convert the command to a VMS "PIPE" command.
|
||||
|
||||
The '>>' redirection has been implemented by using a temporary command file.
|
||||
This will be described later.
|
||||
|
||||
The DCL symbol or logical name GNV$MAKE_USE_CMD_FILE when set to a
|
||||
string starting with one of '1','T', or 'E' for "1", "TRUE", or "ENABLE",
|
||||
then temporary DCL command files are always used for running commands.
|
||||
|
||||
Some recipe strings with embedded new lines will not be handled correctly
|
||||
when a command file is used.
|
||||
|
||||
GNU Make generally does text comparisons for the targets and sources. The
|
||||
make program itself can handle either Unix or OpenVMS format filenames, but
|
||||
normally does not do any conversions from one format to another.
|
||||
TODO: The OpenVMS format syntax handling is incomplete.
|
||||
TODO: ODS-5 EFS support is missing.
|
||||
BUG: The internal routines to convert filenames to and from OpenVMS format
|
||||
do not work correctly.
|
||||
|
||||
Note: In the examples below, line continuations such as a backslash may have
|
||||
been added to make the examples easier to read in this format.
|
||||
BUG: That feature does not completely work at this time.
|
||||
|
||||
Since the OpenVMS utilities generally expect OpenVMS format paths, you will
|
||||
usually have to use OpenVMS format paths for rules and targets.
|
||||
BUG: Relative OpenVMS paths may not work in targets, especially combined
|
||||
with vpaths. This is because GNU make will just concatenate the directories
|
||||
as it does on Unix.
|
||||
|
||||
The variables $^ and $@ separate files with commas instead of spaces.
|
||||
This is controlled by the name GNV$MAKE_COMMA as documented in the
|
||||
previous section.
|
||||
|
||||
While this may seem the natural thing to do with OpenVMS, it actually
|
||||
causes problems when trying to use other make functions that expect the
|
||||
files to be separated by spaces. If you run into this, you need the
|
||||
following workaround to convert the output.
|
||||
TODO: Look at have the $^ and $@ use spaces like on Unix and have
|
||||
and easy to use function to do the conversions and have the built
|
||||
in OpenVMS specific recipes and macros use it.
|
||||
|
||||
Example:
|
||||
|
||||
comma := ,
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
foo: $(addsuffix .3,$(subs $(comma),$(space),$^)
|
||||
|
||||
|
||||
Makefile variables are looked up in the current environment. You can set
|
||||
symbols or logicals in DCL and evaluate them in the Makefile via
|
||||
$(<name-of-symbol-or-logical>). Variables defined in the Makefile
|
||||
override OpenVMS symbols/logicals.
|
||||
|
||||
OpenVMS logical and symbols names show up as "environment" using the
|
||||
origin function. when the "-e" option is specified, the origion function
|
||||
shows them as "environment override". On Posix the test scripts indicate
|
||||
that they should show up just as "environment".
|
||||
|
||||
When GNU make reads in a symbol or logical name into the environment, it
|
||||
converts any dollar signs found to double dollar signs for convenience in
|
||||
using DCL symbols and logical names in recipes. When GNU make exports a
|
||||
DCL symbol for a child process, if the first dollar sign found is followed
|
||||
by second dollar sign, then all double dollar signs will be convirted to
|
||||
single dollar signs.
|
||||
|
||||
The variable $(ARCH) is predefined as IA64, ALPHA or VAX respectively.
|
||||
Makefiles for different OpenVMS systems can now be written by checking
|
||||
$(ARCH). Since IA64 and ALPHA are similar, usually just a check for
|
||||
VAX or not VAX is sufficient.
|
||||
|
||||
You may have to update makefiles that assume VAX if not ALPHA.
|
||||
|
||||
ifeq ($(ARCH),VAX)
|
||||
$(ECHO) "On the VAX"
|
||||
else
|
||||
$(ECHO) "On the ALPHA or IA64"
|
||||
endif
|
||||
|
||||
Empty commands are handled correctly and don't end in a new DCL process.
|
||||
|
||||
The exit command needs to have OpenVMS exit codes. To pass a Posix code
|
||||
back to the make script, you need to encode it by multiplying it by 8
|
||||
and then adding %x1035a002 for a failure code and %x1035a001 for a
|
||||
success. Make will interpret any posix code other than 0 as a failure.
|
||||
TODO: Add an option have simulate Posix exit commands in recipes.
|
||||
|
||||
Lexical functions can be used in pipes to simulate shell file test rules.
|
||||
|
||||
Example:
|
||||
|
||||
Posix:
|
||||
b : c ; [ -f $@ ] || echo >> $@
|
||||
|
||||
OpenVMS:
|
||||
b : c ; if f$$search("$@") then pipe open/append xx $@ ; write xx "" ; close xx
|
||||
|
||||
|
||||
You can also use pipes and turning messages off to silently test for a
|
||||
failure.
|
||||
|
||||
x = %x1035a00a
|
||||
|
||||
%.b : %.c
|
||||
<tab>pipe set mess/nofac/noiden/nosev/notext ; type $^/output=$@ || exit $(x)
|
||||
|
||||
|
||||
Runtime issues:
|
||||
|
||||
The OpenVMS C Runtime has a convention for encoding a Posix exit status into
|
||||
to OpenVMS exit codes. These status codes will have the hex value of
|
||||
0x35a000. OpenVMS exit code may also have a hex value of %x10000000 set on
|
||||
them. This is a flag to tell DCL not to write out the exit code.
|
||||
|
||||
To convert an OpenVMS encoded Posix exit status code to the original code
|
||||
You subtract %x35a000 and any flags from the OpenVMS code and divide it by 8.
|
||||
|
||||
WARNING: Backward-incompatibility!
|
||||
The make program exit now returns the same encoded Posix exit code as on
|
||||
Unix. Previous versions returned the OpenVMS exit status code if that is what
|
||||
caused the recipe to fail.
|
||||
TODO: Provide a way for scripts calling make to obtain that OpenVMS status
|
||||
code.
|
||||
|
||||
Make internally has two error codes, MAKE_FAILURE and MAKE_TROUBLE. These
|
||||
will have the error "-E-" severity set on exit.
|
||||
|
||||
MAKE_TROUBLE is returned only if the option "-q" or "--question" is used and
|
||||
has a Posix value of 1 and an OpenVMS status of %x1035a00a.
|
||||
|
||||
MAKE_FAILURE has a Posix value of 2 and an OpenVMS status of %x1035a012.
|
||||
|
||||
Output from GNU make may have single quotes around some values where on
|
||||
other platforms it does not. Also output that would be in double quotes
|
||||
on some platforms may show up as single quotes on VMS.
|
||||
|
||||
There may be extra blank lines in the output on VMS.
|
||||
https://savannah.gnu.org/bugs/?func=detailitem&item_id=41760
|
||||
|
||||
There may be a "Waiting for unfinished jobs..." show up in the output.
|
||||
|
||||
Error messages generated by Make or Unix utilities may slightly vary from
|
||||
Posix platforms. Typically the case may be different.
|
||||
|
||||
When make deletes files, on posix platforms it writes out 'rm' and the list
|
||||
of files. On VMS, only the files are writen out, one per line.
|
||||
TODO: VMS
|
||||
|
||||
There may be extra leading white space or additional or missing whitespace
|
||||
in the output of recipes.
|
||||
|
||||
GNU Make uses sys$scratch: for the tempfiles that it creates.
|
||||
|
||||
The OpenVMS CRTL library maps /tmp to sys$scratch if the TMP: logical name
|
||||
does not exist. As the CRTL may use both sys$scratch: and /tmp internally,
|
||||
if you define the TMP logical name to be different than SYS$SCRATCH:,
|
||||
you may end up with only some temporary files in TMP: and some in SYS$SCRATCH:
|
||||
|
||||
The default include directory for including other makefiles is
|
||||
SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
|
||||
SYS$LIBRARY: instead; maybe it wouldn't work that way).
|
||||
TODO: A better default may be desired.
|
||||
|
||||
If the device for a file in a recipe does not exist, on OpenVMS an error
|
||||
message of "stat: <file>: no such device or address" will be output.
|
||||
|
||||
Make ignores success, informational, or warning errors (-S-, -I-, or
|
||||
-W-). But it will stop on -E- and -F- errors. (unless you do something
|
||||
to override this in your makefile, or whatever).
|
||||
|
||||
|
||||
Unix compatibilty features:
|
||||
---------------------------
|
||||
|
||||
If the command 'echo' is seen, any single quotes on the line will be
|
||||
converted to double quotes.
|
||||
|
||||
The variable $(CD) is implemented as a built in Change Directory
|
||||
command. This invokes the 'builtin_cd' Executing a 'set default'
|
||||
recipe doesn't do the trick, since it only affects the subprocess
|
||||
spawned for that command.
|
||||
|
||||
The 'builtin_cd' is generally expected to be on its own line.
|
||||
The 'builtin_cd' either from the expansion of $(CD) or directly
|
||||
put in a recipe line will be executed before any other commands in
|
||||
that recipe line. DCL parameter substitution will not work for the
|
||||
'builtin_cd' command.
|
||||
|
||||
Putting a 'builtin_cd' in a pipeline or an IF-THEN line should not be
|
||||
done because the 'builtin_cd' is always executed
|
||||
and executed first. The directory change is persistent.
|
||||
|
||||
Unix shell style I/O redirection is supported. You can now write lines like:
|
||||
"<tab>mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt"
|
||||
|
||||
Posix shells have ":" as a null command. These are now handled.
|
||||
https://savannah.gnu.org/bugs/index.php?41761
|
||||
|
||||
A note on appending the redirected output. A simple mechanism is
|
||||
implemented to make ">>" work in action lines. In OpenVMS there is no simple
|
||||
feature like ">>" to have DCL command or program output redirected and
|
||||
appended to a file. GNU make for OpenVMS implements the redirection
|
||||
of ">>" by using a command procedure.
|
||||
|
||||
The current algorithm creates the output file if it does not exist and
|
||||
then uses the DCL open/append to extend it. SYS$OUTPUT is then directed
|
||||
to that file.
|
||||
|
||||
The implementation supports only one redirected append output to a file
|
||||
and that redirection is done before any other commands in that line
|
||||
are executed, so it redirects all output for that command.
|
||||
|
||||
The older implementation wrote the output to a temporary file in
|
||||
in sys$scratch: and then attempted to append the file to the existing file.
|
||||
The temporary file names looked like "CMDxxxxx.". Any time the created
|
||||
command procedure can not complete, this happens. Pressing Ctrl+Y to
|
||||
abort make is one case.
|
||||
|
||||
In case of Ctrl+Y the associated command procedure is left in SYS$SCRATCH:.
|
||||
The command procedures will be named gnv$make_cmd*.com.
|
||||
|
||||
The CtrlY handler now uses $delprc to delete all children. This way also
|
||||
actions with DCL commands will be stopped. As before the CtrlY handler
|
||||
then sends SIGQUIT to itself, which is handled in common code.
|
||||
|
||||
Temporary command files are now deleted in the OpenVMS child termination
|
||||
handler. That deletes them even if a Ctrl+C was pressed.
|
||||
TODO: Does the previous section about >> leaving files still apply?
|
||||
|
||||
The behavior of pressing Ctrl+C is not changed. It still has only an effect,
|
||||
after the current action is terminated. If that doesn't happen or takes too
|
||||
long, Ctrl+Y should be used instead.
|
||||
|
||||
|
||||
Build Options:
|
||||
|
||||
Added support to have case sensitive targets and dependencies but to
|
||||
still use case blind file names. This is especially useful for Java
|
||||
makefiles on VMS:
|
||||
|
||||
<TAB>.SUFFIXES :
|
||||
<TAB>.SUFFIXES : .class .java
|
||||
<TAB>.java.class :
|
||||
<TAB><TAB>javac "$<"
|
||||
<TAB>HelloWorld.class : HelloWorld.java
|
||||
|
||||
A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
|
||||
It needs to be enabled to get this feature; default is disabled.
|
||||
TODO: This should be a run-time setting based on if the process
|
||||
has been set to case sensitive.
|
||||
|
||||
|
||||
Unimplemented functionality:
|
||||
|
||||
The new feature "Loadable objects" is not yet supported. If you need it,
|
||||
please send a change request or submit a bug report.
|
||||
|
||||
The new option --output-sync (-O) is accepted but has no effect: GNU make
|
||||
for OpenVMS does not support running multiple commands simultaneously.
|
||||
|
||||
|
||||
Self test failures and todos:
|
||||
-----------------------------
|
||||
|
||||
The test harness can not handle testing some of the VMS specific modes
|
||||
because of the features needed for to be set for the Perl to run.
|
||||
Need to find a way to set the VMS features before running make as a
|
||||
child.
|
||||
|
||||
GNU make was not currently translating the OpenVMS encoded POSIX values
|
||||
returned to it back to the Posix values. I have temporarily modified the
|
||||
Perl test script to compensate for it. This should be being handled
|
||||
internally to Make.
|
||||
TODO: Verify and update the Perl test script.
|
||||
|
||||
The features/parallelism test was failing. OpenVMS is executing the rules
|
||||
in sequence not in parallel as this feature was not implemented.
|
||||
GNU Make on VMS no longer claims it is implemented.
|
||||
TODO: Implement it.
|
||||
|
||||
Symlink support is not present. Symlinks are supported by OpenVMS 8.3 and
|
||||
later.
|
||||
|
||||
Error messages should be supressed with the "-" at the beginning of a line.
|
||||
On openVMS they were showing up. TODO: Is this still an issue?
|
||||
|
||||
The internal vmsify and unixify OpenVMS to/from UNIX are not handling logical
|
||||
names correctly.
|
||||
|
||||
|
||||
Build instructions:
|
||||
------------------
|
||||
|
||||
Don't use the HP C V7.2-001 compiler, which has an incompatible change
|
||||
how __STDC__ is defined. This results at least in compile time warnings.
|
||||
|
||||
Make a 1st version
|
||||
$ @makefile.com ! ignore any compiler and/or linker warning
|
||||
$ copy make.exe 1st-make.exe
|
||||
Use the 1st version to generate a 2nd version
|
||||
|
||||
Use the 1st version to generate a 2nd version as a test.
|
||||
$ mc sys$disk:[]1st-make clean ! ignore any file not found messages
|
||||
$ mc sys$disk:[]1st-make
|
||||
Verify your 2nd version
|
||||
|
||||
Verify your 2nd version by building Make again.
|
||||
$ copy make.exe 2nd-make.exe
|
||||
$ mc sys$disk:[]2nd-make clean
|
||||
$ mc sys$disk:[]2nd-make
|
||||
Don't use the HP C V7.2-001 compiler, which has an incompatible change
|
||||
how __STDC__ is defined. This results at least in compile time warnings.
|
||||
|
||||
Changes since GNU make 3.82
|
||||
---------------------------
|
||||
|
||||
Fix build problems.
|
||||
|
||||
The new feature "Loadable objects" is not yet supported. If you need it,
|
||||
please send a change request or submit a bug report.
|
||||
Running the tests:
|
||||
------------------
|
||||
|
||||
The new option --output-sync (-O) is accepted but has no effect: GNU make
|
||||
for VMS does not support running multiple commands simultaneously.
|
||||
|
||||
Changes for GNU make 3.82
|
||||
Running the tests on OpenVMS requires the following software to be installed
|
||||
as most of the tests are Unix oriented.
|
||||
|
||||
Michael Gehre (at VISTEC-SEMI dot COM) supplied a fix for a problem with
|
||||
timestamps of object modules in OLBs. The timestamps were not correctly
|
||||
adjusted to GMT based time, if the local VMS time was using a daylight saving
|
||||
algorithm and if daylight saving was switched off.
|
||||
* Perl 5.18 or later.
|
||||
https://sourceforge.net/projects/vmsperlkit/files/
|
||||
* GNV 2.1.3 + Updates including a minimum of:
|
||||
* Bash 4.3.30
|
||||
* ld_tools 3.0.2
|
||||
* coreutils 8.21
|
||||
https://sourceforge.net/p/gnv/wiki/InstallingGNVPackages/
|
||||
https://sourceforge.net/projects/gnv/files/
|
||||
|
||||
John Eisenbraun (at HP dot COM) supplied fixes and and an enhancement to append
|
||||
output redirection in action lines.
|
||||
As the test scripts need to create some foreign commands that persist
|
||||
after the test is run, it is recommend that either you use a subprocess or
|
||||
a dedicated login to run the tests.
|
||||
|
||||
Rework of ctrl+c and ctrl+y handling.
|
||||
To get detailed information for running the tests:
|
||||
|
||||
Fix a problem with cached strings, which showed on case-insensitive file
|
||||
systems.
|
||||
$ set default [.tests]
|
||||
$ @run_make_tests help
|
||||
|
||||
Build fixes for const-ified code in VMS specific sources.
|
||||
Running the script with no parameters will run all the tests.
|
||||
|
||||
A note on appending the redirected output. With this change, a simple mechanism
|
||||
is implemented to make ">>" work in action lines. In VMS there is no simple
|
||||
feature like ">>" to have DCL command or program output redirected and appended
|
||||
to a file. GNU make for VMS already implements the redirection of output. If
|
||||
such a redirection is detected, an ">" on the action line, GNU make creates a
|
||||
DCL command procedure to execute the action and to redirect its output. Based
|
||||
on that, now ">>" is also recognized and a similar but different command
|
||||
procedure is created to implement the append. The main idea here is to create a
|
||||
temporary file which collects the output and which is appended to the wanted
|
||||
output file. Then the temporary file is deleted. This is all done in the
|
||||
command procedure to keep changes in make small and simple. This obviously has
|
||||
some limitations but it seems good enough compared with the current ">"
|
||||
implementation. (And in my opinion, redirection is not really what GNU make has
|
||||
to do.) With this approach, it may happen that the temporary file is not yet
|
||||
appended and is left in SYS$SCRATCH. The temporary file names look like
|
||||
"CMDxxxxx.". Any time the created command procedure can not complete, this
|
||||
happens. Pressing Ctrl+Y to abort make is one case. In case of Ctrl+Y the
|
||||
associated command procedure is left in SYS$SCRATCH as well. Its name is
|
||||
CMDxxxxx.COM.
|
||||
After the the test script has been run once in a session, assuming
|
||||
that you built make in sys$disk:[make], you can redefined the
|
||||
"bin" logical name as follows:
|
||||
|
||||
Change in the Ctrl+Y handling. The CtrlY handler now uses $delprc to delete all
|
||||
children. This way also actions with DCL commands will be stopped. As before
|
||||
the CtrlY handler then sends SIGQUIT to itself, which is handled in common
|
||||
code.
|
||||
$ define bin sys$disk:[make],gnv$gnu:[bin]
|
||||
|
||||
Change in deleteing temporary command files. Temporary command files are now
|
||||
deleted in the vms child termination handler. That deletes them even if
|
||||
a Ctrl+C was pressed.
|
||||
Then you can use Perl to run the scripts.
|
||||
|
||||
The behavior of pressing Ctrl+C is not changed. It still has only an effect,
|
||||
after the current action is terminated. If that doesn't happen or takes too
|
||||
long, Ctrl+Y should be used instead.
|
||||
|
||||
Changes for GNU make 3.80
|
||||
$ perl run_make_tests.pl
|
||||
|
||||
. In default.c define variable ARCH as IA64 for VMS on Itanium systems.
|
||||
|
||||
. In makefile.vms avoid name collision for glob and globfree.
|
||||
|
||||
This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
|
||||
Acknowlegements:
|
||||
----------------
|
||||
|
||||
It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
|
||||
by Klaus Kämpf <kkaempf@rmi.de>, the code was based on the VMS port of
|
||||
GNU Make 3.60 by Mike Moretti.
|
||||
See NEWS. for details of past changes.
|
||||
|
||||
It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
|
||||
tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
|
||||
versions of DECC were used. VAXC was tried: it fails; but it doesn't
|
||||
seem worth to get it working. There are still some PTRMISMATCH warnings
|
||||
during the compile. Although perl is working on VMS the test scripts
|
||||
don't work. The function $shell is still missing.
|
||||
These are the currently known contributers to this port.
|
||||
|
||||
There is a known bug in some of the VMS CRTLs. It is in the shipped
|
||||
versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
|
||||
available ECOs for VMS V7.1 and newer versions. It is fixed in versions
|
||||
shipped with newer VMS versions and all ECO kits after October 1999. It
|
||||
only shows up during the daylight saving time period (DST): stat()
|
||||
returns a modification time 1 hour ahead. This results in GNU make
|
||||
warning messages. For a just created source you will see:
|
||||
|
||||
$ gmake x.exe
|
||||
gmake.exe;1: *** Warning: File 'x.c' has modification time in the future (940582863 > 940579269)
|
||||
cc /obj=x.obj x.c
|
||||
link x.obj /exe=x.exe
|
||||
gmake.exe;1: *** Warning: Clock skew detected. Your build may be incomplete.
|
||||
|
||||
|
||||
New in 3.78.1:
|
||||
|
||||
Fix a problem with automatically remaking makefiles. GNU make uses an
|
||||
execve to restart itself after a successful remake of the makefile. On
|
||||
UNIX systems execve replaces the running program with a new one and
|
||||
resets all signal handling to the default. On VMS execve creates a child
|
||||
process, signal and exit handlers of the parent are still active, and,
|
||||
unfortunately, corrupt the exit code from the child. Fix in job.c:
|
||||
ignore SIGCHLD.
|
||||
|
||||
Added some switches to reflect latest features of DECC. Modifications in
|
||||
makefile.vms.
|
||||
|
||||
Set some definitions to reflect latest features of DECC. Modifications in
|
||||
config.h-vms (which is copied to config.h).
|
||||
|
||||
Added extern strcmpi declaration to avoid 'implicitly declared' messages.
|
||||
Modification in make.h.
|
||||
|
||||
Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
|
||||
Compaq c/c++ compilers. Modifications in default.c.
|
||||
|
||||
Usage of opendir() and friends, suppress file version. Modifications in dir.c.
|
||||
|
||||
Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
|
||||
Modifications in job.c.
|
||||
|
||||
Added support to have case sensitive targets and dependencies but to
|
||||
still use case blind file names. This is especially useful for Java
|
||||
makefiles on VMS:
|
||||
|
||||
.SUFFIXES :
|
||||
.SUFFIXES : .class .java
|
||||
.java.class :
|
||||
javac "$<
|
||||
HelloWorld.class : HelloWorld.java
|
||||
|
||||
A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
|
||||
It needs to be enabled to get this feature; default is disabled. The
|
||||
macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
|
||||
Modifications in file.c and config.h-vms.
|
||||
|
||||
Bootstrap make to start building make is still makefile.com, but make
|
||||
needs to be re-made with a make to make a correct version: ignore all
|
||||
possible warnings, delete all objects, rename make.exe to a different
|
||||
name and run it.
|
||||
|
||||
Made some minor modifications to the bootstrap build makefile.com.
|
||||
|
||||
This is the VMS port of GNU Make.
|
||||
|
||||
It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
|
||||
|
||||
This port was done by Klaus Kämpf <kkaempf@rmi.de>
|
||||
|
||||
There is first-level support available from proGIS Software, Germany.
|
||||
Visit their web-site at http://www.progis.de to get information
|
||||
about other vms software and forthcoming updates to gnu make.
|
||||
|
||||
New for 3.77:
|
||||
|
||||
/bin/sh style I/O redirection is supported. You can now write lines like
|
||||
mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
|
||||
|
||||
Makefile variables are looked up in the current environment. You can set
|
||||
symbols or logicals in DCL and evaluate them in the Makefile via
|
||||
$(<name-of-symbol-or-logical>). Variables defined in the Makefile
|
||||
override VMS symbols/logicals !
|
||||
|
||||
Functions for file names are working now. See the GNU Make manual for
|
||||
$(dir ...) and $(wildcard ...). Unix-style and VMS-style names are
|
||||
supported as arguments.
|
||||
|
||||
The default rules are set up for GNU C. Building an executable from a
|
||||
single source file is as easy as 'make file.exe'.
|
||||
|
||||
The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
|
||||
different VMS systems can now be written by checking $(ARCH) as in
|
||||
ifeq ($(ARCH),ALPHA)
|
||||
$(ECHO) "On the Alpha"
|
||||
else
|
||||
$(ECHO) "On the VAX"
|
||||
endif
|
||||
|
||||
Command lines of excessive length are correctly broken and written to a
|
||||
batch file in sys$scratch for later execution. There's no limit to the
|
||||
lengths of commands (and no need for .opt files :-) any more.
|
||||
|
||||
Empty commands are handled correctly and don't end in a new DCL process.
|
||||
|
||||
|
||||
New for 3.76:
|
||||
|
||||
John W. Eaton has updated the VMS port to support libraries and VPATH.
|
||||
|
||||
|
||||
To build Make, simply type @makefile. This should compile all the
|
||||
necessary files and link Make. There is also a file called
|
||||
makefile.vms. If you already have GNU Make built you can just use
|
||||
Make with this makefile to rebuild.
|
||||
|
||||
Here are some notes about GNU Make for VMS:
|
||||
|
||||
The cd command is supported if it's called as $(CD). This invokes
|
||||
the 'builtin_cd' command which changes the directory.
|
||||
Calling 'set def' doesn't do the trick, since a sub-shell is
|
||||
spawned for this command, the directory is changed *in this sub-shell*
|
||||
and the sub-shell ends.
|
||||
|
||||
Libraries are not supported. They were in GNU Make 3.60 but somehow I
|
||||
didn't care porting the code. If there is enough interest, I'll do it at
|
||||
some later time.
|
||||
|
||||
The variable $^ separates files with commas instead of spaces (It's the
|
||||
natural thing to do for VMS).
|
||||
|
||||
See defaults.c for VMS default suffixes and my definitions for default
|
||||
rules and variables.
|
||||
|
||||
The shell function is not implemented yet.
|
||||
|
||||
Load average routines haven't been implemented for VMS yet.
|
||||
|
||||
The default include directory for including other makefiles is
|
||||
SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
|
||||
SYS$LIBRARY: instead; maybe it wouldn't work that way).
|
||||
|
||||
The default makefiles make looks for are: makefile.vms, gnumakefile,
|
||||
makefile., and gnumakefile. .
|
||||
|
||||
The stat() function and handling of time stamps in VMS is broken, so I
|
||||
replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
|
||||
somewhere in the future. Be warned, the time resolution inside make is
|
||||
less than what vms provides. This might be a problem on the faster Alphas.
|
||||
|
||||
You can use a : in a filename only if you precede it with a backslash ('\').
|
||||
E.g.- hobbes\:[bogas.files]
|
||||
|
||||
Make ignores success, informational, or warning errors (-S-, -I-, or
|
||||
-W-). But it will stop on -E- and -F- errors. (unless you do something
|
||||
to override this in your makefile, or whatever).
|
||||
|
||||
Remote stuff isn't implemented yet.
|
||||
|
||||
Multiple line DCL commands, such as "if" statements, must be put inside
|
||||
command files. You can run a command file by using \@.
|
||||
|
||||
|
||||
VMS changes made for 3.74.3
|
||||
|
||||
Lots of default settings are adapted for VMS. See default.c.
|
||||
|
||||
Long command lines are now converted to command files.
|
||||
|
||||
Comma (',') as a separator is now allowed. See makefile.vms for an example.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
Hartmut Becker
|
||||
John Malmberg
|
||||
Michael Gehre
|
||||
John Eisenbraun
|
||||
Klaus Kaempf
|
||||
Mike Moretti
|
||||
John W. Eaton
|
||||
|
||||
@@ -1,52 +1,44 @@
|
||||
This version of GNU make has been tested on
|
||||
Microsoft Windows 2000/XP/2003/Vista/7/2008.
|
||||
This version of GNU make has been tested on:
|
||||
Microsoft Windows 2000/XP/2003/Vista/7/8/10
|
||||
It has also been used on Windows 95/98/NT, and on OS/2.
|
||||
|
||||
It builds with the MinGW port of GCC (tested with GCC 3.4.2).
|
||||
It builds with the MinGW port of GCC (tested with GCC 3.4.2, 4.8.1,
|
||||
and 4.9.3).
|
||||
|
||||
It also builds with MSVC 2.x, 4.x, 5.x, 6.x, and 2003 as well as
|
||||
with .NET 7.x and .NET 2003.
|
||||
It also builds with MSVC 2.x, 4.x, 5.x, 6.x, 2005, 2008, 2010, 2012,
|
||||
2013, and 2015 as well as with .NET 7.x and .NET 2003.
|
||||
|
||||
As of version 4.0, a build with Guile is supported (tested with Guile
|
||||
2.0.3). To build with Guile, you will need, in addition to Guile
|
||||
itself, its dependency libraries and the pkg-config program. The
|
||||
latter is used to figure out which compilation and link switches and
|
||||
libraries need to be mentioned on the compiler command lines to
|
||||
correctly link with Guile. A Windows port of pkg-config can be found
|
||||
on the Windows download page of the GTK+ project:
|
||||
Building with Guile is supported (tested with Guile 2.0.x). To build
|
||||
with Guile, you will need, in addition to Guile itself, its dependency
|
||||
libraries and the pkg-config program. The latter is used to figure out
|
||||
which compilation and link switches and libraries need to be mentioned
|
||||
on the compiler command lines to correctly link with Guile. A Windows
|
||||
port of pkg-config can be found on ezwinports site:
|
||||
|
||||
http://www.gtk.org/download/win32.php
|
||||
http://sourceforge.net/projects/ezwinports/
|
||||
|
||||
The libraries on which Guile depends can vary depending on your
|
||||
version and build of Guile. At the very least, the Boehm's GC library
|
||||
will be needed, and typically also GNU MP, libffi, libunistring, and
|
||||
libtool's libltdl. Whoever built the port of Guile you have should
|
||||
also provide you with these dependencies or a URL where to download
|
||||
them.
|
||||
them. A precompiled 32-bit Windows build of Guile is available from
|
||||
the ezwinports site mentioned above.
|
||||
|
||||
The Windows 32-bit port of GNU make is maintained jointly by various
|
||||
people. It was originally made by Rob Tulloh.
|
||||
The Windows port of GNU make is maintained jointly by various people.
|
||||
It was originally made by Rob Tulloh.
|
||||
It is currently maintained by Eli Zaretskii.
|
||||
|
||||
|
||||
Do this first, regardless of the build method you choose:
|
||||
---------------------------------------------------------
|
||||
|
||||
1. At the Windows command prompt run:
|
||||
|
||||
if not exist NMakefile copy NMakefile.template NMakefile
|
||||
if not exist config.h copy config.h.W32 config.h
|
||||
|
||||
Then edit config.h to your liking (especially the few shell-related
|
||||
1. Edit config.h.W32 to your liking (especially the few shell-related
|
||||
defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds
|
||||
to './configure --enable-case-insensitive-file-system').
|
||||
|
||||
|
||||
Using make_msvc_net2003.vcproj
|
||||
------------------------------
|
||||
|
||||
2. Open make_msvc_net2003.vcproj in MSVS71 or MSVC71 or any compatible IDE,
|
||||
then build this project as usual. There's also a solution file for
|
||||
Studio 2003.
|
||||
to './configure --enable-case-insensitive-file-system'). (We don't
|
||||
recommend to define HAVE_CASE_INSENSITIVE_FS, but you may wish to
|
||||
consider that if you have a lot of files whose names are in upper
|
||||
case, while Makefile rules are written for lower-case versions.)
|
||||
|
||||
|
||||
Building with (MinGW-)GCC using build_w32.bat
|
||||
@@ -55,41 +47,110 @@ Building with (MinGW-)GCC using build_w32.bat
|
||||
2. Open a W32 command prompt for your installed (MinGW-)GCC, setup a
|
||||
correct PATH and other environment variables for it, then execute ...
|
||||
|
||||
build_w32.bat gcc
|
||||
.\build_w32.bat gcc
|
||||
|
||||
This produces gnumake.exe in the current directory.
|
||||
This produces gnumake.exe in the GccRel directory.
|
||||
|
||||
If you want a version of GNU make built with debugging enabled,
|
||||
add the --debug option. Output goes into the GccDebug directory.
|
||||
|
||||
The batch file will probe for Guile installation, and will build
|
||||
gnumake.exe with Guile if it finds it. If you have Guile
|
||||
installed, but want to build Make without Guile support, type
|
||||
|
||||
build_w32.bat --without-guile gcc
|
||||
.\build_w32.bat --without-guile gcc
|
||||
|
||||
|
||||
Building with (MSVC++-)cl using build_w32.bat or NMakefile
|
||||
----------------------------------------------------------
|
||||
Building with (MSVC++-)cl using build_w32.bat
|
||||
---------------------------------------------
|
||||
|
||||
2. Open a W32 command prompt for your installed (MSVC++-)cl, setup a
|
||||
correct PATH and other environment variables for it (usually via
|
||||
executing vcvars32.bat or vsvars32.bat from the cl-installation,
|
||||
e.g. "%VS71COMNTOOLS%vsvars32.bat"; or using a corresponding start
|
||||
menue entry from the cl-installation), then execute EITHER ...
|
||||
2. Open a command shell, then execute ...
|
||||
|
||||
build_w32.bat
|
||||
.\build_w32.bat
|
||||
|
||||
(this produces WinDebug/gnumake.exe and WinRel/gnumake.exe)
|
||||
This produces a 64bit Release build of gnumake.exe in .\WinRel, using
|
||||
the compiler found on the %Path%. If no compiler is found, the batch
|
||||
file will probe your system and choose the newest MSVC version it can
|
||||
find.
|
||||
|
||||
... OR ...
|
||||
If you want a 32bit version of GNU make, add the --x86 option.
|
||||
|
||||
nmake /f NMakefile
|
||||
|
||||
(this produces WinDebug/make.exe and WinRel/make.exe).
|
||||
If you want a Debug build of GNU make, add the --debug option. Output
|
||||
will go into the .\WinDebug directory.
|
||||
|
||||
The batch file will probe for Guile installation, and will build
|
||||
gnumake.exe with Guile if it finds it. If you have Guile
|
||||
installed, but want to build Make without Guile support, type
|
||||
gnumake.exe with Guile if it finds it. If Guile is installed,
|
||||
but you prefer to build GNU make without Guile support, add the
|
||||
--without-guile option.
|
||||
|
||||
|
||||
Building with (MinGW-)GCC using GNU make
|
||||
----------------------------------------
|
||||
|
||||
2. If you already have a version of GNU make available you can use it
|
||||
to build this version. Open a W32 command prompt for your installed
|
||||
(MinGW-)GCC, setup a correct PATH and other environment variables
|
||||
for it, then execute ...
|
||||
|
||||
make -f Basic.mk TOOLCHAIN=gcc
|
||||
|
||||
This produces GccRel\gnumake.exe.
|
||||
If you want a version of GNU make built with debugging enabled,
|
||||
add the TARGET_TYPE=debug option:
|
||||
|
||||
make -f Basic.mk TOOLCHAIN=gcc TARGET_TYPE=debug
|
||||
|
||||
The makefile doesn't support Guile integration. Use build_w32.bat
|
||||
if you want to build with Guile support.
|
||||
|
||||
|
||||
Building with (MSVC++-)cl using GNU make
|
||||
----------------------------------------
|
||||
|
||||
2. If you already have a version of GNU make available you can use it
|
||||
to build this version. Open a W32 command prompt for your installed
|
||||
(MSVC++-)cl, setup a correct PATH and other environment variables
|
||||
for it (usually via executing vcvars32.bat or vsvars32.bat from the
|
||||
cl-installation, or using a corresponding start menu entry from the
|
||||
cl-installation), then execute ...
|
||||
|
||||
make -f Basic.mk
|
||||
|
||||
This produces an optimized WinRel/gnumake.exe.
|
||||
If you want a version of GNU make built with debugging enabled,
|
||||
add the TARGET_TYPE=debug option:
|
||||
|
||||
make -f Basic.mk TARGET_TYPE=debug
|
||||
|
||||
The makefile doesn't support Guile integration. Use build_w32.bat
|
||||
if you want to build with Guile support.
|
||||
|
||||
|
||||
Running the test suite
|
||||
----------------------
|
||||
|
||||
3. You will need an installation of Perl. Be sure to use a relatively
|
||||
modern version: older versions will sometimes throw spurious errors.
|
||||
|
||||
To run the suite after building using GNU make, use:
|
||||
|
||||
make -f Basic.mk check
|
||||
|
||||
Alternatively if you'd like to run tests by hand, use:
|
||||
|
||||
cd tests
|
||||
.\run_make_tests.bat -make <path-to-make>
|
||||
|
||||
I've found <path-to-make> seems to want forward-slashes in the path.
|
||||
For example if building with .\build_w32.bat non-debug, use:
|
||||
|
||||
cd tests
|
||||
.\run_make_tests.bat -make ../WinRel/gnumake.exe
|
||||
|
||||
I've tested this with the MSYS2 shell and POSIX tools installation
|
||||
that you get by installing Git for Windows.
|
||||
|
||||
|
||||
build_w32.bat --without-guile
|
||||
|
||||
-------------------
|
||||
-- Notes/Caveats --
|
||||
@@ -147,10 +208,8 @@ GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
|
||||
|
||||
Support for parallel builds
|
||||
|
||||
Parallel builds (-jN) are supported in this port, with 1
|
||||
limitation: The number of concurrent processes has a hard
|
||||
limit of 64, due to the way this port implements waiting for
|
||||
its subprocesses.
|
||||
Parallel builds (-jN) are supported in this port. The number of
|
||||
concurrent processes has a hard limit of 4095.
|
||||
|
||||
GNU make and Cygnus GNU Windows32 tools:
|
||||
|
||||
@@ -204,13 +263,6 @@ GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
|
||||
both Unix and Windows systems, then no ifdef'ing will be
|
||||
necessary in the makefile source.
|
||||
|
||||
GNU make test suite:
|
||||
|
||||
I verified all functionality with a slightly modified version
|
||||
of make-test-%VERSION% (modifications to get test suite to run
|
||||
on Windows NT). All tests pass in an environment that includes
|
||||
sh.exe. Tests were performed on both Windows NT and Windows 95.
|
||||
|
||||
Pathnames and white space:
|
||||
|
||||
Unlike Unix, Windows 95/NT systems encourage pathnames which
|
||||
@@ -293,7 +345,7 @@ Bug reports:
|
||||
is described in the GNU make manual and the base README.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
@@ -96,7 +96,7 @@ SunOS 4.1.x:
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1998-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
230
README.git
230
README.git
@@ -1,7 +1,7 @@
|
||||
-*-text-*-
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -31,12 +31,17 @@ make source code via Git from the FSF's Savannah project
|
||||
Changes using Git
|
||||
-----------------
|
||||
|
||||
For non-developers, please continue to provide patches as before, or if you
|
||||
For non-developers, you can continue to provide patches as before, or if you
|
||||
make a public repository I can pull from that if you prefer.
|
||||
|
||||
For developers, I'm still new to Git myself, so I don't have a ton of advice.
|
||||
In this release we will continue to create ChangeLog files by hand so please
|
||||
don't forget to update the ChangeLog.
|
||||
Starting with GNU make 4.0 we no longer keep a separate ChangeLog file in
|
||||
source control. We use the Gnulib git-to-changelog conversion script to
|
||||
convert the Git comments into ChangeLog-style entries for release. As a
|
||||
result, please format your Git comments carefully so they will look clean
|
||||
after conversion. In particular, each line of your comment will have a TAB
|
||||
added before it so be sure your comment lines are not longer than 72
|
||||
characters; prefer 70 or less. Please use standard ChangeLog formats for
|
||||
your commit messages (sans the leading TAB of course).
|
||||
|
||||
Rule #1: Don't rewrite pushed history (don't use "git push --force").
|
||||
|
||||
@@ -59,74 +64,99 @@ diff chunks in the same file. There is a video available which helps a lot.
|
||||
Coding Standards
|
||||
----------------
|
||||
|
||||
GNU make code adheres to the GNU Coding Standards. Additionally, GNU make is
|
||||
a foundational bootstrap package for the GNU project; as such it is very
|
||||
conservative about language features it expects. It should build with any C
|
||||
compiler conforming to the ANSI C89 / ISO C90 standard.
|
||||
GNU make code adheres to the GNU Coding Standards. Please use only spaces and
|
||||
no TAB characters in source code.
|
||||
|
||||
Please use only spaces and no TAB characters in source code.
|
||||
Additionally, GNU make is a foundational bootstrap package for the GNU
|
||||
project; as such it is very conservative about language features it expects.
|
||||
It should build with any C compiler conforming to the ANSI C89 / ISO C90
|
||||
standard.
|
||||
|
||||
|
||||
Building From Git
|
||||
-----------------
|
||||
Building From Git for POSIX
|
||||
---------------------------
|
||||
|
||||
To build GNU make from Git, you will need Autoconf, Automake, and
|
||||
Gettext, and any tools that those utilities require (GNU m4, Perl,
|
||||
etc.). See the configure.ac file to find the minimum versions of each
|
||||
of these tools. You will also need a copy of wget.
|
||||
To build GNU make from Git on POSIX systems such as GNU/Linux, you will
|
||||
need to install the following extra software:
|
||||
|
||||
* autoconf
|
||||
* automake >= 1.16.1
|
||||
* gettext
|
||||
* autopoint
|
||||
* pkg-config
|
||||
* texinfo (for makeinfo)
|
||||
* GCC (Clang's GCC emulation is not sufficient)
|
||||
* GNU make (POSIX make is not sufficient)
|
||||
|
||||
And any tools that those utilities require (GNU m4, etc.)
|
||||
|
||||
To run the tests you must install Perl.
|
||||
|
||||
To build a release you'll need to install lzip.
|
||||
|
||||
GNU make requires gnulib to provide some facilities. If you want to maintain
|
||||
a local installation of gnulib you can set GNULIB_SRCDIR to point to it.
|
||||
Otherwise, ./bootstrap will obtain a clone for you.
|
||||
|
||||
Unfortunately due to issues with gnulib's getloadavg, you must have automake
|
||||
1.16.1 or above. This version may not yet be available through GNU/Linux
|
||||
package managers. If you need to install from source be sure to set
|
||||
ACLOCAL_PATH to point to the pkg-config location (e.g., /usr/share/aclocal).
|
||||
|
||||
If you want to build from Git with a non-GCC compiler, add "MAKE_CFLAGS=" to
|
||||
your make command line (or at least remove any flags your compiler does not
|
||||
support).
|
||||
|
||||
When building from Git you must build in the source directory: "VPATH
|
||||
builds" from remote directories are not supported. Once you've created
|
||||
a distribution, of course, you can unpack it and do a VPATH build from
|
||||
there.
|
||||
|
||||
After checking out the code, you will need to perform these steps to get
|
||||
to the point where you can run "make".
|
||||
|
||||
|
||||
1) $ autoreconf -i
|
||||
|
||||
This rebuilds all the things that need rebuilding, installing
|
||||
missing files as symbolic links.
|
||||
|
||||
You may get warnings here about missing files like README, etc.
|
||||
Ignore them, they are harmless.
|
||||
|
||||
|
||||
2) $ ./configure
|
||||
|
||||
Generate a Makefile
|
||||
|
||||
|
||||
3) $ make update
|
||||
|
||||
Use wget to retrieve various other files that GNU make relies on,
|
||||
but does not keep in its own source tree.
|
||||
|
||||
NB: You may need GNU make to correctly perform this step; if you use
|
||||
a platform-local make you may get problems with missing files in doc/.
|
||||
After checking out the code, you will need to run the bootstrap script:
|
||||
|
||||
$ ./bootstrap
|
||||
|
||||
At this point you have successfully brought your Git copy of the GNU
|
||||
make source directory up to the point where it can be treated
|
||||
more-or-less like the official package you would get from ftp.gnu.org.
|
||||
That is, you can just run:
|
||||
|
||||
$ make && make check && make install
|
||||
$ ./configure
|
||||
$ make check
|
||||
|
||||
to build and install GNU make.
|
||||
to build and test GNU make.
|
||||
|
||||
NOTE! This method builds GNU make in "maintainer mode". Make programs built
|
||||
in this mode it will be slower, possibly MUCH slower: there are various
|
||||
sanity checks enabled. Further this mode assumes a modern GCC, GNU
|
||||
libc, and well-formed system headers and enables a high level of
|
||||
warnings AND enables -Werror to turn warnings into failures.
|
||||
|
||||
If you want to build from Git with "maintainer mode" disabled, add
|
||||
"MAKE_MAINTAINER_MODE=" to the make command line. If you want to turn
|
||||
off the extra warning flags, add "MAKE_CFLAGS=" to the make command
|
||||
line.
|
||||
|
||||
For example:
|
||||
$ ./configure
|
||||
$ make check MAKE_MAINTAINER_MODE= MAKE_CFLAGS=
|
||||
$ make install
|
||||
|
||||
|
||||
Windows builds from Git
|
||||
-----------------------
|
||||
Building From Git for Windows
|
||||
-----------------------------
|
||||
|
||||
If you have a UNIX emulation like CYGWIN you can opt to run the general
|
||||
build procedure above; it will work. Be sure to read
|
||||
README.W32.template for information on options you might want to use
|
||||
when running ./configure.
|
||||
build procedure above; it will work. Consult README.W32.template for
|
||||
information on options you might want to use when running ./configure.
|
||||
|
||||
If you can't or don't want to do that, then rename the file
|
||||
README.W32.template to README.W32 and follow those instructions.
|
||||
If you can't or don't want to do that, then first run the .\bootstrap.bat
|
||||
script to prime your Git workspace:
|
||||
|
||||
> .\bootstrap.bat
|
||||
|
||||
Next, rename the file README.W32.template to README.W32 and follow those
|
||||
instructions.
|
||||
|
||||
|
||||
Creating a Package
|
||||
@@ -140,47 +170,69 @@ run:
|
||||
|
||||
and, if you like:
|
||||
|
||||
$ make dist-bzip2
|
||||
$ make dist-lzip
|
||||
|
||||
Even better, you should run this:
|
||||
|
||||
$ make distcheck
|
||||
|
||||
Which will build both .gz and .bz2 package files, then unpack them into
|
||||
a temporary location, try to build them, and repack them, verifying that
|
||||
everything works, you get the same results, _and_ no extraneous files
|
||||
are left over after the "distclean" rule--whew!! Now, _that_ is why
|
||||
converting to Automake is worth the trouble! A big "huzzah!" to Tom
|
||||
T. and the AutoToolers!
|
||||
Which will build both .gz and .lz package files, then unpack one into a
|
||||
temporary location, try to build it and repack it, then verifying that
|
||||
everything works, you get the same results, _and_ no extraneous files are
|
||||
left over after the "distclean" rule.
|
||||
|
||||
This package can be unpacked and built to give a "normal" (non-maintainer
|
||||
mode) result.
|
||||
|
||||
|
||||
Steps to Release
|
||||
----------------
|
||||
|
||||
Here are the things that need to be done (in more or less this order)
|
||||
before making an official release:
|
||||
before making an official release. If something breaks such that you need to
|
||||
change code, be sure to start over again sufficiently that everything is
|
||||
consistent (that's why we don't finalize the Git tag, etc. until the end).
|
||||
|
||||
* Update the configure.ac file with the new release number.
|
||||
* Update the EDITION value in the doc/make.texi file.
|
||||
* Update the NEWS file with the release number and date.
|
||||
* Ensure the Savannah bug list URL in the NEWS file uses the correct
|
||||
"Fixed Release" ID number.
|
||||
* Run "make distcheck" to be sure it all works.
|
||||
* Run "make check-alt-config" to be sure alternative configurations work
|
||||
* Run "make update-makeweb" to get a copy of the GNU make web pages
|
||||
* Run "make update-gnuweb" to get a copy of the GNU website boilerplate pages
|
||||
* Update the web page boilerplate if necessary:
|
||||
../gnu-www/www/server/standards/patch-from-parent ../make-web/make.html \
|
||||
../gnu-www/www/server/standards/boilerplate.html
|
||||
* Run "make gendocs" (requires gnulib) to generate the manual files for
|
||||
the GNU make web pages.
|
||||
* Follow the directions from gendocs for the web page repository
|
||||
* run "make tag-release" to create a Git tag for the release
|
||||
* Push everything:
|
||||
git push --tags origin master
|
||||
|
||||
Manage the Savannah project for GNU make:
|
||||
|
||||
>>> This is only for real releases, not release candidate builds <<<
|
||||
|
||||
* In Savannah modify the "Value", "Rank", and "Description" values for the
|
||||
current "SCM" entry in both "Component Version" and "Fix Release" fields
|
||||
to refer to the new release, for "Bugs" and "Patches".
|
||||
* Update the Savannah bug list URL in the NEWS file to use the correct
|
||||
"Fixed Release" ID number.
|
||||
to refer to the new release. The "Rank" field should be 10 less than the
|
||||
previous release so it orders properly.
|
||||
* In Savannah create a new entry for the "Component Version" and "Fix
|
||||
Release" fields:
|
||||
- Value: SCM
|
||||
- Rank: 20
|
||||
- Descr: Fixed in Git; will be available in the next version of Make.
|
||||
* Run "make distcheck" to be sure it all works.
|
||||
* git tag -u <GPGID> <VER> where GPGID is my GPG key fingerprint,
|
||||
and VER is the release version.
|
||||
* Push everything:
|
||||
git push --tags origin master
|
||||
* Create the new release in the Savannah "Bugs" Administration for
|
||||
both the "Component Version" and "Fixed Release" fields.
|
||||
* Create the new release in the Savannah "Patches" Administration for
|
||||
the "Fixed Release" field.
|
||||
- Descr: Issues found in code retrieved from Source Code Management (Git), rather than a distributed version. Please include the SHA you are working with.
|
||||
|
||||
- Descr: Fixed in Source Code Management (Git). The fix will be included in the next release of GNU make.
|
||||
|
||||
Start the next release:
|
||||
|
||||
* Update configure.ac and add a ".90" to the release number.
|
||||
* Update the NEWS file with a new section for the release / date.
|
||||
* Update the Savannah URL for the bugs fixed in the NEWS section.
|
||||
|
||||
|
||||
Publishing a Package
|
||||
@@ -220,19 +272,27 @@ work on it:
|
||||
Where to Announce
|
||||
-----------------
|
||||
|
||||
Create the announcement in a text file, then sign it with GPG.
|
||||
Create the announcement in a text file, using 'git shortlog',
|
||||
then sign it with GPG:
|
||||
|
||||
gpg --clearsign <announcement.txt>
|
||||
|
||||
Upload to gnu.org, then login and send from my account there.
|
||||
Or, use your mail client's PGP/GPG signing capabilities.
|
||||
|
||||
To: bug-make@gnu.org, help-make@gnu.org, make-w32@gnu.org
|
||||
CC: info-gnu@gnu.org
|
||||
BCC: make-alpha@gnu.org
|
||||
Announce the release:
|
||||
|
||||
Add a news item to the Savannah project site.
|
||||
* For release candidate builds:
|
||||
To: bug-make@gnu.org
|
||||
CC: coordinator@translationproject.org
|
||||
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||
|
||||
Add an update to freshmeat.net.
|
||||
* For release builds
|
||||
To: info-gnu@gnu.org, bug-make@gnu.org
|
||||
CC: coordinator@translationproject.org
|
||||
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||
|
||||
* Add a news item to the Savannah project site.
|
||||
* Add an update to freecode.com (nee freshmeat.net)
|
||||
|
||||
|
||||
Appendix A - For The Brave
|
||||
@@ -246,16 +306,10 @@ prerequisites are available of course).
|
||||
This list is eminently suitable for a quick swipe o' the mouse and a
|
||||
swift click o' mouse-2 into an xterm. Go for it!
|
||||
|
||||
autoreconf -i
|
||||
./configure
|
||||
make update
|
||||
make
|
||||
make check
|
||||
For a debugging version:
|
||||
|
||||
Or, for a debugging version:
|
||||
./bootstrap && ./configure CFLAGS=-g && make check
|
||||
|
||||
autoreconf -i && ./configure CFLAGS=-g && make update && make && make check
|
||||
For a release version
|
||||
|
||||
Or, all-in-one:
|
||||
|
||||
autoreconf -i && ./configure && make update && make && make check
|
||||
./bootstrap && ./configure && make check
|
||||
|
||||
@@ -3,21 +3,25 @@ This directory contains the %VERSION% release of GNU Make.
|
||||
See the file NEWS for the user-visible changes from previous releases.
|
||||
In addition, there have been bugs fixed.
|
||||
|
||||
Please check the system-specific notes below for any caveats related to
|
||||
your operating system.
|
||||
Please check the system-specific notes below for any caveats related to your
|
||||
operating system.
|
||||
|
||||
For general building and installation instructions, see the file INSTALL.
|
||||
If you are trying to build GNU make from a Git clone rather than a downloaded
|
||||
source distribution, see the README.git file for instructions.
|
||||
|
||||
If you need to build GNU Make and have no other 'make' program to use,
|
||||
you can use the shell script 'build.sh' instead. To do this, first run
|
||||
'configure' as described in INSTALL. Then, instead of typing 'make' to
|
||||
build the program, type 'sh build.sh'. This should compile the program
|
||||
in the current directory. Then you will have a Make program that you can
|
||||
use for './make install', or whatever else.
|
||||
For source distribution building and installation instructions, see the file
|
||||
INSTALL.
|
||||
|
||||
Some systems' Make programs are broken and cannot process the Makefile for
|
||||
GNU Make. If you get errors from your system's Make when building GNU
|
||||
Make, try using 'build.sh' instead.
|
||||
If you need to build GNU Make and have no other 'make' program to use, you can
|
||||
use the shell script 'build.sh' instead. To do this, first run 'configure' as
|
||||
described in INSTALL. Then, instead of typing 'make' to build the program,
|
||||
type 'sh build.sh'. This should compile the program in the current directory.
|
||||
Then you will have a Make program that you can use for './make install', or
|
||||
whatever else.
|
||||
|
||||
Some systems' Make programs cannot process the Makefile for GNU Make. If you
|
||||
get errors from your system's Make when building GNU Make, try using
|
||||
'build.sh' instead.
|
||||
|
||||
|
||||
GNU Make is free software. See the file COPYING for copying conditions.
|
||||
@@ -85,18 +89,19 @@ If you need help using GNU make, try these forums:
|
||||
Git Access
|
||||
----------
|
||||
|
||||
The GNU make source repository is available via Git from the
|
||||
GNU Savannah Git server; look here for details:
|
||||
The GNU make source repository is available via Git from the GNU Savannah Git
|
||||
server; look here for details:
|
||||
|
||||
http://savannah.gnu.org/git/?group=make
|
||||
|
||||
Please note: you won't be able to build GNU make from Git without
|
||||
installing appropriate maintainer's tools, such as GNU m4, automake,
|
||||
autoconf, Perl, GNU make, and GCC. See the README.git file for hints on
|
||||
how to build GNU make once these tools are available. We make no
|
||||
guarantees about the contents or quality of the latest code in the Git
|
||||
repository: it is not unheard of for code that is known to be broken to
|
||||
be checked in. Use at your own risk.
|
||||
Please note: you won't be able to build GNU make from Git without installing
|
||||
appropriate maintainer's tools, such as GNU m4, automake, autoconf, Perl, GNU
|
||||
make, and GCC.
|
||||
|
||||
See the README.git file for instructions on how to build GNU make once these
|
||||
tools are available. We make no guarantees about the contents or quality of
|
||||
the latest code in the Git repository: it is not unheard of for code that is
|
||||
known to be broken to be checked in. Use at your own risk.
|
||||
|
||||
|
||||
System-specific Notes
|
||||
@@ -155,6 +160,11 @@ Ports
|
||||
of DJGPP; see the WWW page http://www.delorie.com/djgpp/ for more
|
||||
information.
|
||||
|
||||
The Cygwin project maintains its own port of GNU make. That port may have
|
||||
patches which are not present in this version. If you are using Cygwin
|
||||
you should use their version of GNU make, and if you have questions about
|
||||
it you should start by asking on those mailing lists and forums.
|
||||
|
||||
Please note there are two _separate_ ports of GNU make for Microsoft
|
||||
systems: a native Windows tool built with (for example) MSVC or Cygwin,
|
||||
and a DOS-based tool built with DJGPP. Please be sure you are looking
|
||||
@@ -162,7 +172,7 @@ at the right README!
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
@@ -3,10 +3,10 @@ OPTIMIZE
|
||||
NOVERSION
|
||||
OPTIMIZERTIME
|
||||
OPTIMIZERALIAS
|
||||
DEFINE HAVE_CONFIG_H
|
||||
DEFINE INCLUDEDIR="include:"
|
||||
DEFINE LIBDIR="lib:"
|
||||
DEFINE NO_ALLOCA
|
||||
DEFINE NO_FLOAT
|
||||
DEFINE NO_ARCHIVES
|
||||
IGNORE=161
|
||||
IGNORE=100
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
# -*-Makefile-*- for building GNU make with smake
|
||||
#
|
||||
# NOTE: If you have no 'make' program at all to process this makefile,
|
||||
# run 'build.sh' instead.
|
||||
#
|
||||
# Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Makefile for GNU Make
|
||||
#
|
||||
|
||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||
VPATH = /make-%VERSION%/
|
||||
# This must repeat the value, because configure will remove 'VPATH = .'.
|
||||
srcdir = /make-%VERSION%/
|
||||
|
||||
CC = sc
|
||||
RM = delete
|
||||
MAKE = smake
|
||||
|
||||
CFLAGS =
|
||||
CPPFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
# Define these for your system as follows:
|
||||
# -DNO_ARCHIVES To disable 'ar' archive support.
|
||||
# -DNO_FLOAT To avoid using floating-point numbers.
|
||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||
# Some compilers apparently accept this
|
||||
# without complaint but produce losing code,
|
||||
# so beware.
|
||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||
# See also 'config.h'.
|
||||
defines =
|
||||
|
||||
# Which flavor of remote job execution support to use.
|
||||
# The code is found in 'remote-$(REMOTE).c'.
|
||||
REMOTE = stub
|
||||
|
||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||
# your C library, you can comment these out.
|
||||
GETOPT = getopt.o getopt1.o
|
||||
GETOPT_SRC = $(srcdir)getopt.c $(srcdir)getopt1.c $(srcdir)getopt.h
|
||||
|
||||
# If you are using the GNU C library, or have the GNU glob functions in
|
||||
# your C library, you can comment this out. GNU make uses special hooks
|
||||
# into the glob functions to be more efficient (by using make's directory
|
||||
# cache for globbing), so you must use the GNU functions even if your
|
||||
# system's C library has the 1003.2 glob functions already. Also, the glob
|
||||
# functions in the AIX and HPUX C libraries are said to be buggy.
|
||||
GLOB = Lib glob/glob.lib
|
||||
|
||||
# If your system doesn't have alloca, or the one provided is bad, define this.
|
||||
ALLOCA = alloca.o
|
||||
ALLOCA_SRC = $(srcdir)alloca.c
|
||||
|
||||
# If your system needs extra libraries loaded in, define them here.
|
||||
# System V probably need -lPW for alloca. HP-UX 7.0's alloca in
|
||||
# libPW.a is broken on HP9000s300 and HP9000s400 machines. Use
|
||||
# alloca.c instead on those machines.
|
||||
LOADLIBES =
|
||||
|
||||
# Any extra object files your system needs.
|
||||
extras = amiga.o
|
||||
|
||||
# Common prefix for machine-independent installed files.
|
||||
prefix =
|
||||
# Common prefix for machine-dependent installed files.
|
||||
exec_prefix =
|
||||
|
||||
# Directory to install 'make' in.
|
||||
bindir = sc:c
|
||||
# Directory to find libraries in for '-lXXX'.
|
||||
libdir = lib:
|
||||
# Directory to search by default for included makefiles.
|
||||
includedir = include:
|
||||
# Directory to install the Info files in.
|
||||
infodir = doc:
|
||||
# Directory to install the man page in.
|
||||
mandir = t:
|
||||
# Number to put on the man page filename.
|
||||
manext = 1
|
||||
# Prefix to put on installed 'make' binary file name.
|
||||
binprefix =
|
||||
# Prefix to put on installed 'make' man page file name.
|
||||
manprefix = $(binprefix)
|
||||
|
||||
# Whether or not make needs to be installed setgid.
|
||||
# The value should be either 'true' or 'false'.
|
||||
# On many systems, the getloadavg function (used to implement the '-l'
|
||||
# switch) will not work unless make is installed setgid kmem.
|
||||
install_setgid = false
|
||||
# Install make setgid to this group so it can read /dev/kmem.
|
||||
group = sys
|
||||
|
||||
# Program to install 'make'.
|
||||
INSTALL_PROGRAM = copy
|
||||
# Program to install the man page.
|
||||
INSTALL_DATA = copy
|
||||
# Generic install program.
|
||||
INSTALL = copy
|
||||
|
||||
# Program to format Texinfo source into Info files.
|
||||
MAKEINFO = makeinfo
|
||||
# Program to format Texinfo source into DVI files.
|
||||
TEXI2DVI = texi2dvi
|
||||
|
||||
# Programs to make tags files.
|
||||
ETAGS = etags -w
|
||||
CTAGS = ctags -w
|
||||
|
||||
#guile = guile.o
|
||||
|
||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||
output.o remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) \
|
||||
$(extras) $(guile)
|
||||
|
||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
|
||||
$(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h \
|
||||
$(srcdir)output.c $(srcdir)output.h \
|
||||
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
||||
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo
|
||||
|
||||
all: make
|
||||
info: make.info
|
||||
dvi: make.dvi
|
||||
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
|
||||
.PHONY: all check info dvi
|
||||
|
||||
make.info: make.texinfo
|
||||
$(MAKEINFO) -I$(srcdir) $(srcdir)make.texinfo -o make.info
|
||||
|
||||
make.dvi: make.texinfo
|
||||
$(TEXI2DVI) $(srcdir)make.texinfo
|
||||
|
||||
make.ps: make.dvi
|
||||
dvi2ps make.dvi > make.ps
|
||||
|
||||
make: $(objs) glob/glob.lib
|
||||
$(CC) Link $(LDFLAGS) $(objs) $(LOADLIBES) To make.new
|
||||
-delete quiet make
|
||||
rename make.new make
|
||||
|
||||
# -I. is needed to find config.h in the build directory.
|
||||
.c.o:
|
||||
$(CC) $(defines) IDir "" IDir $(srcdir)glob \
|
||||
$(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
|
||||
|
||||
glob/glob.lib:
|
||||
execute <<
|
||||
cd glob
|
||||
smake
|
||||
<
|
||||
|
||||
tagsrcs = $(srcs) $(srcdir)remote-*.c
|
||||
TAGS: $(tagsrcs)
|
||||
$(ETAGS) $(tagsrcs)
|
||||
tags: $(tagsrcs)
|
||||
$(CTAGS) $(tagsrcs)
|
||||
|
||||
.PHONY: install installdirs
|
||||
install:
|
||||
copy make sc:c
|
||||
|
||||
loadavg: loadavg.c config.h
|
||||
$(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
|
||||
loadavg.c $(LOADLIBES) -o $@
|
||||
|
||||
clean: glob-clean
|
||||
-$(RM) -f make loadavg *.o core make.dvi
|
||||
|
||||
distclean: clean glob-realclean
|
||||
-$(RM) -f Makefile config.h config.status build.sh
|
||||
-$(RM) -f config.log config.cache
|
||||
-$(RM) -f TAGS tags
|
||||
-$(RM) -f make.?? make.??s make.log make.toc make.*aux
|
||||
-$(RM) -f loadavg.c
|
||||
|
||||
realclean: distclean
|
||||
-$(RM) -f make.info*
|
||||
|
||||
mostlyclean: clean
|
||||
|
||||
.PHONY: glob-clean glob-realclean
|
||||
|
||||
glob-clean glob-realclean:
|
||||
execute <<
|
||||
cd glob
|
||||
smake $@
|
||||
<
|
||||
@@ -101,7 +101,7 @@ The Rest of the List
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
|
||||
503
alloca.c
503
alloca.c
@@ -1,503 +0,0 @@
|
||||
/* alloca.c -- allocate automatically reclaimed memory
|
||||
(Mostly) portable public-domain implementation -- D A Gwyn
|
||||
|
||||
This implementation of the PWB library alloca function,
|
||||
which is used to allocate space off the run-time stack so
|
||||
that it is automatically reclaimed upon procedure exit,
|
||||
was inspired by discussions with J. Q. Johnson of Cornell.
|
||||
J.Otto Tennant <jot@cray.com> contributed the Cray support.
|
||||
|
||||
There are some preprocessor constants that can
|
||||
be defined when compiling for your specific system, for
|
||||
improved efficiency; however, the defaults should be okay.
|
||||
|
||||
The general concept of this implementation is to keep
|
||||
track of all alloca-allocated blocks, and reclaim any
|
||||
that are found to be deeper in the stack than the current
|
||||
invocation. This heuristic does not reclaim storage as
|
||||
soon as it becomes invalid, but it will do so eventually.
|
||||
|
||||
As a special case, alloca(0) reclaims storage without
|
||||
allocating any. It is a good idea to use alloca(0) in
|
||||
your main control loop, etc. to force garbage collection. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef emacs
|
||||
#include "blockinput.h"
|
||||
#endif
|
||||
|
||||
/* If compiling with GCC 2, this file's not needed. */
|
||||
#if !defined (__GNUC__) || __GNUC__ < 2
|
||||
|
||||
/* If someone has defined alloca as a macro,
|
||||
there must be some other way alloca is supposed to work. */
|
||||
#ifndef alloca
|
||||
|
||||
#ifdef emacs
|
||||
#ifdef static
|
||||
/* actually, only want this if static is defined as ""
|
||||
-- this is for usg, in which emacs must undefine static
|
||||
in order to make unexec workable
|
||||
*/
|
||||
#ifndef STACK_DIRECTION
|
||||
you
|
||||
lose
|
||||
-- must know STACK_DIRECTION at compile-time
|
||||
#endif /* STACK_DIRECTION undefined */
|
||||
#endif /* static */
|
||||
#endif /* emacs */
|
||||
|
||||
/* If your stack is a linked list of frames, you have to
|
||||
provide an "address metric" ADDRESS_FUNCTION macro. */
|
||||
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
long i00afunc ();
|
||||
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||
#else
|
||||
#define ADDRESS_FUNCTION(arg) &(arg)
|
||||
#endif
|
||||
|
||||
#if __STDC__
|
||||
typedef void *pointer;
|
||||
#else
|
||||
typedef char *pointer;
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
/* Different portions of Emacs need to call different versions of
|
||||
malloc. The Emacs executable needs alloca to call xmalloc, because
|
||||
ordinary malloc isn't protected from input signals. On the other
|
||||
hand, the utilities in lib-src need alloca to call malloc; some of
|
||||
them are very simple, and don't have an xmalloc routine.
|
||||
|
||||
Non-Emacs programs expect this to call use xmalloc.
|
||||
|
||||
Callers below should use malloc. */
|
||||
|
||||
#ifndef emacs
|
||||
#define malloc xmalloc
|
||||
#endif
|
||||
extern pointer malloc ();
|
||||
|
||||
/* Define STACK_DIRECTION if you know the direction of stack
|
||||
growth for your system; otherwise it will be automatically
|
||||
deduced at run-time.
|
||||
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
|
||||
#ifndef STACK_DIRECTION
|
||||
#define STACK_DIRECTION 0 /* Direction unknown. */
|
||||
#endif
|
||||
|
||||
#if STACK_DIRECTION != 0
|
||||
|
||||
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||
|
||||
#else /* STACK_DIRECTION == 0; need run-time code. */
|
||||
|
||||
static int stack_dir; /* 1 or -1 once known. */
|
||||
#define STACK_DIR stack_dir
|
||||
|
||||
static void
|
||||
find_stack_direction (void)
|
||||
{
|
||||
static char *addr = NULL; /* Address of first 'dummy', once known. */
|
||||
auto char dummy; /* To get stack address. */
|
||||
|
||||
if (addr == NULL)
|
||||
{ /* Initial entry. */
|
||||
addr = ADDRESS_FUNCTION (dummy);
|
||||
|
||||
find_stack_direction (); /* Recurse once. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Second entry. */
|
||||
if (ADDRESS_FUNCTION (dummy) > addr)
|
||||
stack_dir = 1; /* Stack grew upward. */
|
||||
else
|
||||
stack_dir = -1; /* Stack grew downward. */
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* STACK_DIRECTION == 0 */
|
||||
|
||||
/* An "alloca header" is used to:
|
||||
(a) chain together all alloca'ed blocks;
|
||||
(b) keep track of stack depth.
|
||||
|
||||
It is very important that sizeof(header) agree with malloc
|
||||
alignment chunk size. The following default should work okay. */
|
||||
|
||||
#ifndef ALIGN_SIZE
|
||||
#define ALIGN_SIZE sizeof(double)
|
||||
#endif
|
||||
|
||||
typedef union hdr
|
||||
{
|
||||
char align[ALIGN_SIZE]; /* To force sizeof(header). */
|
||||
struct
|
||||
{
|
||||
union hdr *next; /* For chaining headers. */
|
||||
char *deep; /* For stack depth measure. */
|
||||
} h;
|
||||
} header;
|
||||
|
||||
static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||
|
||||
/* Return a pointer to at least SIZE bytes of storage,
|
||||
which will be automatically reclaimed upon exit from
|
||||
the procedure that called alloca. Originally, this space
|
||||
was supposed to be taken from the current stack frame of the
|
||||
caller, but that method cannot be made to work for some
|
||||
implementations of C, for example under Gould's UTX/32. */
|
||||
|
||||
pointer
|
||||
alloca (unsigned size)
|
||||
{
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
#if STACK_DIRECTION == 0
|
||||
if (STACK_DIR == 0) /* Unknown growth direction. */
|
||||
find_stack_direction ();
|
||||
#endif
|
||||
|
||||
/* Reclaim garbage, defined as all alloca'd storage that
|
||||
was allocated from deeper in the stack than currently. */
|
||||
|
||||
{
|
||||
register header *hp; /* Traverses linked list. */
|
||||
|
||||
#ifdef emacs
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
for (hp = last_alloca_header; hp != NULL;)
|
||||
if ((STACK_DIR > 0 && hp->h.deep > depth)
|
||||
|| (STACK_DIR < 0 && hp->h.deep < depth))
|
||||
{
|
||||
register header *np = hp->h.next;
|
||||
|
||||
free ((pointer) hp); /* Collect garbage. */
|
||||
|
||||
hp = np; /* -> next header. */
|
||||
}
|
||||
else
|
||||
break; /* Rest are not deeper. */
|
||||
|
||||
last_alloca_header = hp; /* -> last valid storage. */
|
||||
|
||||
#ifdef emacs
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (size == 0)
|
||||
return NULL; /* No allocation required. */
|
||||
|
||||
/* Allocate combined header + user data storage. */
|
||||
|
||||
{
|
||||
register pointer new = malloc (sizeof (header) + size);
|
||||
/* Address of header. */
|
||||
|
||||
if (new == 0)
|
||||
abort();
|
||||
|
||||
((header *) new)->h.next = last_alloca_header;
|
||||
((header *) new)->h.deep = depth;
|
||||
|
||||
last_alloca_header = (header *) new;
|
||||
|
||||
/* User storage begins just after header. */
|
||||
|
||||
return (pointer) ((char *) new + sizeof (header));
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifndef CRAY_STACK
|
||||
#define CRAY_STACK
|
||||
#ifndef CRAY2
|
||||
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
|
||||
struct stack_control_header
|
||||
{
|
||||
long shgrow:32; /* Number of times stack has grown. */
|
||||
long shaseg:32; /* Size of increments to stack. */
|
||||
long shhwm:32; /* High water mark of stack. */
|
||||
long shsize:32; /* Current size of stack (all segments). */
|
||||
};
|
||||
|
||||
/* The stack segment linkage control information occurs at
|
||||
the high-address end of a stack segment. (The stack
|
||||
grows from low addresses to high addresses.) The initial
|
||||
part of the stack segment linkage control information is
|
||||
0200 (octal) words. This provides for register storage
|
||||
for the routine which overflows the stack. */
|
||||
|
||||
struct stack_segment_linkage
|
||||
{
|
||||
long ss[0200]; /* 0200 overflow words. */
|
||||
long sssize:32; /* Number of words in this segment. */
|
||||
long ssbase:32; /* Offset to stack base. */
|
||||
long:32;
|
||||
long sspseg:32; /* Offset to linkage control of previous
|
||||
segment of stack. */
|
||||
long:32;
|
||||
long sstcpt:32; /* Pointer to task common address block. */
|
||||
long sscsnm; /* Private control structure number for
|
||||
microtasking. */
|
||||
long ssusr1; /* Reserved for user. */
|
||||
long ssusr2; /* Reserved for user. */
|
||||
long sstpid; /* Process ID for pid based multi-tasking. */
|
||||
long ssgvup; /* Pointer to multitasking thread giveup. */
|
||||
long sscray[7]; /* Reserved for Cray Research. */
|
||||
long ssa0;
|
||||
long ssa1;
|
||||
long ssa2;
|
||||
long ssa3;
|
||||
long ssa4;
|
||||
long ssa5;
|
||||
long ssa6;
|
||||
long ssa7;
|
||||
long sss0;
|
||||
long sss1;
|
||||
long sss2;
|
||||
long sss3;
|
||||
long sss4;
|
||||
long sss5;
|
||||
long sss6;
|
||||
long sss7;
|
||||
};
|
||||
|
||||
#else /* CRAY2 */
|
||||
/* The following structure defines the vector of words
|
||||
returned by the STKSTAT library routine. */
|
||||
struct stk_stat
|
||||
{
|
||||
long now; /* Current total stack size. */
|
||||
long maxc; /* Amount of contiguous space which would
|
||||
be required to satisfy the maximum
|
||||
stack demand to date. */
|
||||
long high_water; /* Stack high-water mark. */
|
||||
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
|
||||
long hits; /* Number of internal buffer hits. */
|
||||
long extends; /* Number of block extensions. */
|
||||
long stko_mallocs; /* Block allocations by $STKOFEN. */
|
||||
long underflows; /* Number of stack underflow calls ($STKRETN). */
|
||||
long stko_free; /* Number of deallocations by $STKRETN. */
|
||||
long stkm_free; /* Number of deallocations by $STKMRET. */
|
||||
long segments; /* Current number of stack segments. */
|
||||
long maxs; /* Maximum number of stack segments so far. */
|
||||
long pad_size; /* Stack pad size. */
|
||||
long current_address; /* Current stack segment address. */
|
||||
long current_size; /* Current stack segment size. This
|
||||
number is actually corrupted by STKSTAT to
|
||||
include the fifteen word trailer area. */
|
||||
long initial_address; /* Address of initial segment. */
|
||||
long initial_size; /* Size of initial segment. */
|
||||
};
|
||||
|
||||
/* The following structure describes the data structure which trails
|
||||
any stack segment. I think that the description in 'asdef' is
|
||||
out of date. I only describe the parts that I am sure about. */
|
||||
|
||||
struct stk_trailer
|
||||
{
|
||||
long this_address; /* Address of this block. */
|
||||
long this_size; /* Size of this block (does not include
|
||||
this trailer). */
|
||||
long unknown2;
|
||||
long unknown3;
|
||||
long link; /* Address of trailer block of previous
|
||||
segment. */
|
||||
long unknown5;
|
||||
long unknown6;
|
||||
long unknown7;
|
||||
long unknown8;
|
||||
long unknown9;
|
||||
long unknown10;
|
||||
long unknown11;
|
||||
long unknown12;
|
||||
long unknown13;
|
||||
long unknown14;
|
||||
};
|
||||
|
||||
#endif /* CRAY2 */
|
||||
#endif /* not CRAY_STACK */
|
||||
|
||||
#ifdef CRAY2
|
||||
/* Determine a "stack measure" for an arbitrary ADDRESS.
|
||||
I doubt that "lint" will like this much. */
|
||||
|
||||
static long
|
||||
i00afunc (long *address)
|
||||
{
|
||||
struct stk_stat status;
|
||||
struct stk_trailer *trailer;
|
||||
long *block, size;
|
||||
long result = 0;
|
||||
|
||||
/* We want to iterate through all of the segments. The first
|
||||
step is to get the stack status structure. We could do this
|
||||
more quickly and more directly, perhaps, by referencing the
|
||||
$LM00 common block, but I know that this works. */
|
||||
|
||||
STKSTAT (&status);
|
||||
|
||||
/* Set up the iteration. */
|
||||
|
||||
trailer = (struct stk_trailer *) (status.current_address
|
||||
+ status.current_size
|
||||
- 15);
|
||||
|
||||
/* There must be at least one stack segment. Therefore it is
|
||||
a fatal error if "trailer" is null. */
|
||||
|
||||
if (trailer == 0)
|
||||
abort ();
|
||||
|
||||
/* Discard segments that do not contain our argument address. */
|
||||
|
||||
while (trailer != 0)
|
||||
{
|
||||
block = (long *) trailer->this_address;
|
||||
size = trailer->this_size;
|
||||
if (block == 0 || size == 0)
|
||||
abort ();
|
||||
trailer = (struct stk_trailer *) trailer->link;
|
||||
if ((block <= address) && (address < (block + size)))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set the result to the offset in this segment and add the sizes
|
||||
of all predecessor segments. */
|
||||
|
||||
result = address - block;
|
||||
|
||||
if (trailer == 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (trailer->this_size <= 0)
|
||||
abort ();
|
||||
result += trailer->this_size;
|
||||
trailer = (struct stk_trailer *) trailer->link;
|
||||
}
|
||||
while (trailer != 0);
|
||||
|
||||
/* We are done. Note that if you present a bogus address (one
|
||||
not in any segment), you will get a different number back, formed
|
||||
from subtracting the address of the first block. This is probably
|
||||
not what you want. */
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
#else /* not CRAY2 */
|
||||
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
|
||||
Determine the number of the cell within the stack,
|
||||
given the address of the cell. The purpose of this
|
||||
routine is to linearize, in some sense, stack addresses
|
||||
for alloca. */
|
||||
|
||||
static long
|
||||
i00afunc (long address)
|
||||
{
|
||||
long stkl = 0;
|
||||
|
||||
long size, pseg, this_segment, stack;
|
||||
long result = 0;
|
||||
|
||||
struct stack_segment_linkage *ssptr;
|
||||
|
||||
/* Register B67 contains the address of the end of the
|
||||
current stack segment. If you (as a subprogram) store
|
||||
your registers on the stack and find that you are past
|
||||
the contents of B67, you have overflowed the segment.
|
||||
|
||||
B67 also points to the stack segment linkage control
|
||||
area, which is what we are really interested in. */
|
||||
|
||||
stkl = CRAY_STACKSEG_END ();
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
|
||||
/* If one subtracts 'size' from the end of the segment,
|
||||
one has the address of the first word of the segment.
|
||||
|
||||
If this is not the first segment, 'pseg' will be
|
||||
nonzero. */
|
||||
|
||||
pseg = ssptr->sspseg;
|
||||
size = ssptr->sssize;
|
||||
|
||||
this_segment = stkl - size;
|
||||
|
||||
/* It is possible that calling this routine itself caused
|
||||
a stack overflow. Discard stack segments which do not
|
||||
contain the target address. */
|
||||
|
||||
while (!(this_segment <= address && address <= stkl))
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
|
||||
#endif
|
||||
if (pseg == 0)
|
||||
break;
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
pseg = ssptr->sspseg;
|
||||
this_segment = stkl - size;
|
||||
}
|
||||
|
||||
result = address - this_segment;
|
||||
|
||||
/* If you subtract pseg from the current end of the stack,
|
||||
you get the address of the previous stack segment's end.
|
||||
This seems a little convoluted to me, but I'll bet you save
|
||||
a cycle somewhere. */
|
||||
|
||||
while (pseg != 0)
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o\n", pseg, size);
|
||||
#endif
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
pseg = ssptr->sspseg;
|
||||
result += size;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
#endif /* not CRAY2 */
|
||||
#endif /* CRAY */
|
||||
|
||||
#endif /* no alloca */
|
||||
#endif /* not GCC version 2 */
|
||||
34
bootstrap.bat
Normal file
34
bootstrap.bat
Normal file
@@ -0,0 +1,34 @@
|
||||
@echo off
|
||||
:: Copyright (C) 2018-2020 Free Software Foundation, Inc.
|
||||
:: This file is part of GNU Make.
|
||||
::
|
||||
:: GNU Make is free software; you can redistribute it and/or modify it under
|
||||
:: the terms of the GNU General Public License as published by the Free
|
||||
:: Software Foundation; either version 3 of the License, or (at your option)
|
||||
:: any later version.
|
||||
::
|
||||
:: GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||
:: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
:: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||
:: more details.
|
||||
::
|
||||
:: You should have received a copy of the GNU General Public License along
|
||||
:: with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
setlocal
|
||||
set "svurl=https://git.savannah.gnu.org/cgit"
|
||||
set "gnuliburl=%svurl%/gnulib.git/plain"
|
||||
|
||||
call :Download lib getloadavg.c
|
||||
call :Download lib intprops.h
|
||||
goto :Done
|
||||
|
||||
:Download
|
||||
echo Downloading %1\%2
|
||||
curl -sS -o %1\%2 "%gnuliburl%/%1/%2"
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
goto :EOF
|
||||
|
||||
:Done
|
||||
echo Done. Run build_w32.bat to build GNU make.
|
||||
goto :EOF
|
||||
53
bootstrap.conf
Normal file
53
bootstrap.conf
Normal file
@@ -0,0 +1,53 @@
|
||||
# Bootstrap configuration. -*-shell-script-*-
|
||||
|
||||
# Copyright (C) 2018-2020 Free Software Foundation, Inc.
|
||||
|
||||
# GNU Make is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 3 of the License, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Allow bootstrap to know that this is not a package
|
||||
checkout_only_file=README.git
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
# Ensure that all our magical output macros are correctly marked as
|
||||
# C (printf) format strings.
|
||||
XGETTEXT_OPTIONS='\\\
|
||||
--from-code=UTF-8\\\
|
||||
--flag=_:1:pass-c-format\\\
|
||||
--flag=N_:1:pass-c-format\\\
|
||||
--flag=DB:2:c-format --flag=DBF:2:c-format --flag=DBS:2:c-format\\\
|
||||
--flag=O:3:c-format --flag=OSN:3:c-format --flag=ONS:3:c-format\\\
|
||||
--flag=OS:3:c-format --flag=OSS:3:c-format --flag=OSSS:3:c-format\\\
|
||||
--flag=ON:3:c-format --flag=ONN:3:c-format\\\
|
||||
'
|
||||
|
||||
# We manage our own .gitignore files
|
||||
vc_ignore=
|
||||
|
||||
# Build prerequisites
|
||||
buildreq="\
|
||||
autoconf 2.69
|
||||
automake 1.16.1
|
||||
"
|
||||
|
||||
gnulib_name=libgnu
|
||||
gnulib_files=doc/make-stds.texi
|
||||
|
||||
gnulib_modules="\
|
||||
alloca
|
||||
fdl
|
||||
findprog-in
|
||||
getloadavg
|
||||
host-cpu-c-abi
|
||||
strerror
|
||||
make-glob"
|
||||
@@ -1,6 +1,7 @@
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
# Configuration for building GNU Make in the absence of any 'make' program.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
@@ -16,15 +17,22 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
# See Makefile.in for comments describing these variables.
|
||||
|
||||
# Only build the library when the system doesn't already have GNU glob.
|
||||
if USE_LOCAL_GLOB
|
||||
noinst_LIBRARIES = libglob.a
|
||||
endif
|
||||
top_srcdir='@top_srcdir@'
|
||||
|
||||
libglob_a_SOURCES = glob.c glob.h fnmatch.c fnmatch.h
|
||||
prefix='@prefix@'
|
||||
exec_prefix=`eval echo @exec_prefix@`
|
||||
|
||||
|
||||
EXTRA_DIST = COPYING.LIB Makefile.ami SCOPTIONS SMakefile \
|
||||
configure.bat
|
||||
CC='@CC@'
|
||||
AR='@AR@'
|
||||
CFLAGS='@CFLAGS@ @GUILE_CFLAGS@'
|
||||
CPPFLAGS='@CPPFLAGS@'
|
||||
DEFS='@DEFS@'
|
||||
ARFLAGS='@ARFLAGS@'
|
||||
LDFLAGS='@AM_LDFLAGS@ @LDFLAGS@'
|
||||
ALLOCA='@ALLOCA@'
|
||||
LOADLIBES='@LIBS@ @GUILE_LIBS@ @LIBINTL@'
|
||||
REMOTE='@REMOTE@'
|
||||
OBJEXT='@OBJEXT@'
|
||||
EXEEXT='@EXEEXT@'
|
||||
149
build.sh
Executable file
149
build.sh
Executable file
@@ -0,0 +1,149 @@
|
||||
#!/bin/sh
|
||||
# Shell script to build GNU Make in the absence of any 'make' program.
|
||||
|
||||
# Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Get configure-generated values
|
||||
. ./build.cfg
|
||||
|
||||
: ${OUTDIR:=.}
|
||||
OUTLIB="$OUTDIR/lib"
|
||||
|
||||
# Directory to find libraries in for '-lXXX'.
|
||||
libdir=$exec_prefix/lib
|
||||
# Directory to search by default for included makefiles.
|
||||
includedir=$prefix/include
|
||||
|
||||
localedir=$prefix/share/locale
|
||||
|
||||
defines="-DLOCALEDIR=\"$localedir\" -DLIBDIR=\"$libdir\" -DINCLUDEDIR=\"$includedir\""
|
||||
|
||||
# Look up a make variable value.
|
||||
# It can handle simple recursion where variables are separate words.
|
||||
# Print the value to stdout.
|
||||
get_mk_var ()
|
||||
{
|
||||
file=$1
|
||||
var=$2
|
||||
|
||||
val=
|
||||
v=$(sed -e :a -e '/\\$/N; s/\\\n//; ta' "$file" | sed -n "s=^ *$var *\= *==p")
|
||||
for w in $v; do
|
||||
case $w in
|
||||
(\$[\(\{]*[\)\}]) w=${w#\$[\(\{]}; w=$(get_mk_var "$file" "${w%[\)\}]}") ;;
|
||||
esac
|
||||
val="${val:+$val }$w"
|
||||
done
|
||||
|
||||
printf '%s\n' "$val"
|
||||
}
|
||||
|
||||
# Compile source files. Object files are put into $objs.
|
||||
compile ()
|
||||
{
|
||||
objs=
|
||||
for ofile in "$@"; do
|
||||
file="${ofile%.$OBJEXT}.c"
|
||||
echo "compiling $file..."
|
||||
of="$OUTDIR/$ofile"
|
||||
mkdir -p "${of%/*}"
|
||||
$CC $cflags $CPPFLAGS $CFLAGS -c -o "$of" "$top_srcdir/$file"
|
||||
objs="${objs:+$objs }$of"
|
||||
done
|
||||
}
|
||||
|
||||
# Use config.status to convert a .in file. Output file is put into $out.
|
||||
# $out will be empty if no conversion was needed.
|
||||
convert ()
|
||||
{
|
||||
out=
|
||||
base=$1
|
||||
var="GENERATE_$(echo $base | tr 'a-z./+' A-Z__X)"
|
||||
|
||||
# Is this file disabled?
|
||||
grep "${var}_FALSE\"]=\"\"" config.status >/dev/null && return
|
||||
|
||||
# Not disabled, so create it
|
||||
in="$top_srcdir/lib/$(echo ${base%.*}.in.${base##*.} | tr / _)"
|
||||
out="$OUTLIB/$base"
|
||||
mkdir -p "${out%/*}"
|
||||
|
||||
# First perform the normal replacements, using config.status
|
||||
sed -e 's|@GUARD_PREFIX@|GL|g' \
|
||||
-e 's/@GNULIB_UNISTD_H_GETOPT@/0/g' \
|
||||
"$in" > "${out}_"
|
||||
./config.status --file "${out}__:${out}_"
|
||||
int="${out}__"
|
||||
|
||||
# Then see if there any files we need to include. Unfortunately there's no
|
||||
# algorithmic conversion so we just have to hard-code it.
|
||||
incls=$(sed -n 's/.*definitions* of \(_[^ $]*\).*/\1/p' "$in")
|
||||
|
||||
for inc in $incls; do
|
||||
case $inc in
|
||||
(_GL_FUNCDECL_RPL) fn=$(get_mk_var lib/Makefile CXXDEFS_H) ;;
|
||||
(_GL_ARG_NONNULL) fn=$(get_mk_var lib/Makefile ARG_NONNULL_H) ;;
|
||||
(_GL_WARN_ON_USE) fn=$(get_mk_var lib/Makefile WARN_ON_USE_H) ;;
|
||||
(_Noreturn) fn=$(get_mk_var lib/Makefile _NORETURN_H) ;;
|
||||
(*) echo "Unknown file replacement: $inc"; exit 1 ;;
|
||||
esac
|
||||
|
||||
fn="$top_srcdir/lib/${fn##*/}"
|
||||
[ -f "$fn" ] || { echo "Missing file: $fn"; exit 1; }
|
||||
|
||||
sed "/definitions* of $inc/r $fn" "$int" > "${int}_"
|
||||
int=${int}_
|
||||
done
|
||||
|
||||
# Done!
|
||||
mv "$int" "$out"
|
||||
}
|
||||
|
||||
# Get source files provided from gnulib and convert to object files
|
||||
LIBOBJS=
|
||||
for lo in $( (get_mk_var lib/Makefile libgnu_a_OBJECTS; get_mk_var lib/Makefile libgnu_a_LIBADD) | sed "s=\$[\(\{]OBJEXT[\)\}]=$OBJEXT=g"); do
|
||||
LIBOBJS="${LIBOBJS:+$LIBOBJS }lib/$lo"
|
||||
done
|
||||
|
||||
# Get object files from the Makefile
|
||||
OBJS=$(get_mk_var Makefile make_OBJECTS | sed "s=\$[\(\{]OBJEXT[\)\}]=$OBJEXT=g")
|
||||
|
||||
# Exit as soon as any command fails.
|
||||
set -e
|
||||
|
||||
# Generate gnulib header files that would normally be created by make
|
||||
for b in $(get_mk_var lib/Makefile BUILT_SOURCES); do
|
||||
convert $b
|
||||
done
|
||||
|
||||
# Build the gnulib library
|
||||
cflags="$DEFS -I$OUTLIB -Ilib -I$top_srcdir/lib -I$OUTDIR/src -Isrc -I$top_srcdir/src"
|
||||
compile $LIBOBJS
|
||||
|
||||
echo "creating libgnu.a..."
|
||||
$AR $ARFLAGS "$OUTLIB"/libgnu.a $objs
|
||||
|
||||
# Compile the source files into those objects.
|
||||
cflags="$DEFS $defines -I$OUTDIR/src -Isrc -I$top_srcdir/src -I$OUTLIB -Ilib -I$top_srcdir/lib"
|
||||
compile $OBJS
|
||||
|
||||
# Link all the objects together.
|
||||
echo "linking make..."
|
||||
$CC $CFLAGS $LDFLAGS -L"$OUTLIB" $objs -lgnu $LOADLIBES -o "$OUTDIR/makenew$EXEEXT"
|
||||
mv -f "$OUTDIR/makenew$EXEEXT" "$OUTDIR/make$EXEEXT"
|
||||
|
||||
echo done.
|
||||
@@ -1,81 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Shell script to build GNU Make in the absence of any 'make' program.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1993-2013 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# See Makefile.in for comments describing these variables.
|
||||
|
||||
srcdir='@srcdir@'
|
||||
CC='@CC@'
|
||||
CFLAGS='@CFLAGS@'
|
||||
CPPFLAGS='@CPPFLAGS@'
|
||||
LDFLAGS='@LDFLAGS@'
|
||||
ALLOCA='@ALLOCA@'
|
||||
LOADLIBES='@LIBS@ @LIBINTL@'
|
||||
eval extras=\'@LIBOBJS@\'
|
||||
REMOTE='@REMOTE@'
|
||||
GLOBLIB='@GLOBLIB@'
|
||||
PATH_SEPARATOR='@PATH_SEPARATOR@'
|
||||
OBJEXT='@OBJEXT@'
|
||||
EXEEXT='@EXEEXT@'
|
||||
|
||||
# Common prefix for machine-independent installed files.
|
||||
prefix='@prefix@'
|
||||
# Common prefix for machine-dependent installed files.
|
||||
exec_prefix=`eval echo @exec_prefix@`
|
||||
# Directory to find libraries in for '-lXXX'.
|
||||
libdir=${exec_prefix}/lib
|
||||
# Directory to search by default for included makefiles.
|
||||
includedir=${prefix}/include
|
||||
|
||||
localedir=${prefix}/share/locale
|
||||
aliaspath=${localedir}${PATH_SEPARATOR}.
|
||||
|
||||
defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
||||
|
||||
# Exit as soon as any command fails.
|
||||
set -e
|
||||
|
||||
# These are all the objects we need to link together.
|
||||
objs="%objs% remote-${REMOTE}.${OBJEXT} ${extras} ${ALLOCA}"
|
||||
|
||||
if [ x"$GLOBLIB" != x ]; then
|
||||
objs="$objs %globobjs%"
|
||||
globinc=-I${srcdir}/glob
|
||||
fi
|
||||
|
||||
# Compile the source files into those objects.
|
||||
for file in `echo ${objs} | sed 's/\.'${OBJEXT}'/.c/g'`; do
|
||||
echo compiling ${file}...
|
||||
$CC $defines $CPPFLAGS $CFLAGS \
|
||||
-c -I. -I${srcdir} ${globinc} ${srcdir}/$file
|
||||
done
|
||||
|
||||
# The object files were actually all put in the current directory.
|
||||
# Remove the source directory names from the list.
|
||||
srcobjs="$objs"
|
||||
objs=
|
||||
for obj in $srcobjs; do
|
||||
objs="$objs `basename $obj`"
|
||||
done
|
||||
|
||||
# Link all the objects together.
|
||||
echo linking make...
|
||||
$CC $CFLAGS $LDFLAGS $objs $LOADLIBES -o makenew${EXEEXT}
|
||||
echo done
|
||||
mv -f makenew${EXEEXT} make${EXEEXT}
|
||||
677
build_w32.bat
Normal file → Executable file
677
build_w32.bat
Normal file → Executable file
@@ -1,321 +1,402 @@
|
||||
@echo off
|
||||
rem Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
rem This file is part of GNU Make.
|
||||
rem
|
||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||
rem the terms of the GNU General Public License as published by the Free
|
||||
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||
rem any later version.
|
||||
rem
|
||||
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||
rem more details.
|
||||
rem
|
||||
rem You should have received a copy of the GNU General Public License along
|
||||
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
:: Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
:: This file is part of GNU Make.
|
||||
::
|
||||
:: GNU Make is free software; you can redistribute it and/or modify it under
|
||||
:: the terms of the GNU General Public License as published by the Free
|
||||
:: Software Foundation; either version 3 of the License, or (at your option)
|
||||
:: any later version.
|
||||
::
|
||||
:: GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||
:: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
:: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||
:: more details.
|
||||
::
|
||||
:: You should have received a copy of the GNU General Public License along
|
||||
:: with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if "%1" == "-h" GoTo Usage
|
||||
if "%1" == "--help" GoTo Usage
|
||||
if not exist config.h.W32.template GoTo NotSCM
|
||||
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.ac > config.h.W32.sed
|
||||
echo s,%%PACKAGE%%,make,g >> config.h.W32.sed
|
||||
sed -f config.h.W32.sed config.h.W32.template > config.h.W32
|
||||
echo static const char *const GUILE_module_defn = ^" \> gmk-default.h
|
||||
sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\/" gmk-default.scm >> gmk-default.h
|
||||
echo ^";>> gmk-default.h
|
||||
:NotSCM
|
||||
copy config.h.W32 config.h
|
||||
setlocal
|
||||
if not "%RECURSEME%"=="%~0" (
|
||||
set "RECURSEME=%~0"
|
||||
%ComSpec% /s /c ""%~0" %*"
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
call :Reset
|
||||
|
||||
if "%1" == "-h" goto Usage
|
||||
if "%1" == "--help" goto Usage
|
||||
|
||||
echo.
|
||||
echo Creating GNU Make for Windows 9X/NT/2K/XP/Vista/7/8/10
|
||||
echo.
|
||||
|
||||
set MAKE=gnumake
|
||||
set GUILE=Y
|
||||
set COMPILER=cl.exe
|
||||
set O=obj
|
||||
set ARCH=x64
|
||||
set DEBUG=N
|
||||
|
||||
if exist maintMakefile (
|
||||
set MAINT=Y
|
||||
) else (
|
||||
set MAINT=N
|
||||
)
|
||||
|
||||
rem Guile configuration
|
||||
set GUILECFLAGS=
|
||||
set GUILELIBS=
|
||||
set GUILESRC=
|
||||
set NOGUILE=
|
||||
set OPT=-O2
|
||||
set COMPILER=
|
||||
set PKGMSC=
|
||||
:ParseSW
|
||||
if "%1" == "--debug" GoTo SetOpt
|
||||
if "%1" == "--without-guile" GoTo NoGuile
|
||||
if "%1" == "gcc" GoTo SetCC
|
||||
if "%1" == "" GoTo ChkGuile
|
||||
:SetOpt
|
||||
set OPT=-O0
|
||||
if "%1" == "--debug" goto SetDebug
|
||||
if "%1" == "--without-guile" goto NoGuile
|
||||
if "%1" == "--x86" goto Set32Bit
|
||||
if "%1" == "gcc" goto SetCC
|
||||
if "%1" == "" goto DoneSW
|
||||
goto Usage
|
||||
|
||||
:SetDebug
|
||||
set DEBUG=Y
|
||||
echo - Building without compiler optimizations
|
||||
shift
|
||||
GoTo ParseSW
|
||||
goto ParseSW
|
||||
|
||||
:NoGuile
|
||||
set NOGUILE=Y
|
||||
echo "Building without Guile"
|
||||
set GUILE=N
|
||||
echo - Building without Guile
|
||||
shift
|
||||
GoTo ParseSW
|
||||
goto ParseSW
|
||||
|
||||
:Set32Bit
|
||||
set ARCH=x86
|
||||
echo - Building 32bit GNU Make
|
||||
shift
|
||||
goto ParseSW
|
||||
|
||||
:SetCC
|
||||
set COMPILER=gcc
|
||||
echo "Building with GCC"
|
||||
set O=o
|
||||
echo - Building with GCC
|
||||
shift
|
||||
GoTo ParseSW
|
||||
rem Build with Guile is supported only on NT and later versions
|
||||
:ChkGuile
|
||||
if "%NOGUILE%" == "Y" GoTo GuileDone
|
||||
if not "%OS%" == "Windows_NT" GoTo NoGuile
|
||||
pkg-config --help > guile.tmp 2> NUL
|
||||
if ERRORLEVEL 1 GoTo NoPkgCfg
|
||||
echo "Checking for Guile 2.0"
|
||||
if not "%COMPILER%" == "gcc" set PKGMSC=--msvc-syntax
|
||||
pkg-config --cflags --short-errors "guile-2.0" > guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILECFLAGS= < guile.tmp
|
||||
pkg-config --libs --static --short-errors %PKGMSC% "guile-2.0" > guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILELIBS= < guile.tmp
|
||||
if not "%GUILECFLAGS%" == "" GoTo GuileDone
|
||||
echo "Checking for Guile 1.8"
|
||||
pkg-config --cflags --short-errors "guile-1.8" > guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILECFLAGS= < guile.tmp
|
||||
pkg-config --libs --static --short-errors %PKGMSC% "guile-1.8" > guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILELIBS= < guile.tmp
|
||||
if not "%GUILECFLAGS%" == "" GoTo GuileDone
|
||||
echo "No Guile found, building without Guile"
|
||||
GoTo GuileDone
|
||||
:NoPkgCfg
|
||||
echo "pkg-config not found, building without Guile"
|
||||
:GuileDone
|
||||
if not "%GUILECFLAGS%" == "" echo "Guile found, building with Guile"
|
||||
if not "%GUILECFLAGS%" == "" set GUILESRC=guile.c
|
||||
if not "%GUILECFLAGS%" == "" set GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE
|
||||
if "%COMPILER%" == "gcc" if "%OPT%" == "-O0" echo "Building without compiler optimizations"
|
||||
cd w32\subproc
|
||||
echo.
|
||||
echo "Creating the subproc library"
|
||||
%ComSpec% /c build.bat
|
||||
cd ..\..
|
||||
goto ParseSW
|
||||
|
||||
if exist link.dbg del link.dbg
|
||||
if exist link.rel del link.rel
|
||||
:DoneSW
|
||||
if "%MAINT%" == "Y" echo - Enabling maintainer mode
|
||||
|
||||
if "%COMPILER%" == "gcc" goto FindGcc
|
||||
|
||||
:: Find a compiler. Visual Studio requires a lot of effort to locate :-/.
|
||||
%COMPILER% >nul 2>&1
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
:: Visual Studio 17 and above provides the "vswhere" tool
|
||||
call :FindVswhere
|
||||
if ERRORLEVEL 1 goto LegacyVS
|
||||
|
||||
for /f "tokens=* usebackq" %%i in (`%VSWHERE% -latest -property installationPath`) do (
|
||||
set InstallPath=%%i
|
||||
)
|
||||
set "VSVARS=%InstallPath%\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
:: No "vswhere" or it can't find a compiler. Go old-school.
|
||||
:LegacyVS
|
||||
set "VSVARS=%VS150COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS71COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS70COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%V6TOOLS%\VC98\Bin\vcvars32.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%V6TOOLS%\VC97\Bin\vcvars32.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%V5TOOLS%\VC\Bin\vcvars32.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
:: We did not find anything--fail
|
||||
echo No MSVC compiler available.
|
||||
echo Please run vcvarsall.bat and/or configure your Path.
|
||||
exit 1
|
||||
|
||||
:FoundMSVC
|
||||
set OUTDIR=.\WinRel
|
||||
set LNKOUT=./WinRel
|
||||
set "OPTS=/O2 /D NDEBUG"
|
||||
set LINKOPTS=
|
||||
if "%DEBUG%" == "Y" set OUTDIR=.\WinDebug
|
||||
if "%DEBUG%" == "Y" set LNKOUT=./WinDebug
|
||||
if "%DEBUG%" == "Y" set "OPTS=/Zi /Od /D _DEBUG"
|
||||
if "%DEBUG%" == "Y" set LINKOPTS=/DEBUG
|
||||
if "%MAINT%" == "Y" set "OPTS=%OPTS% /D MAKE_MAINTAINER_MODE"
|
||||
:: Show the compiler version that we found
|
||||
:: Unfortunately this also shows a "usage" note; I can't find anything better.
|
||||
echo.
|
||||
echo "Creating GNU Make for Windows 9X/NT/2K/XP/Vista/7/8"
|
||||
if "%COMPILER%" == "gcc" GoTo GCCBuild
|
||||
set make=gnumake
|
||||
%COMPILER%
|
||||
goto Build
|
||||
|
||||
:FindGcc
|
||||
set OUTDIR=.\GccRel
|
||||
set LNKOUT=./GccRel
|
||||
set OPTS=-O2
|
||||
if "%DEBUG%" == "Y" set OPTS=-O0
|
||||
if "%DEBUG%" == "Y" set OUTDIR=.\GccDebug
|
||||
if "%DEBUG%" == "Y" set LNKOUT=./GccDebug
|
||||
if "%MAINT%" == "Y" set "OPTS=%OPTS% -DMAKE_MAINTAINER_MODE"
|
||||
:: Show the compiler version that we found
|
||||
echo.
|
||||
%COMPILER% --version
|
||||
if not ERRORLEVEL 1 goto Build
|
||||
echo No %COMPILER% found.
|
||||
exit 1
|
||||
|
||||
:Build
|
||||
:: Clean the directory if it exists
|
||||
if exist %OUTDIR%\nul rmdir /S /Q %OUTDIR%
|
||||
|
||||
:: Recreate it
|
||||
mkdir %OUTDIR%
|
||||
mkdir %OUTDIR%\src
|
||||
mkdir %OUTDIR%\src\w32
|
||||
mkdir %OUTDIR%\src\w32\compat
|
||||
mkdir %OUTDIR%\src\w32\subproc
|
||||
mkdir %OUTDIR%\lib
|
||||
|
||||
if "%GUILE%" == "Y" call :ChkGuile
|
||||
|
||||
echo.
|
||||
echo Compiling %OUTDIR% version
|
||||
|
||||
if exist src\config.h.W32.template call :ConfigSCM
|
||||
copy src\config.h.W32 %OUTDIR%\src\config.h
|
||||
|
||||
copy lib\glob.in.h %OUTDIR%\lib\glob.h
|
||||
copy lib\fnmatch.in.h %OUTDIR%\lib\fnmatch.h
|
||||
|
||||
if exist %OUTDIR%\link.sc del %OUTDIR%\link.sc
|
||||
|
||||
call :Compile src/ar
|
||||
call :Compile src/arscan
|
||||
call :Compile src/commands
|
||||
call :Compile src/default
|
||||
call :Compile src/dir
|
||||
call :Compile src/expand
|
||||
call :Compile src/file
|
||||
call :Compile src/function
|
||||
call :Compile src/getopt
|
||||
call :Compile src/getopt1
|
||||
call :Compile src/guile GUILE
|
||||
call :Compile src/hash
|
||||
call :Compile src/implicit
|
||||
call :Compile src/job
|
||||
call :Compile src/load
|
||||
call :Compile src/loadapi
|
||||
call :Compile src/main GUILE
|
||||
call :Compile src/misc
|
||||
call :Compile src/output
|
||||
call :Compile src/read
|
||||
call :Compile src/remake
|
||||
call :Compile src/remote-stub
|
||||
call :Compile src/rule
|
||||
call :Compile src/signame
|
||||
call :Compile src/strcache
|
||||
call :Compile src/variable
|
||||
call :Compile src/version
|
||||
call :Compile src/vpath
|
||||
call :Compile src/w32/pathstuff
|
||||
call :Compile src/w32/w32os
|
||||
call :Compile src/w32/compat/posixfcn
|
||||
call :Compile src/w32/subproc/misc
|
||||
call :Compile src/w32/subproc/sub_proc
|
||||
call :Compile src/w32/subproc/w32err
|
||||
call :Compile lib/fnmatch
|
||||
call :Compile lib/glob
|
||||
call :Compile lib/getloadavg
|
||||
|
||||
if not "%COMPILER%" == "gcc" call :Compile src\w32\compat\dirent
|
||||
|
||||
call :Link
|
||||
|
||||
echo.
|
||||
if exist %OUTDIR%\%MAKE%.exe goto Success
|
||||
echo %OUTDIR% build FAILED!
|
||||
exit 1
|
||||
|
||||
:Success
|
||||
echo %OUTDIR% build succeeded.
|
||||
if exist Basic.mk copy /Y Basic.mk Makefile
|
||||
if not exist tests\config-flags.pm copy /Y tests\config-flags.pm.W32 tests\config-flags.pm
|
||||
call :Reset
|
||||
goto :EOF
|
||||
|
||||
::
|
||||
:: Subroutines
|
||||
::
|
||||
|
||||
:Compile
|
||||
echo %LNKOUT%/%1.%O% >>%OUTDIR%\link.sc
|
||||
set EXTRAS=
|
||||
if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"
|
||||
if exist "%OUTDIR%\%1.%O%" del "%OUTDIR%\%1.%O%"
|
||||
if "%COMPILER%" == "gcc" goto GccCompile
|
||||
|
||||
:: MSVC Compile
|
||||
echo on
|
||||
if not exist .\WinDebug\nul mkdir .\WinDebug
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c
|
||||
echo WinDebug\variable.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c
|
||||
echo WinDebug\rule.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c
|
||||
echo WinDebug\remote-stub.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c
|
||||
echo WinDebug\commands.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c
|
||||
echo WinDebug\file.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c
|
||||
echo WinDebug\getloadavg.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c
|
||||
echo WinDebug\default.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c
|
||||
echo WinDebug\signame.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c
|
||||
echo WinDebug\expand.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c
|
||||
echo WinDebug\dir.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od %GUILECFLAGS% /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c
|
||||
echo WinDebug\main.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c
|
||||
echo WinDebug\getopt1.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c
|
||||
echo WinDebug\job.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c output.c
|
||||
echo WinDebug\output.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c
|
||||
echo WinDebug\read.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c
|
||||
echo WinDebug\version.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c
|
||||
echo WinDebug\getopt.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c
|
||||
echo WinDebug\arscan.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c hash.c
|
||||
echo WinDebug\hash.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c strcache.c
|
||||
echo WinDebug\strcache.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c
|
||||
echo WinDebug\remake.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c
|
||||
echo WinDebug\misc.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c
|
||||
echo WinDebug\ar.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c
|
||||
echo WinDebug\function.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c
|
||||
echo WinDebug\vpath.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c
|
||||
echo WinDebug\implicit.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c loadapi.c
|
||||
echo WinDebug\loadapi.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c load.c
|
||||
echo WinDebug\load.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c
|
||||
echo WinDebug\dirent.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\posixfcn.c
|
||||
echo WinDebug\posixfcn.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c
|
||||
echo WinDebug\glob.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c
|
||||
echo WinDebug\fnmatch.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c
|
||||
echo WinDebug\pathstuff.obj >>link.dbg
|
||||
if "%GUILESRC%" == "" GoTo LinkDbg
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od %GUILECFLAGS%% /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c guile.c
|
||||
echo WinDebug\guile.obj >>link.dbg
|
||||
:LinkDbg
|
||||
echo off
|
||||
echo "Linking WinDebug/%make%.exe"
|
||||
rem link.exe %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /OUT:.\WinDebug/%make%.exe .\WinDebug/variable.obj .\WinDebug/rule.obj .\WinDebug/remote-stub.obj .\WinDebug/commands.obj .\WinDebug/file.obj .\WinDebug/getloadavg.obj .\WinDebug/default.obj .\WinDebug/signame.obj .\WinDebug/expand.obj .\WinDebug/dir.obj .\WinDebug/main.obj .\WinDebug/getopt1.obj .\WinDebug/job.obj .\WinDebug/output.obj .\WinDebug/read.obj .\WinDebug/version.obj .\WinDebug/getopt.obj .\WinDebug/arscan.obj .\WinDebug/remake.obj .\WinDebug/hash.obj .\WinDebug/strcache.obj .\WinDebug/misc.obj .\WinDebug/ar.obj .\WinDebug/function.obj .\WinDebug/vpath.obj .\WinDebug/implicit.obj .\WinDebug/dirent.obj .\WinDebug/glob.obj .\WinDebug/fnmatch.obj .\WinDebug/pathstuff.obj
|
||||
echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib >>link.dbg
|
||||
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /OUT:.\WinDebug/%make%.exe @link.dbg
|
||||
if not exist .\WinDebug/%make%.exe echo "WinDebug build failed"
|
||||
if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!"
|
||||
if not exist .\WinRel\nul mkdir .\WinRel
|
||||
echo on
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c
|
||||
echo WinRel\variable.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c
|
||||
echo WinRel\rule.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c
|
||||
echo WinRel\remote-stub.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c
|
||||
echo WinRel\commands.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c
|
||||
echo WinRel\file.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c
|
||||
echo WinRel\getloadavg.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c
|
||||
echo WinRel\default.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c
|
||||
echo WinRel\signame.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c
|
||||
echo WinRel\expand.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c
|
||||
echo WinRel\dir.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 %GUILECFLAGS% /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c
|
||||
echo WinRel\main.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c
|
||||
echo WinRel\getopt1.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c
|
||||
echo WinRel\job.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c output.c
|
||||
echo WinRel\output.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c
|
||||
echo WinRel\read.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c
|
||||
echo WinRel\version.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c
|
||||
echo WinRel\getopt.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c
|
||||
echo WinRel\arscan.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c
|
||||
echo WinRel\remake.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c hash.c
|
||||
echo WinRel\hash.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c strcache.c
|
||||
echo WinRel\strcache.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c
|
||||
echo WinRel\misc.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c
|
||||
echo WinRel\ar.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c
|
||||
echo WinRel\function.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c
|
||||
echo WinRel\vpath.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c
|
||||
echo WinRel\implicit.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c loadapi.c
|
||||
echo WinRel\loadapi.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c load.c
|
||||
echo WinRel\load.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c
|
||||
echo WinRel\dirent.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\posixfcn.c
|
||||
echo WinRel\posixfcn.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c
|
||||
echo WinRel\glob.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c
|
||||
echo WinRel\fnmatch.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c
|
||||
echo WinRel\pathstuff.obj >>link.rel
|
||||
if "%GUILESRC%" == "" GoTo LinkRel
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c guile.c
|
||||
echo WinRel\guile.obj >>link.rel
|
||||
:LinkRel
|
||||
echo off
|
||||
echo "Linking WinRel/%make%.exe"
|
||||
rem link.exe %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /OUT:.\WinRel/%make%.exe .\WinRel/variable.obj .\WinRel/rule.obj .\WinRel/remote-stub.obj .\WinRel/commands.obj .\WinRel/file.obj .\WinRel/getloadavg.obj .\WinRel/default.obj .\WinRel/signame.obj .\WinRel/expand.obj .\WinRel/dir.obj .\WinRel/main.obj .\WinRel/getopt1.obj .\WinRel/job.obj .\WinRel/output.obj .\WinRel/read.obj .\WinRel/version.obj .\WinRel/getopt.obj .\WinRel/arscan.obj .\WinRel/remake.obj .\WinRel/misc.obj .\WinRel/hash.obj .\WinRel/strcache.obj .\WinRel/ar.obj .\WinRel/function.obj .\WinRel/vpath.obj .\WinRel/implicit.obj .\WinRel/dirent.obj .\WinRel/glob.obj .\WinRel/fnmatch.obj .\WinRel/pathstuff.obj
|
||||
echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib >>link.rel
|
||||
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /OUT:.\WinRel/%make%.exe @link.rel
|
||||
if not exist .\WinRel/%make%.exe echo "WinRel build failed"
|
||||
if exist .\WinRel/%make%.exe echo "WinRel build succeeded!"
|
||||
set make=
|
||||
GoTo BuildEnd
|
||||
:GCCBuild
|
||||
echo on
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c variable.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c rule.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remote-stub.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c commands.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c file.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getloadavg.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c default.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c signame.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c expand.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c dir.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H %GUILECFLAGS% -c main.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt1.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c job.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c output.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c read.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c version.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c arscan.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remake.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c hash.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c strcache.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c misc.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ar.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c function.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c vpath.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c implicit.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c loadapi.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c load.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/glob.c -o glob.o
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/fnmatch.c -o fnmatch.o
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/pathstuff.c -o pathstuff.o
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/compat/posixfcn.c -o posixfcn.o
|
||||
%COMPILER% /nologo /MT /W4 /EHsc %OPTS% /I %OUTDIR%/src /I src /I %OUTDIR%/lib /I lib /I src/w32/include /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR%OUTDIR% /Fp%OUTDIR%\%MAKE%.pch /Fo%OUTDIR%\%1.%O% /Fd%OUTDIR%\%MAKE%.pdb %EXTRAS% /c %1.c
|
||||
@echo off
|
||||
set GUILEOBJ=
|
||||
if "%GUILESRC%" == "" GoTo LinkGCC
|
||||
set GUILEOBJ=guile.o
|
||||
goto CompileDone
|
||||
|
||||
:GccCompile
|
||||
:: GCC Compile
|
||||
echo on
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% %GUILECFLAGS% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c guile.c
|
||||
:LinkGCC
|
||||
%COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c
|
||||
@echo off
|
||||
Rem The version NN of libgnumake-NN.dll.a should be bumped whenever
|
||||
Rem the API changes in binary-incompatible manner.
|
||||
@echo on
|
||||
gcc -mthreads -gdwarf-2 -g3 -o gnumake.exe variable.o rule.o remote-stub.o commands.o file.o getloadavg.o default.o signame.o expand.o dir.o main.o getopt1.o %GUILEOBJ% job.o output.o read.o version.o getopt.o arscan.o remake.o misc.o hash.o strcache.o ar.o function.o vpath.o implicit.o loadapi.o load.o glob.o fnmatch.o pathstuff.o posixfcn.o w32_misc.o sub_proc.o w32err.o %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -Wl,--out-implib=libgnumake-1.dll.a
|
||||
@GoTo BuildEnd
|
||||
|
||||
:CompileDone
|
||||
if not exist "%OUTDIR%\%1.%O%" exit 1
|
||||
goto :EOF
|
||||
|
||||
:Link
|
||||
echo.
|
||||
echo Linking %LNKOUT%/%MAKE%.exe
|
||||
if "%COMPILER%" == "gcc" goto GccLink
|
||||
|
||||
:: MSVC Link
|
||||
echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib >>%OUTDIR%\link.sc
|
||||
echo on
|
||||
link.exe /NOLOGO /SUBSYSTEM:console /PDB:%LNKOUT%\%MAKE%.pdb %LINKOPTS% /OUT:%LNKOUT%\%MAKE%.exe @%LNKOUT%\link.sc
|
||||
@echo off
|
||||
goto :EOF
|
||||
|
||||
:GccLink
|
||||
:: GCC Link
|
||||
echo on
|
||||
echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc
|
||||
%COMPILER% -mthreads -gdwarf-2 -g3 %OPTS% -o %LNKOUT%/%MAKE%.exe @%LNKOUT%/link.sc -Wl,--out-implib=%LNKOUT%/libgnumake-1.dll.a
|
||||
@echo off
|
||||
goto :EOF
|
||||
|
||||
:ConfigSCM
|
||||
echo Generating config from SCM templates
|
||||
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.ac > %OUTDIR%\src\config.h.W32.sed
|
||||
echo s,%%PACKAGE%%,make,g >> %OUTDIR%\src\config.h.W32.sed
|
||||
sed -f %OUTDIR%\src\config.h.W32.sed src\config.h.W32.template > src\config.h.W32
|
||||
echo static const char *const GUILE_module_defn = ^" \ > src\gmk-default.h
|
||||
sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" src\gmk-default.scm >> src\gmk-default.h
|
||||
echo ^";>> src\gmk-default.h
|
||||
goto :EOF
|
||||
|
||||
:ChkGuile
|
||||
:: Build with Guile is supported only on NT and later versions
|
||||
if not "%OS%" == "Windows_NT" goto NoGuile
|
||||
pkg-config --help > %OUTDIR%\guile.tmp 2> NUL
|
||||
if ERRORLEVEL 1 goto NoPkgCfg
|
||||
|
||||
echo Checking for Guile 2.0
|
||||
if not "%COMPILER%" == "gcc" set PKGMSC=--msvc-syntax
|
||||
pkg-config --cflags --short-errors "guile-2.0" > %OUTDIR%\guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILECFLAGS= < %OUTDIR%\guile.tmp
|
||||
|
||||
pkg-config --libs --static --short-errors %PKGMSC% "guile-2.0" > %OUTDIR%\guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILELIBS= < %OUTDIR%\guile.tmp
|
||||
|
||||
if not "%GUILECFLAGS%" == "" goto GuileDone
|
||||
|
||||
echo Checking for Guile 1.8
|
||||
pkg-config --cflags --short-errors "guile-1.8" > %OUTDIR%\guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILECFLAGS= < %OUTDIR%\guile.tmp
|
||||
|
||||
pkg-config --libs --static --short-errors %PKGMSC% "guile-1.8" > %OUTDIR%\guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILELIBS= < %OUTDIR%\guile.tmp
|
||||
|
||||
if not "%GUILECFLAGS%" == "" goto GuileDone
|
||||
|
||||
echo - No Guile found, building without Guile
|
||||
goto GuileDone
|
||||
|
||||
:NoPkgCfg
|
||||
echo - pkg-config not found, building without Guile
|
||||
|
||||
:GuileDone
|
||||
if "%GUILECFLAGS%" == "" goto :EOF
|
||||
|
||||
echo - Guile found: building with Guile
|
||||
set "GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE"
|
||||
goto :EOF
|
||||
|
||||
:FindVswhere
|
||||
set VSWHERE=vswhere
|
||||
%VSWHERE% -help >nul 2>&1
|
||||
if not ERRORLEVEL 1 exit /b 0
|
||||
set "VSWHERE=C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere"
|
||||
%VSWHERE% -help >nul 2>&1
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
goto :EOF
|
||||
|
||||
:CheckMSVC
|
||||
if not exist "%VSVARS%" exit /b 1
|
||||
call "%VSVARS%" %ARCH%
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
%COMPILER% >nul 2>&1
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
goto :EOF
|
||||
|
||||
:Usage
|
||||
echo Usage: %0 [options] [gcc]
|
||||
echo Options:
|
||||
echo. --debug For GCC only, make a debug build
|
||||
echo. (MSVC build always makes both debug and release)
|
||||
echo. --without-guile Do not compile Guile support even if found
|
||||
echo. --debug Make a Debug build--default is Release
|
||||
echo. --x86 Make a 32bit binary--default is 64bit
|
||||
echo. --help Display these instructions and exit
|
||||
:BuildEnd
|
||||
@echo off
|
||||
set GUILEOBJ=
|
||||
set GUILESRC=
|
||||
set GUILELIBS=
|
||||
set GUILECFLAGS=
|
||||
set PKGMSC=
|
||||
set OPT=
|
||||
goto :EOF
|
||||
|
||||
:Reset
|
||||
set ARCH=
|
||||
set COMPILER=
|
||||
set DEBUG=
|
||||
set GUILE=
|
||||
set GUILECFLAGS=
|
||||
set GUILELIBS=
|
||||
set LINKOPTS=
|
||||
set MAKE=
|
||||
set NOGUILE=
|
||||
echo on
|
||||
set O=
|
||||
set OPTS=
|
||||
set OUTDIR=
|
||||
set LNKOUT=
|
||||
set PKGMSC=
|
||||
set VSVARS=
|
||||
goto :EOF
|
||||
|
||||
95
builddos.bat
Normal file
95
builddos.bat
Normal file
@@ -0,0 +1,95 @@
|
||||
@echo off
|
||||
rem Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
rem This file is part of GNU Make.
|
||||
rem
|
||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||
rem the terms of the GNU General Public License as published by the Free
|
||||
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||
rem any later version.
|
||||
rem
|
||||
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||
rem more details.
|
||||
rem
|
||||
rem You should have received a copy of the GNU General Public License along
|
||||
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
echo Building Make for MSDOS with DJGPP
|
||||
|
||||
rem The SmallEnv trick protects against too small environment block,
|
||||
rem in which case the values will be truncated and the whole thing
|
||||
rem goes awry. COMMAND.COM will say "Out of environment space", but
|
||||
rem many people don't care, so we force them to care by refusing to go.
|
||||
|
||||
rem Where is the srcdir?
|
||||
set XSRC=.
|
||||
if not "%XSRC%"=="." goto SmallEnv
|
||||
if "%1%"=="" goto SrcDone
|
||||
if "%1%"=="." goto SrcDone
|
||||
set XSRC=%1
|
||||
|
||||
if not "%XSRC%"=="%1" goto SmallEnv
|
||||
|
||||
:SrcDone
|
||||
|
||||
if not exist src mkdir src
|
||||
if not exist lib mkdir lib
|
||||
|
||||
copy /Y %XSRC%\src\configh.dos .\src\config.h
|
||||
|
||||
copy /Y %XSRC%\lib\glob.in.h .\lib\glob.h
|
||||
copy /Y %XSRC%\lib\fnmatch.in.h .\lib\fnmatch.h
|
||||
|
||||
rem Echo ON so they will see what is going on.
|
||||
@echo on
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/commands.c -o commands.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/output.c -o output.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/job.c -o job.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/dir.c -o dir.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/file.c -o file.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/misc.c -o misc.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/main.c -o main.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g %XSRC%/src/read.c -o read.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g %XSRC%/src/remake.c -o remake.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/rule.c -o rule.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/implicit.c -o implicit.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/default.c -o default.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/variable.c -o variable.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/expand.c -o eyxpand.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/function.c -o function.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/vpath.c -o vpath.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/hash.c -o hash.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/strcache.c -o strcache.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/version.c -o version.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/ar.c -o ar.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/arscan.c -o arscan.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/signame.c -o signame.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/remote-stub.c -o remote-stub.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/getopt.c -o getopt.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/getopt1.c -o getopt1.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/lib/glob.c -o lib/glob.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/lib/fnmatch.c -o lib/fnmatch.o
|
||||
@echo off
|
||||
echo commands.o > respf.$$$
|
||||
for %%f in (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
||||
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
|
||||
for %%f in (lib\glob lib\fnmatch) do echo %%f.o >> respf.$$$
|
||||
rem gcc -c -I./src -I%XSRC% -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/guile.c -o guile.o
|
||||
rem echo guile.o >> respf.$$$
|
||||
@echo Linking...
|
||||
@echo on
|
||||
gcc -o make.exe @respf.$$$
|
||||
@echo off
|
||||
if not exist make.exe echo Make.exe build failed...
|
||||
if exist make.exe echo make.exe is now built!
|
||||
if exist make.exe del respf.$$$
|
||||
if exist make.exe copy /Y Basic.mk Makefile
|
||||
goto End
|
||||
|
||||
:SmallEnv
|
||||
echo Your environment is too small. Please enlarge it and run me again.
|
||||
|
||||
:End
|
||||
set XRSC=
|
||||
@echo on
|
||||
11
config/.gitignore
vendored
11
config/.gitignore
vendored
@@ -1,11 +0,0 @@
|
||||
compile
|
||||
config.guess
|
||||
config.rpath
|
||||
config.sub
|
||||
depcomp
|
||||
install-sh
|
||||
mdate-sh
|
||||
missing
|
||||
texinfo.tex
|
||||
*.m4
|
||||
!dospaths.m4
|
||||
@@ -1,49 +0,0 @@
|
||||
2012-01-15 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* dospaths.m4: Use AC_LANG_PROGRAM to encapsulate the test code.
|
||||
Fixes Savannah bug #35256. Patch from Sebastian Pipping.
|
||||
|
||||
2006-03-09 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* dospaths.m4: Add MSYS to the list of targets allowing DOS-style
|
||||
pathnames. Reported by David Ergo <david.ergo@alterface.com>.
|
||||
|
||||
2005-07-01 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Added more M4 files to EXTRA_DIST, so
|
||||
users can re-run aclocal.
|
||||
|
||||
2003-04-30 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* dospaths.m4: New macro to test for DOS-style pathnames, based on
|
||||
coreutils 5.0 "dos.m4" by Jim Meyering.
|
||||
|
||||
2002-04-21 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* codeset.m4: New file, from gettext-0.11.1.
|
||||
* gettext.m4: New file, from gettext-0.11.1.
|
||||
* glibc21.m4: New file, from gettext-0.11.1.
|
||||
* iconv.m4: New file, from gettext-0.11.1.
|
||||
* isc-posix.m4: New file, from gettext-0.11.1.
|
||||
* lcmessage.m4: New file, from gettext-0.11.1.
|
||||
* lib-ld.m4: New file, from gettext-0.11.1.
|
||||
* lib-link.m4: New file, from gettext-0.11.1.
|
||||
* lib-prefix.m4: New file, from gettext-0.11.1.
|
||||
* progtest.m4: New file, from gettext-0.11.1.
|
||||
* Makefile.am: New file.
|
||||
|
||||
|
||||
Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -1,18 +0,0 @@
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 3 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Autoconf / automake know how to handle this directory.
|
||||
209
configure.ac
209
configure.ac
@@ -1,6 +1,6 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
# Copyright (C) 1993-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
@@ -16,20 +16,32 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_INIT([GNU make],[3.99.93],[bug-make@gnu.org])
|
||||
AC_INIT([GNU make],[4.2.93],[bug-make@gnu.org])
|
||||
|
||||
AC_PREREQ([2.62])
|
||||
AC_PREREQ([2.69])
|
||||
|
||||
# Autoconf setup
|
||||
AC_CONFIG_AUX_DIR([config])
|
||||
AC_CONFIG_SRCDIR([vpath.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_SRCDIR([src/vpath.c])
|
||||
AC_CONFIG_HEADERS([src/config.h])
|
||||
|
||||
AC_CONFIG_LIBOBJ_DIR([lib])
|
||||
|
||||
# Automake setup
|
||||
AM_INIT_AUTOMAKE([1.11.1 silent-rules])
|
||||
# We have to enable "foreign" because ChangeLog is auto-generated
|
||||
# Automake 1.15 and gnulib don't get along: gnulib has some strange error
|
||||
# in the way it handles getloadavg.c which causes make distcheck to fail.
|
||||
# http://lists.gnu.org/archive/html/bug-gnulib/2018-06/msg00024.html
|
||||
AM_INIT_AUTOMAKE([1.16.1 foreign -Werror -Wall])
|
||||
|
||||
# Checks for programs.
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_PROG_CC
|
||||
|
||||
# Configure gnulib
|
||||
gl_EARLY
|
||||
gl_INIT
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CPP
|
||||
@@ -42,10 +54,10 @@ AC_CANONICAL_HOST
|
||||
AC_AIX
|
||||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
# Enable gettext, in "external" mode.
|
||||
|
||||
AM_GNU_GETTEXT_VERSION([0.18.1])
|
||||
AM_GNU_GETTEXT_VERSION([0.19.4])
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
# This test must come as early as possible after the compiler configuration
|
||||
@@ -62,22 +74,18 @@ AC_HEADER_DIRENT
|
||||
AC_HEADER_STAT
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS([stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
||||
memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h])
|
||||
memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h \
|
||||
sys/select.h sys/file.h spawn.h])
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIGNAL
|
||||
AC_TYPE_UID_T
|
||||
AC_TYPE_PID_T
|
||||
|
||||
# Find some definition for uintmax_t
|
||||
|
||||
AC_CHECK_TYPE([uintmax_t],[],
|
||||
[ uintmax_t="unsigned long"
|
||||
AC_CHECK_TYPE([unsigned long long],[uintmax_t="unsigned long long"])
|
||||
AC_DEFINE_UNQUOTED([uintmax_t], [$uintmax_t],
|
||||
[Define uintmax_t if not defined in <stdint.h> or <inttypes.h>.])
|
||||
])
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SSIZE_T
|
||||
AC_TYPE_UINTMAX_T
|
||||
|
||||
# Find out whether our struct stat returns nanosecond resolution timestamps.
|
||||
|
||||
@@ -119,8 +127,8 @@ AC_CACHE_CHECK([for standard gettimeofday], [ac_cv_func_gettimeofday],
|
||||
int main ()
|
||||
{
|
||||
struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
|
||||
exit (gettimeofday (&t, 0) != 0
|
||||
|| t.tv_sec < 0 || t.tv_usec < 0);
|
||||
return gettimeofday (&t, 0) != 0
|
||||
|| t.tv_sec < 0 || t.tv_usec < 0;
|
||||
}]])],
|
||||
[ac_cv_func_gettimeofday=yes],
|
||||
[ac_cv_func_gettimeofday=no],
|
||||
@@ -130,11 +138,12 @@ AS_IF([test "$ac_cv_func_gettimeofday" = yes],
|
||||
[Define to 1 if you have a standard gettimeofday function])
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS([strdup strndup mkstemp mktemp fdopen fileno \
|
||||
AC_CHECK_FUNCS([strdup strndup memrchr umask mkstemp mktemp fdopen \
|
||||
dup dup2 getcwd realpath sigsetmask sigaction \
|
||||
getgroups seteuid setegid setlinebuf setreuid setregid \
|
||||
getrlimit setrlimit setvbuf pipe strerror strsignal \
|
||||
lstat readlink atexit])
|
||||
getrlimit setrlimit setvbuf pipe strsignal \
|
||||
lstat readlink atexit isatty ttyname pselect posix_spawn \
|
||||
posix_spawnattr_setsigmask])
|
||||
|
||||
# We need to check declarations, not just existence, because on Tru64 this
|
||||
# function is not declared without special flags, which themselves cause
|
||||
@@ -142,6 +151,8 @@ AC_CHECK_FUNCS([strdup strndup mkstemp mktemp fdopen fileno \
|
||||
AC_CHECK_DECLS([bsd_signal], [], [], [[#define _GNU_SOURCE 1
|
||||
#include <signal.h>]])
|
||||
|
||||
AC_FUNC_FORK
|
||||
|
||||
AC_FUNC_SETVBUF_REVERSED
|
||||
|
||||
# Rumor has it that strcasecmp lives in -lresolv on some odd systems.
|
||||
@@ -151,47 +162,36 @@ AC_CHECK_FUNCS([strcasecmp strncasecmp strcmpi strncmpi stricmp strnicmp])
|
||||
|
||||
# strcoll() is used by the GNU glob library
|
||||
AC_FUNC_STRCOLL
|
||||
|
||||
AC_FUNC_ALLOCA
|
||||
AC_FUNC_CLOSEDIR_VOID
|
||||
|
||||
# dir.c and our glob.c use dirent.d_type if available
|
||||
AC_STRUCT_DIRENT_D_TYPE
|
||||
|
||||
# See if the user wants to add (or not) GNU Guile support
|
||||
PKG_PROG_PKG_CONFIG
|
||||
AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile],
|
||||
[Support GNU Guile for embedded scripting])])
|
||||
|
||||
# For some strange reason, at least on Ubuntu, each version of Guile
|
||||
# comes with it's own PC file so we have to specify them as individual
|
||||
# packages. Ugh.
|
||||
AS_IF([test "x$with_guile" != xno],
|
||||
[ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes],
|
||||
[PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes],
|
||||
[have_guile=no])])
|
||||
])
|
||||
# Annoyingly, each version of Guile comes with it's own PC file so we have to
|
||||
# specify them as individual packages. Ugh.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
AS_IF([test "$have_guile" = yes],
|
||||
[AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])])
|
||||
AS_IF([test "x$with_guile" != xno],
|
||||
[ guile_versions="2.2 2.0 1.8"
|
||||
guile_version=no
|
||||
have_guile=no
|
||||
AC_MSG_CHECKING([for GNU Guile])
|
||||
for v in $guile_versions; do
|
||||
PKG_CHECK_EXISTS([guile-$v], [guile_version=$v; have_guile=yes; break], [])
|
||||
done
|
||||
AC_MSG_RESULT([$guile_version])
|
||||
if test "$have_guile" = yes; then
|
||||
PKG_CHECK_MODULES(GUILE, [guile-$guile_version])
|
||||
AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])
|
||||
fi
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes])
|
||||
|
||||
AC_FUNC_GETLOADAVG
|
||||
|
||||
# AC_FUNC_GETLOADAVG is documented to set the NLIST_STRUCT value, but it
|
||||
# doesn't. So, we will.
|
||||
|
||||
AS_IF([test "$ac_cv_header_nlist_h" = yes],
|
||||
[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
|
||||
[[struct nlist nl;
|
||||
nl.n_name = "string";
|
||||
return 0;]])],
|
||||
[make_cv_nlist_struct=yes],
|
||||
[make_cv_nlist_struct=no])
|
||||
AS_IF([test "$make_cv_nlist_struct" = yes],
|
||||
[ AC_DEFINE([NLIST_STRUCT], [1],
|
||||
[Define to 1 if struct nlist.n_name is a pointer rather than an array.])
|
||||
])
|
||||
])
|
||||
|
||||
AC_CHECK_DECLS([sys_siglist, _sys_siglist, __sys_siglist], , ,
|
||||
[AC_INCLUDES_DEFAULT
|
||||
#include <signal.h>
|
||||
@@ -243,8 +243,8 @@ AS_IF([test "$PATH_SEPARATOR" = ';'],
|
||||
AC_SUBST([REMOTE]) REMOTE=stub
|
||||
use_customs=false
|
||||
AC_ARG_WITH([customs],
|
||||
[ AC_HELP_STRING([--with-customs=DIR],
|
||||
[enable remote jobs via Customs--see README.customs])],
|
||||
[AC_HELP_STRING([--with-customs=DIR],
|
||||
[enable remote jobs via Customs--see README.customs])],
|
||||
[ AS_CASE([$withval], [n|no], [:],
|
||||
[make_cppflags="$CPPFLAGS"
|
||||
AS_CASE([$withval],
|
||||
@@ -317,20 +317,20 @@ AC_ARG_ENABLE([load],
|
||||
[make_cv_load="$enableval" user_load="$enableval"],
|
||||
[make_cv_load="yes"])
|
||||
|
||||
AS_CASE([/$ac_cv_func_dlopen/$ac_cv_func_dlsym/$ac_cv_func_dlerror/],
|
||||
AS_CASE([/$ac_cv_have_decl_dlopen/$ac_cv_have_decl_dlsym/$ac_cv_have_decl_dlerror/],
|
||||
[*/no/*], [make_cv_load=no])
|
||||
|
||||
# We might need -ldl
|
||||
AS_IF([test "$make_cv_load" = yes], [
|
||||
AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=])
|
||||
])
|
||||
|
||||
AS_CASE([/$make_cv_load/$user_load/],
|
||||
[*/no/*], [make_cv_load=no],
|
||||
[AC_DEFINE(MAKE_LOAD, 1,
|
||||
[Define to 1 to enable 'load' support in GNU make.])
|
||||
])
|
||||
|
||||
# We might need -ldl
|
||||
AS_IF([test "$make_cv_load" = yes], [
|
||||
AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=])
|
||||
])
|
||||
|
||||
# If we want load support, we might need to link with export-dynamic.
|
||||
# See if we can figure it out. Unfortunately this is very difficult.
|
||||
# For example passing -rdynamic to the SunPRO linker gives a warning
|
||||
@@ -360,6 +360,43 @@ AS_IF([test "$ac_cv_func_lstat" = yes && test "$ac_cv_func_readlink" = yes],
|
||||
[Define to 1 to enable symbolic link timestamp checking.])
|
||||
])
|
||||
|
||||
# Use posix_spawn if we have support and the user didn't disable it
|
||||
|
||||
AC_ARG_ENABLE([posix-spawn],
|
||||
AC_HELP_STRING([--disable-posix-spawn],
|
||||
[disable support for posix_spawn()]),
|
||||
[make_cv_posix_spawn="$enableval" user_posix_spawn="$enableval"],
|
||||
[make_cv_posix_spawn="yes"])
|
||||
|
||||
AS_CASE([/$ac_cv_header_spawn/$ac_cv_func_posix_spawn/],
|
||||
[*/no/*], [make_cv_posix_spawn=no])
|
||||
|
||||
AS_IF([test "$make_cv_posix_spawn" = yes],
|
||||
AC_CACHE_CHECK([for posix_spawn that fails synchronously],
|
||||
[make_cv_synchronous_posix_spawn],
|
||||
[make_cv_synchronous_posix_spawn=no
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <spawn.h>
|
||||
#include <string.h>
|
||||
|
||||
extern char **environ;
|
||||
|
||||
int main() {
|
||||
char* path = strdup("./non-existent");
|
||||
char *argv[[2]];
|
||||
argv[[0]] = path;
|
||||
argv[[1]] = 0;
|
||||
return posix_spawn(0, path, 0, 0, argv, environ);
|
||||
}]])],
|
||||
[make_cv_synchronous_posix_spawn=no],
|
||||
[make_cv_synchronous_posix_spawn=yes],
|
||||
[make_cv_synchronous_posix_spawn="no (cross-compiling)"])]))
|
||||
|
||||
AS_CASE([/$user_posix_spawn/$make_cv_posix_spawn/$make_cv_synchronous_posix_spawn/],
|
||||
[*/no/*], [make_cv_posix_spawn=no],
|
||||
[AC_DEFINE(USE_POSIX_SPAWN, 1, [Define to 1 to use posix_spawn().])
|
||||
])
|
||||
|
||||
# Find the SCCS commands, so we can include them in our default rules.
|
||||
|
||||
AC_CACHE_CHECK([for location of SCCS get command], [make_cv_path_sccs_get], [
|
||||
@@ -387,33 +424,6 @@ AS_IF([(/usr/sccs/admin -n s.conftest || admin -n s.conftest) >/dev/null 2>&1 &&
|
||||
])
|
||||
rm -f s.conftest conftoast
|
||||
|
||||
# Check the system to see if it provides GNU glob. If not, use our
|
||||
# local version.
|
||||
AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
|
||||
[ AC_EGREP_CPP([gnu glob],[
|
||||
#include <features.h>
|
||||
#include <glob.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#define GLOB_INTERFACE_VERSION 1
|
||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||
# include <gnu-versions.h>
|
||||
# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
||||
gnu glob
|
||||
# endif
|
||||
#endif],
|
||||
[make_cv_sys_gnu_glob=yes],
|
||||
[make_cv_sys_gnu_glob=no])])
|
||||
AS_IF([test "$make_cv_sys_gnu_glob" = no],
|
||||
[ GLOBINC='-I$(srcdir)/glob'
|
||||
GLOBLIB=glob/libglob.a
|
||||
])
|
||||
AC_SUBST([GLOBINC])
|
||||
AC_SUBST([GLOBLIB])
|
||||
|
||||
# Tell automake about this, so it can build the right .c files.
|
||||
AM_CONDITIONAL([USE_LOCAL_GLOB], [test "$make_cv_sys_gnu_glob" = no])
|
||||
|
||||
# Let the makefile know what our build host is
|
||||
|
||||
AC_DEFINE_UNQUOTED([MAKE_HOST],["$host"],[Build host information.])
|
||||
@@ -496,21 +506,22 @@ AS_IF([test "x$make_cv_load" = xno && test "x$user_load" = xyes],
|
||||
echo
|
||||
])
|
||||
|
||||
AS_IF([test "x$make_cv_posix_spawn" = xno && test "x$user_posix_spawn" = xyes],
|
||||
[ echo
|
||||
echo "WARNING: posix_spawn() is not supported on this system."
|
||||
echo
|
||||
])
|
||||
|
||||
# Specify what files are to be created.
|
||||
AC_CONFIG_FILES([Makefile glob/Makefile po/Makefile.in config/Makefile \
|
||||
doc/Makefile w32/Makefile])
|
||||
AC_CONFIG_FILES([Makefile build.cfg lib/Makefile po/Makefile.in doc/Makefile \
|
||||
tests/config-flags.pm])
|
||||
# We don't need this: the standard automake output suffices for POSIX systems.
|
||||
#mk/Posix.mk
|
||||
|
||||
# OK, do it!
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
# We only generate the build.sh if we have a build.sh.in; we won't have
|
||||
# one before we've created a distribution.
|
||||
AS_IF([test -f "$srcdir/build.sh.in"],
|
||||
[ ./config.status --file build.sh
|
||||
chmod +x build.sh
|
||||
])
|
||||
|
||||
dnl Local Variables:
|
||||
dnl comment-start: "dnl "
|
||||
dnl comment-end: ""
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
@echo off
|
||||
rem Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
rem This file is part of GNU Make.
|
||||
rem
|
||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||
rem the terms of the GNU General Public License as published by the Free
|
||||
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||
rem any later version.
|
||||
rem
|
||||
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||
rem more details.
|
||||
rem
|
||||
rem You should have received a copy of the GNU General Public License along
|
||||
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
echo Configuring MAKE for DJGPP
|
||||
|
||||
rem The SmallEnv trick protects against too small environment block,
|
||||
rem in which case the values will be truncated and the whole thing
|
||||
rem goes awry. COMMAND.COM will say "Out of environment space", but
|
||||
rem many people don't care, so we force them to care by refusing to go.
|
||||
|
||||
rem Where is the srcdir?
|
||||
set XSRC=.
|
||||
if not "%XSRC%"=="." goto SmallEnv
|
||||
if "%1%"=="" goto SrcDone
|
||||
set XSRC=%1
|
||||
if not "%XSRC%"=="%1" goto SmallEnv
|
||||
|
||||
:SrcDone
|
||||
|
||||
update %XSRC%/configh.dos ./config.h
|
||||
|
||||
rem Do they have Make?
|
||||
redir -o junk.$$$ -eo make -n -f NUL
|
||||
rem REDIR will return 1 if it cannot run Make.
|
||||
rem If it can run Make, it will usually return 2,
|
||||
rem but 0 is also OK with us.
|
||||
if errorlevel 2 goto MakeOk
|
||||
if not errorlevel 1 goto MakeOk
|
||||
if exist junk.$$$ del junk.$$$
|
||||
echo No Make program found--use DOSBUILD.BAT to build Make.
|
||||
goto End
|
||||
|
||||
rem They do have Make. Generate the Makefile.
|
||||
|
||||
:MakeOk
|
||||
del junk.$$$
|
||||
update %XSRC%/Makefile.DOS ./Makefile
|
||||
echo Done.
|
||||
if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"
|
||||
goto End
|
||||
|
||||
:SmallEnv
|
||||
echo Your environment is too small. Please enlarge it and run me again.
|
||||
|
||||
:End
|
||||
set XRSC=
|
||||
92
dep.h
92
dep.h
@@ -1,92 +0,0 @@
|
||||
/* Definitions of dependency data structures for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Flag bits for the second argument to 'read_makefile'.
|
||||
These flags are saved in the 'changed' field of each
|
||||
'struct dep' in the chain returned by 'read_all_makefiles'. */
|
||||
|
||||
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
||||
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
||||
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
||||
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
||||
#define RM_NOFLAG 0
|
||||
|
||||
/* Structure representing one dependency of a file.
|
||||
Each struct file's 'deps' points to a chain of these,
|
||||
chained through the 'next'. 'stem' is the stem for this
|
||||
dep line of static pattern rule or NULL.
|
||||
|
||||
Note that the first two words of this match a struct nameseq. */
|
||||
|
||||
struct dep
|
||||
{
|
||||
struct dep *next;
|
||||
const char *name;
|
||||
const char *stem;
|
||||
struct file *file;
|
||||
unsigned int changed : 8;
|
||||
unsigned int ignore_mtime : 1;
|
||||
unsigned int staticpattern : 1;
|
||||
unsigned int need_2nd_expansion : 1;
|
||||
unsigned int dontcare : 1;
|
||||
};
|
||||
|
||||
|
||||
/* Structure used in chains of names, for parsing and globbing. */
|
||||
|
||||
struct nameseq
|
||||
{
|
||||
struct nameseq *next;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
#define PARSEFS_NONE 0x0000
|
||||
#define PARSEFS_NOSTRIP 0x0001
|
||||
#define PARSEFS_NOAR 0x0002
|
||||
#define PARSEFS_NOGLOB 0x0004
|
||||
#define PARSEFS_EXISTS 0x0008
|
||||
#define PARSEFS_NOCACHE 0x0010
|
||||
|
||||
#define PARSE_FILE_SEQ(_s,_t,_c,_p,_f) \
|
||||
(_t *)parse_file_seq ((_s),sizeof (_t),(_c),(_p),(_f))
|
||||
#define PARSE_SIMPLE_SEQ(_s,_t) \
|
||||
(_t *)parse_file_seq ((_s),sizeof (_t),MAP_NUL,NULL,PARSEFS_NONE)
|
||||
|
||||
#ifdef VMS
|
||||
void *parse_file_seq ();
|
||||
#else
|
||||
void *parse_file_seq (char **stringp, unsigned int size,
|
||||
int stopmap, const char *prefix, int flags);
|
||||
#endif
|
||||
|
||||
char *tilde_expand (const char *name);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
struct nameseq *ar_glob (const char *arname, const char *member_pattern, unsigned int size);
|
||||
#endif
|
||||
|
||||
#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name)
|
||||
|
||||
#define alloc_dep() (xcalloc (sizeof (struct dep)))
|
||||
#define free_ns(_n) free (_n)
|
||||
#define free_dep(_d) free_ns (_d)
|
||||
|
||||
struct dep *copy_dep_chain (const struct dep *d);
|
||||
void free_dep_chain (struct dep *d);
|
||||
void free_ns_chain (struct nameseq *n);
|
||||
struct dep *read_all_makefiles (const char **makefiles);
|
||||
void eval_buffer (char *buffer, const gmk_floc *floc);
|
||||
enum update_status update_goal_chain (struct dep *goals);
|
||||
3
doc/.gitignore
vendored
3
doc/.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
manual/
|
||||
make.t2p/
|
||||
gendocs_template
|
||||
fdl.texi
|
||||
make-stds.texi
|
||||
stamp-vti
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
@@ -22,14 +22,3 @@ info_TEXINFOS = make.texi
|
||||
make_TEXINFOS = fdl.texi make-stds.texi
|
||||
|
||||
CLEANFILES = make*.html
|
||||
|
||||
## ----------------------------- ##
|
||||
## Other documentation formats. ##
|
||||
## ----------------------------- ##
|
||||
|
||||
html: make_1.html
|
||||
|
||||
make_1.html: $(info_TEXINFOS) $(make_TEXINFOS)
|
||||
$(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/make.texi
|
||||
|
||||
.PHONY: html
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH MAKE 1 "03 March 2012" "GNU" "User Commands"
|
||||
.TH MAKE 1 "28 February 2016" "GNU" "User Commands"
|
||||
.SH NAME
|
||||
make \- GNU make utility to maintain groups of programs
|
||||
.SH SYNOPSIS
|
||||
@@ -148,8 +148,12 @@ for debugging while remaking makefiles. Use
|
||||
to disable all previous debugging flags.
|
||||
.TP 0.5i
|
||||
\fB\-e\fR, \fB\-\-environment\-overrides\fR
|
||||
Give variables taken from the environment precedence
|
||||
over variables from makefiles.
|
||||
Give variables taken from the environment precedence over variables
|
||||
from makefiles.
|
||||
.TP 0.5i
|
||||
\fB\-E\fR \fIstring\fR, \fB\-\-eval\fR \fIstring\fR
|
||||
Interpret \fIstring\fR using the \fBeval\fR function, before parsing any
|
||||
makefiles.
|
||||
.TP 0.5i
|
||||
\fB\-f\fR \fIfile\fR, \fB\-\-file\fR=\fIfile\fR, \fB\-\-makefile\fR=\fIFILE\fR
|
||||
Use
|
||||
@@ -270,19 +274,13 @@ Don't define any built\-in variables.
|
||||
\fB\-s\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
|
||||
Silent operation; do not print the commands as they are executed.
|
||||
.TP 0.5i
|
||||
.B \-\-no\-silent
|
||||
Cancel the effect of the \fB\-s\fR option.
|
||||
.TP 0.5i
|
||||
\fB\-S\fR, \fB\-\-no\-keep\-going\fR, \fB\-\-stop\fR
|
||||
Cancel the effect of the
|
||||
.B \-k
|
||||
option.
|
||||
This is never necessary except in a recursive
|
||||
.B make
|
||||
where
|
||||
.B \-k
|
||||
might be inherited from the top-level
|
||||
.B make
|
||||
via MAKEFLAGS or if you set
|
||||
.B \-k
|
||||
in MAKEFLAGS in your environment.
|
||||
.TP 0.5i
|
||||
\fB\-t\fR, \fB\-\-touch\fR
|
||||
Touch files (mark them up to date without really changing them)
|
||||
@@ -363,7 +361,7 @@ This manual page contributed by Dennis Morse of Stanford University.
|
||||
Further updates contributed by Mike Frysinger. It has been reworked by Roland
|
||||
McGrath. Maintained by Paul Smith.
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 1992-1993, 1996-2013 Free Software Foundation, Inc.
|
||||
Copyright \(co 1992-1993, 1996-2020 Free Software Foundation, Inc.
|
||||
This file is part of
|
||||
.IR "GNU make" .
|
||||
.LP
|
||||
970
doc/make.texi
970
doc/make.texi
File diff suppressed because it is too large
Load Diff
65
dosbuild.bat
65
dosbuild.bat
@@ -1,65 +0,0 @@
|
||||
@echo off
|
||||
rem Copyright (C) 1998-2013 Free Software Foundation, Inc.
|
||||
rem This file is part of GNU Make.
|
||||
rem
|
||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||
rem the terms of the GNU General Public License as published by the Free
|
||||
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||
rem any later version.
|
||||
rem
|
||||
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||
rem more details.
|
||||
rem
|
||||
rem You should have received a copy of the GNU General Public License along
|
||||
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
echo Building Make for MSDOS
|
||||
|
||||
rem Echo ON so they will see what is going on.
|
||||
@echo on
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g output.c -o output.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g misc.c -o misc.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g main.c -o main.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g read.c -o read.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g remake.c -o remake.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g rule.c -o rule.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g implicit.c -o implicit.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g default.c -o default.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g variable.c -o variable.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g function.c -o function.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g vpath.c -o vpath.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g hash.c -o hash.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g strcache.c -o strcache.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g version.c -o version.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g ar.c -o ar.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g arscan.c -o arscan.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g signame.c -o signame.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g remote-stub.c -o remote-stub.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt.c -o getopt.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt1.c -o getopt1.o
|
||||
@cd glob
|
||||
@if exist libglob.a del libglob.a
|
||||
gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g glob.c -o glob.o
|
||||
gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g fnmatch.c -o fnmatch.o
|
||||
ar rv libglob.a glob.o fnmatch.o
|
||||
@echo off
|
||||
cd ..
|
||||
echo commands.o > respf.$$$
|
||||
for %%f in (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
||||
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
|
||||
echo glob/libglob.a >> respf.$$$
|
||||
rem gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g guile.c -o guile.o
|
||||
rem echo guile.o >> respf.$$$
|
||||
@echo Linking...
|
||||
@echo on
|
||||
gcc -o make.new @respf.$$$
|
||||
@if exist make.exe echo Make.exe is now built!
|
||||
@if not exist make.exe echo Make.exe build failed...
|
||||
@if exist make.exe del respf.$$$
|
||||
1026
getloadavg.c
1026
getloadavg.c
File diff suppressed because it is too large
Load Diff
71
gl/modules/make-glob
Normal file
71
gl/modules/make-glob
Normal file
@@ -0,0 +1,71 @@
|
||||
Description:
|
||||
GNU make version of fnmatch()/glob() functions. This is a holdover from
|
||||
a very old version of the globbing library.
|
||||
|
||||
|
||||
configure.ac:
|
||||
# Check the system to see if it provides GNU glob. If not, use our
|
||||
# local version.
|
||||
AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
|
||||
[ AC_EGREP_CPP([gnu glob],[
|
||||
#include <features.h>
|
||||
#include <glob.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||
# include <gnu-versions.h>
|
||||
# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
|
||||
gnu glob
|
||||
# endif
|
||||
#endif],
|
||||
[make_cv_sys_gnu_glob=yes],
|
||||
[make_cv_sys_gnu_glob=no])])
|
||||
|
||||
# Tell automake about this, so it can build the right .c files.
|
||||
AM_CONDITIONAL([USE_SYSTEM_GLOB], [test "$make_cv_sys_gnu_glob" = yes])
|
||||
|
||||
# Tell build.sh which to use
|
||||
USE_SYSTEM_GLOB="$make_cv_sys_gnu_glob"
|
||||
AC_SUBST([USE_SYSTEM_GLOB])
|
||||
|
||||
|
||||
Makefile.am:
|
||||
if !USE_SYSTEM_GLOB
|
||||
libgnu_a_SOURCES += fnmatch.c
|
||||
|
||||
BUILT_SOURCES += fnmatch.h
|
||||
|
||||
fnmatch.h: fnmatch.in.h $(top_builddir)/config.status
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
cat $(srcdir)/fnmatch.in.h; \
|
||||
} > $@-t && \
|
||||
mv -f $@-t $@
|
||||
|
||||
MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
|
||||
|
||||
libgnu_a_SOURCES += glob.c
|
||||
|
||||
BUILT_SOURCES += glob.h
|
||||
|
||||
glob.h: glob.in.h $(top_builddir)/config.status
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
cat $(srcdir)/glob.in.h; \
|
||||
} > $@-t && \
|
||||
mv -f $@-t $@
|
||||
|
||||
MOSTLYCLEANFILES += glob.h glob.h-t
|
||||
endif
|
||||
|
||||
EXTRA_DIST += fnmatch.in.h glob.in.h
|
||||
|
||||
|
||||
Include:
|
||||
<glob.h>
|
||||
|
||||
License:
|
||||
LGPLv2+
|
||||
|
||||
Maintainer:
|
||||
all, glibc
|
||||
481
glob/COPYING.LIB
481
glob/COPYING.LIB
@@ -1,481 +0,0 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
185
glob/ChangeLog
185
glob/ChangeLog
@@ -1,185 +0,0 @@
|
||||
2008-09-28 Juan Manuel Guerrero <juan.guerrero@gmx.de>
|
||||
|
||||
* glob.c (my_realloc) [__DJGPP__]: Don't define, and don't
|
||||
redefine realloc to call it, since the DJGPP's realloc handles
|
||||
NULL pointers correctly.
|
||||
|
||||
2007-12-22 Juan Manuel Guerrero <juan.guerrero@gmx.de> (tiny change)
|
||||
|
||||
* glob.c [__GNU_LIBRARY__ && __DJGPP__]: Add a realloc
|
||||
declaration that matches the one in the DJGPP libc.
|
||||
|
||||
2006-02-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* glob.c (my_malloc) [WINDOWS32]: Provide a full ISO C prototype,
|
||||
to avoid compiler warnings.
|
||||
|
||||
2005-06-25 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* fnmatch.h, glob.h [WINDOWS32]: Fix ifdefs in headers.
|
||||
Fixes Savannah bug #13477.
|
||||
|
||||
2005-03-11 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* glob.c (glob_in_dir): Change FNM_CASEFOLD to be enabled if
|
||||
HAVE_CASE_INSENSITIVE_FS is defined.
|
||||
|
||||
2003-01-30 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* glob.h: Patch for FreeBSD by Mike Barcroft <mike@freebsd.org>
|
||||
Reported by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>. On
|
||||
FreeBSD, declare __size_t to simply size_t.
|
||||
|
||||
2002-04-22 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Makefile.am: Use automake 1.6.
|
||||
Use new automake condition USE_LOCAL_GLOB to decide whether or not
|
||||
to build the local GNU glob library or use the system one.
|
||||
|
||||
1999-09-12 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* fnmatch.c: Last GLIBC version wouldn't compile outside of GLIBC
|
||||
(undefined reference to internal_function). Update to the latest
|
||||
version
|
||||
|
||||
1999-09-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* glob.h (glob): If #defining to glob64, do this before
|
||||
declaring it, so that all declarations and uses match, and
|
||||
do not declare glob64, to avoid a declaration clash.
|
||||
(globfree): Likewise with globfree64.
|
||||
|
||||
1999-09-08 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* glob.c (prefix_array) [__MSDOS__,WINDOWS32]: Keep the trailing
|
||||
slash unless DIRNAME is just "x:/".
|
||||
|
||||
1999-09-06 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* fnmatch.c: Update to latest version from GLIBC.
|
||||
|
||||
1999-07-21 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* glob.c, glob.h, fnmatch.c, fnmatch.h: Update to latest version
|
||||
from GLIBC.
|
||||
|
||||
* fnmatch.c (internal_fnmatch): Use K&R definition syntax, not ANSI.
|
||||
(__strchrnul): This won't exist outside GLIBC, so create one.
|
||||
|
||||
* glob.c: Move getlogin{,_r} prototypes below glob.h to get __P()
|
||||
macro.
|
||||
|
||||
1998-08-05 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* configure.in: Remove; configuration for glob is handled by the
|
||||
make configure.in.
|
||||
|
||||
1998-07-29 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* glob.c, fnmatch.c: New versions from the GLIBC folks (Ulrich
|
||||
Drepper). Fixes a bug reported by Eli Zaretski. Integrates
|
||||
DOS/Windows32 support.
|
||||
|
||||
1998-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* glob.c (glob): Cast away const on assignment of pattern to dirname.
|
||||
Cast the return type of __alloca() for traditional C compilers.
|
||||
|
||||
1998-07-23 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* glob.c, fnmatch.c: New versions of these files from the GLIBC
|
||||
folks (Ulrich Drepper). Had to re-integrate some DOS/Windows
|
||||
code.
|
||||
|
||||
1998-07-10 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* glob.c (glob_in_dir): If no meta chars exist in PATTERN and
|
||||
GLOB_NOCHECK is present, don't look for the file--whether it's
|
||||
found or not, we'll always return it, so why bother searching?
|
||||
|
||||
Also, if we are searching and there are no meta chars, don't
|
||||
bother trying fnmatch() if the strcmp() fails.
|
||||
|
||||
1998-05-30 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* glob.c (glob) [__MSDOS__, WINDOWS32]: Compute the directory and
|
||||
filename parts of the pattern correctly when it includes a drive
|
||||
spec. Disallow wildcards in the drive spec. Prevent recursion
|
||||
when dirname is of the form "d:/" or "d:".
|
||||
(prefix_array) [__MSDOS__, WINDOWS32]: Don't append a slash to
|
||||
"d:/" and "d:".
|
||||
|
||||
1998-05-13 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* SMakefile, Makefile.ami, glob.c, glob.h, fnmatch.c: Updated from
|
||||
the latest glibc version.
|
||||
|
||||
1998-04-17 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* configure.in: Create a config.h file instead of setting things
|
||||
on the compile line. This is because when build.sh runs it merely
|
||||
passes -DHAVE_CONFIG_H to the glob files, just as it does to the
|
||||
make files.
|
||||
* config.h.in: Created by autoheader.
|
||||
|
||||
Tue Aug 12 10:52:34 1997 Paul D. Smith <psmith@baynetworks.com>
|
||||
|
||||
* configure.in: Require autoconf 2.12.
|
||||
|
||||
* glob: Updates from latest GNU libc glob code.
|
||||
|
||||
* glob.c,glob.h,fnmatch.h: Change all WIN32 references to WINDOWS32.
|
||||
|
||||
* glob.h: OSF4 defines macros in such a way that GLOB_ALTDIRFUNC
|
||||
is not defined. Added a test to the #if which defines it if
|
||||
_GNU_SOURCE is defined; that's set by both glob.c and GNU make.
|
||||
|
||||
* glob.c: SunOS4 w/ cc needs #include <stdio.h>, since assert.h
|
||||
requires stderr but doesn't include stdio.h :-/.
|
||||
(next_brace_sub): De-protoize function definition.
|
||||
(glob): Cast __alloca(); on SunOS4 it uses the default return type
|
||||
of int.
|
||||
(glob): Irix defines getlogin_r() to return a char*; move the
|
||||
extern for that into the _LIBC area since it isn't used except in
|
||||
LIBC anyway. Likewise, move extern getlogin() into the "else".
|
||||
|
||||
Sat Jul 20 21:55:31 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
||||
|
||||
Win32 hacks from <Rob_Tulloh@tivoli.com>.
|
||||
* posix/glob.c [WIN32]: Don't include <pwd.h>; don't use d_ino;
|
||||
use void * for my_realloc; include <malloc.h> for alloca.
|
||||
(glob) [WIN32]: Use "c:/users/default" for ~ if no HOME variable.
|
||||
* posix/fnmatch.h [WIN32]: Use prototypes even if [!__STDC__].
|
||||
* posix/glob.h: Likewise.
|
||||
|
||||
Fri Jul 19 16:56:41 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
||||
|
||||
* posix/glob.h [!_AMIGA && !VMS]: Check this instead of just [!_AMIGA]
|
||||
for `struct stat;' forward decl.
|
||||
|
||||
Sat Jun 22 10:44:09 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
||||
|
||||
* posix/glob.c: Include <alloca.h> only [HAVE_ALLOCA_H], not [sparc].
|
||||
|
||||
Fri Jun 21 00:27:51 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
||||
|
||||
* posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
|
||||
only for ?s, not for *s. Fix from Chet Ramey.
|
||||
|
||||
|
||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||
Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -1,67 +0,0 @@
|
||||
# Makefile for standalone libglob.a (fnmatch, glob). -*-Makefile-*-
|
||||
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||
VPATH = /glob/
|
||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
||||
srcdir = /glob/
|
||||
|
||||
CC = sc
|
||||
RM = delete
|
||||
CPPFLAGS =
|
||||
CFLAGS =
|
||||
|
||||
# Information determined by configure.
|
||||
DEFS = Define HAVE_HEADER_STDC Define HAVE_UNISTD_H Define HAVE_STRING_H \
|
||||
Define HAVE_DIRENT_H
|
||||
|
||||
# How to invoke ar.
|
||||
AR = join
|
||||
ARFLAGS = as
|
||||
|
||||
# How to invoke ranlib.
|
||||
RANLIB = ;
|
||||
|
||||
.PHONY: all
|
||||
all: glob.lib
|
||||
|
||||
glob.lib : glob.o fnmatch.o
|
||||
$(AR) $(ARFLAGS) $@ glob.o fnmatch.o
|
||||
$(RANLIB) $@
|
||||
|
||||
# For some reason, Unix make wants the dependencies on the source files.
|
||||
# Otherwise it refuses to use an implicit rule!
|
||||
# And, get this: it doesn't work to use $(srcdir)foo.c!!
|
||||
glob.o: $(srcdir)glob.h $(srcdir)fnmatch.h glob.c
|
||||
fnmatch.o: $(srcdir)fnmatch.h fnmatch.c
|
||||
|
||||
OUTPUT_OPTION =
|
||||
.c.o:
|
||||
$(CC) IDir "" \
|
||||
$(DEFS) $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
|
||||
|
||||
.PHONY: clean realclean glob-clean glob-realclean distclean
|
||||
clean glob-clean:
|
||||
-$(RM) glob.lib "#?.o" core
|
||||
distclean glob-realclean: clean
|
||||
-$(RM) TAGS tags Makefile config.status config.h config.log
|
||||
realcean: distclean
|
||||
|
||||
# For inside the C library.
|
||||
glob.tar glob.tar.Z:
|
||||
$(MAKE) -C .. $@
|
||||
@@ -1,13 +0,0 @@
|
||||
ERRORREXX
|
||||
OPTIMIZE
|
||||
NOVERSION
|
||||
OPTIMIZERTIME
|
||||
OPTIMIZERALIAS
|
||||
DEFINE INCLUDEDIR="include:"
|
||||
DEFINE LIBDIR="lib:"
|
||||
DEFINE NO_ALLOCA
|
||||
DEFINE NO_FLOAT
|
||||
DEFINE NO_ARCHIVES
|
||||
IGNORE=161
|
||||
IGNORE=100
|
||||
STARTUP=cres
|
||||
@@ -1,67 +0,0 @@
|
||||
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
||||
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||
VPATH = /glob/
|
||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
||||
srcdir = /glob/
|
||||
|
||||
CC = sc
|
||||
CPPFLAGS =
|
||||
CFLAGS =
|
||||
MAKE = smake
|
||||
RM = delete
|
||||
|
||||
# Information determined by configure.
|
||||
DEFS = Define HAVE_HEADER_STDC Define HAVE_UNISTD_H Define HAVE_STRING_H \
|
||||
Define HAVE_DIRENT_H
|
||||
|
||||
# How to invoke ar.
|
||||
AR = join
|
||||
ARFLAGS = as
|
||||
|
||||
# How to invoke ranlib.
|
||||
RANLIB = ;
|
||||
|
||||
.PHONY: all
|
||||
all: glob.lib
|
||||
|
||||
glob.lib : glob.o fnmatch.o
|
||||
$(AR) $(ARFLAGS) $@ glob.o fnmatch.o
|
||||
$(RANLIB) $@
|
||||
|
||||
# For some reason, Unix make wants the dependencies on the source files.
|
||||
# Otherwise it refuses to use an implicit rule!
|
||||
# And, get this: it doesn't work to use $(srcdir)foo.c!!
|
||||
glob.o: $(srcdir)glob.h $(srcdir)fnmatch.h glob.c
|
||||
fnmatch.o: $(srcdir)fnmatch.h fnmatch.c
|
||||
|
||||
.c.o:
|
||||
$(CC) IDir "" \
|
||||
$(DEFS) $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
|
||||
|
||||
.PHONY: clean realclean glob-clean glob-realclean distclean
|
||||
clean glob-clean:
|
||||
-$(RM) -f glob.lib *.o core
|
||||
distclean glob-realclean: clean
|
||||
-$(RM) -f TAGS tags Makefile config.status config.h config.log
|
||||
realcean: distclean
|
||||
|
||||
# For inside the C library.
|
||||
glob.tar glob.tar.Z:
|
||||
$(MAKE) -C .. $@
|
||||
@@ -1,43 +0,0 @@
|
||||
@echo off
|
||||
rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
rem 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
rem This file is part of GNU Make.
|
||||
rem
|
||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||
rem the terms of the GNU General Public License as published by the Free
|
||||
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||
rem any later version.
|
||||
rem
|
||||
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||
rem more details.
|
||||
rem
|
||||
rem You should have received a copy of the GNU General Public License along
|
||||
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
echo Configuring glob for DJGPP
|
||||
rem This batch file assumes a unix-type "sed" program
|
||||
|
||||
echo # Makefile generated by "configure.bat"> Makefile
|
||||
|
||||
if exist config.sed del config.sed
|
||||
|
||||
echo "s/@srcdir@/./ ">> config.sed
|
||||
echo "s/@CC@/gcc/ ">> config.sed
|
||||
echo "s/@CFLAGS@/-O2 -g/ ">> config.sed
|
||||
echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H -I../ ">> config.sed
|
||||
echo "s/@AR@/ar/ ">> config.sed
|
||||
echo "s/@RANLIB@/ranlib/ ">> config.sed
|
||||
echo "s/@LDFLAGS@// ">> config.sed
|
||||
echo "s/@DEFS@// ">> config.sed
|
||||
echo "s/@ALLOCA@// ">> config.sed
|
||||
echo "s/@LIBS@// ">> config.sed
|
||||
echo "s/@LIBOBJS@// ">> config.sed
|
||||
echo "s/^Makefile *:/_Makefile:/ ">> config.sed
|
||||
echo "s/^config.h *:/_config.h:/ ">> config.sed
|
||||
|
||||
sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
|
||||
sed -f config2.sed Makefile.in >> Makefile
|
||||
del config.sed
|
||||
del config2.sed
|
||||
159
job.h
159
job.h
@@ -1,159 +0,0 @@
|
||||
/* Definitions for managing subprocesses in GNU Make.
|
||||
Copyright (C) 1992-2013 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "output.h"
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#else
|
||||
# include <sys/file.h>
|
||||
#endif
|
||||
|
||||
/* How to set close-on-exec for a file descriptor. */
|
||||
|
||||
#if !defined F_SETFD
|
||||
# ifdef WINDOWS32
|
||||
# define CLOSE_ON_EXEC(_d) process_noinherit(_d)
|
||||
# else
|
||||
# define CLOSE_ON_EXEC(_d)
|
||||
# endif
|
||||
#else
|
||||
# ifndef FD_CLOEXEC
|
||||
# define FD_CLOEXEC 1
|
||||
# endif
|
||||
# define CLOSE_ON_EXEC(_d) (void) fcntl ((_d), F_SETFD, FD_CLOEXEC)
|
||||
#endif
|
||||
|
||||
#ifdef NO_OUTPUT_SYNC
|
||||
# define RECORD_SYNC_MUTEX(m) \
|
||||
error (NILF, \
|
||||
_("-O[TYPE] (--output-sync[=TYPE]) is not configured for this build."));
|
||||
#else
|
||||
# ifdef WINDOWS32
|
||||
/* For emulations in w32/compat/posixfcn.c. */
|
||||
# define F_GETFD 1
|
||||
# define F_SETLKW 2
|
||||
/* Implementation note: None of the values of l_type below can be zero
|
||||
-- they are compared with a static instance of the struct, so zero
|
||||
means unknown/invalid, see w32/compat/posixfcn.c. */
|
||||
# define F_WRLCK 1
|
||||
# define F_UNLCK 2
|
||||
|
||||
struct flock
|
||||
{
|
||||
short l_type;
|
||||
short l_whence;
|
||||
off_t l_start;
|
||||
off_t l_len;
|
||||
pid_t l_pid;
|
||||
};
|
||||
|
||||
/* This type is actually a HANDLE, but we want to avoid including
|
||||
windows.h as much as possible. */
|
||||
typedef intptr_t sync_handle_t;
|
||||
|
||||
/* Public functions emulated/provided in posixfcn.c. */
|
||||
int fcntl (intptr_t fd, int cmd, ...);
|
||||
intptr_t create_mutex (void);
|
||||
int same_stream (FILE *f1, FILE *f2);
|
||||
|
||||
# define RECORD_SYNC_MUTEX(m) record_sync_mutex(m)
|
||||
void record_sync_mutex (const char *str);
|
||||
void prepare_mutex_handle_string (intptr_t hdl);
|
||||
# else /* !WINDOWS32 */
|
||||
|
||||
typedef int sync_handle_t; /* file descriptor */
|
||||
|
||||
# define RECORD_SYNC_MUTEX(m) (void)(m)
|
||||
|
||||
# endif
|
||||
#endif /* !NO_OUTPUT_SYNC */
|
||||
|
||||
/* Structure describing a running or dead child process. */
|
||||
|
||||
struct child
|
||||
{
|
||||
struct child *next; /* Link in the chain. */
|
||||
|
||||
struct file *file; /* File being remade. */
|
||||
|
||||
char **environment; /* Environment for commands. */
|
||||
char *sh_batch_file; /* Script file for shell commands */
|
||||
char **command_lines; /* Array of variable-expanded cmd lines. */
|
||||
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
||||
|
||||
#ifdef VMS
|
||||
char *comname; /* Temporary command file name */
|
||||
int efn; /* Completion event flag number */
|
||||
int cstatus; /* Completion status */
|
||||
#endif
|
||||
|
||||
unsigned int command_line; /* Index into command_lines. */
|
||||
struct output output; /* Output for this child. */
|
||||
pid_t pid; /* Child process's ID number. */
|
||||
unsigned int remote:1; /* Nonzero if executing remotely. */
|
||||
unsigned int noerror:1; /* Nonzero if commands contained a '-'. */
|
||||
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
||||
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
||||
unsigned int dontcare:1; /* Saved dontcare flag. */
|
||||
};
|
||||
|
||||
extern struct child *children;
|
||||
|
||||
int is_bourne_compatible_shell(const char *path);
|
||||
void new_job (struct file *file);
|
||||
void reap_children (int block, int err);
|
||||
void start_waiting_jobs (void);
|
||||
|
||||
char **construct_command_argv (char *line, char **restp, struct file *file,
|
||||
int cmd_flags, char** batch_file);
|
||||
#ifdef VMS
|
||||
int child_execute_job (char *argv, struct child *child);
|
||||
#else
|
||||
# define FD_STDIN (fileno (stdin))
|
||||
# define FD_STDOUT (fileno (stdout))
|
||||
# define FD_STDERR (fileno (stderr))
|
||||
# if defined(__EMX__)
|
||||
int child_execute_job (int stdin_fd, int stdout_fd, int stderr_fd,
|
||||
char **argv, char **envp);
|
||||
# else
|
||||
void child_execute_job (int stdin_fd, int stdout_fd, int stderr_fd,
|
||||
char **argv, char **envp) __attribute__ ((noreturn));
|
||||
# endif
|
||||
#endif
|
||||
#ifdef _AMIGA
|
||||
void exec_command (char **argv) __attribute__ ((noreturn));
|
||||
#elif defined(__EMX__)
|
||||
int exec_command (char **argv, char **envp);
|
||||
#else
|
||||
void exec_command (char **argv, char **envp) __attribute__ ((noreturn));
|
||||
#endif
|
||||
|
||||
extern unsigned int job_slots_used;
|
||||
|
||||
void block_sigs (void);
|
||||
#ifdef POSIX
|
||||
void unblock_sigs (void);
|
||||
#else
|
||||
#ifdef HAVE_SIGSETMASK
|
||||
extern int fatal_signal_mask;
|
||||
#define unblock_sigs() sigsetmask (0)
|
||||
#else
|
||||
#define unblock_sigs()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern unsigned int jobserver_tokens;
|
||||
11
lib/.gitignore
vendored
Normal file
11
lib/.gitignore
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
*
|
||||
!/.gitignore
|
||||
|
||||
!/fnmatch.c
|
||||
!/fnmatch.in.h
|
||||
/fnmatch.h
|
||||
|
||||
!/glob.c
|
||||
!/glob.in.h
|
||||
/glob.h
|
||||
|
||||
@@ -117,7 +117,7 @@ extern int errno;
|
||||
|
||||
/* When used in the GNU libc the symbol _DIRENT_HAVE_D_TYPE is available
|
||||
if the `d_type' member for `struct dirent' is available. */
|
||||
#ifdef _DIRENT_HAVE_D_TYPE
|
||||
#if defined(_DIRENT_HAVE_D_TYPE) || defined(HAVE_STRUCT_DIRENT_D_TYPE)
|
||||
# define HAVE_D_TYPE 1
|
||||
#endif
|
||||
|
||||
@@ -226,9 +226,6 @@ extern char *alloca ();
|
||||
# endif /* Not _AIX. */
|
||||
# endif /* sparc or HAVE_ALLOCA_H. */
|
||||
# endif /* GCC. */
|
||||
|
||||
# define __alloca alloca
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __GNU_LIBRARY__
|
||||
@@ -283,6 +280,14 @@ extern char *alloca ();
|
||||
#endif
|
||||
#include <glob.h>
|
||||
|
||||
#if !defined __alloca
|
||||
# define __alloca alloca
|
||||
#endif
|
||||
|
||||
#if !defined __stat
|
||||
# define __stat stat
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETLOGIN_R
|
||||
extern int getlogin_r __P ((char *, size_t));
|
||||
#else
|
||||
@@ -369,7 +374,7 @@ glob (pattern, flags, errfunc, pglob)
|
||||
const char *dirname;
|
||||
size_t dirlen;
|
||||
int status;
|
||||
int oldcount;
|
||||
size_t oldcount;
|
||||
|
||||
if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0)
|
||||
{
|
||||
@@ -377,6 +382,11 @@ glob (pattern, flags, errfunc, pglob)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* POSIX requires all slashes to be matched. This means that with
|
||||
a trailing slash we must match only directories. */
|
||||
if (pattern[0] && pattern[strlen (pattern) - 1] == '/')
|
||||
flags |= GLOB_ONLYDIR;
|
||||
|
||||
if (flags & GLOB_BRACE)
|
||||
{
|
||||
const char *begin = strchr (pattern, '{');
|
||||
@@ -384,7 +394,7 @@ glob (pattern, flags, errfunc, pglob)
|
||||
{
|
||||
/* Allocate working buffer large enough for our work. Note that
|
||||
we have at least an opening and closing brace. */
|
||||
int firstc;
|
||||
size_t firstc;
|
||||
char *alt_start;
|
||||
const char *p;
|
||||
const char *next;
|
||||
@@ -855,7 +865,7 @@ glob (pattern, flags, errfunc, pglob)
|
||||
have to glob for the directory, and then glob for
|
||||
the pattern in each directory found. */
|
||||
glob_t dirs;
|
||||
register int i;
|
||||
register size_t i;
|
||||
|
||||
status = glob (dirname,
|
||||
((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE))
|
||||
@@ -1005,7 +1015,7 @@ glob (pattern, flags, errfunc, pglob)
|
||||
if (dirlen > 0)
|
||||
{
|
||||
/* Stick the directory on the front of each name. */
|
||||
int ignore = oldcount;
|
||||
size_t ignore = oldcount;
|
||||
|
||||
if ((flags & GLOB_DOOFFS) && ignore < pglob->gl_offs)
|
||||
ignore = pglob->gl_offs;
|
||||
@@ -1023,7 +1033,7 @@ glob (pattern, flags, errfunc, pglob)
|
||||
if (flags & GLOB_MARK)
|
||||
{
|
||||
/* Append slashes to directory names. */
|
||||
int i;
|
||||
size_t i;
|
||||
struct stat st;
|
||||
for (i = oldcount; i < pglob->gl_pathc; ++i)
|
||||
if (((flags & GLOB_ALTDIRFUNC)
|
||||
@@ -1067,7 +1077,7 @@ globfree (pglob)
|
||||
{
|
||||
if (pglob->gl_pathv != NULL)
|
||||
{
|
||||
register int i;
|
||||
register size_t i;
|
||||
for (i = 0; i < pglob->gl_pathc; ++i)
|
||||
if (pglob->gl_pathv[i] != NULL)
|
||||
free ((__ptr_t) pglob->gl_pathv[i]);
|
||||
@@ -1325,7 +1335,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
|
||||
/* If we shall match only directories use the information
|
||||
provided by the dirent call if possible. */
|
||||
if ((flags & GLOB_ONLYDIR)
|
||||
&& d->d_type != DT_UNKNOWN && d->d_type != DT_DIR)
|
||||
&& d->d_type != DT_UNKNOWN && d->d_type != DT_DIR && d->d_type != DT_LNK)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
@@ -1408,7 +1418,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
|
||||
|
||||
memory_error:
|
||||
{
|
||||
int save = errno;
|
||||
save = errno;
|
||||
if (flags & GLOB_ALTDIRFUNC)
|
||||
(*pglob->gl_closedir) (stream);
|
||||
else
|
||||
5
m4/.gitignore
vendored
Normal file
5
m4/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
*
|
||||
!/.gitignore
|
||||
!/aclocal.m4
|
||||
!/dospaths.m4
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
||||
dnl
|
||||
dnl Automake will incorporate this into its generated aclocal.m4.
|
||||
dnl Copyright (C) 1998-2013 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
dnl This file is part of GNU Make.
|
||||
dnl
|
||||
dnl GNU Make is free software; you can redistribute it and/or modify it under
|
||||
@@ -1,7 +1,7 @@
|
||||
# Test if the system uses DOS-style pathnames (drive specs and backslashes)
|
||||
# By Paul Smith <psmith@gnu.org>. Based on dos.m4 by Jim Meyering.
|
||||
#
|
||||
# Copyright (C) 1993-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
372
maintMakefile
372
maintMakefile
@@ -2,25 +2,58 @@
|
||||
# only if you have the full copy of the GNU make sources from the Git
|
||||
# tree, not a dist copy.
|
||||
|
||||
# --------------------- #
|
||||
# Updating everything. #
|
||||
# --------------------- #
|
||||
|
||||
.PHONY: update
|
||||
update:
|
||||
|
||||
BUGLIST := bug-make@gnu.org
|
||||
|
||||
# These are related to my personal setup.
|
||||
GPG_KEYID := 80CB727A20C79BB2
|
||||
|
||||
# SRCROOTDIR is just a handy location to keep source files in
|
||||
SRCROOTDIR ?= $(HOME)/src
|
||||
|
||||
# Where the gnulib project has been locally cloned
|
||||
GNULIBDIR ?= $(SRCROOTDIR)/gnulib
|
||||
|
||||
# Where to put the CVS checkout of the GNU web repository
|
||||
GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
|
||||
|
||||
# Where to put the CVS checkout of the GNU make web repository
|
||||
MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
|
||||
|
||||
# Enable Perl warnings for the test suite
|
||||
PERLFLAGS := -w
|
||||
|
||||
# We like mondo-warnings!
|
||||
AM_CFLAGS += -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast
|
||||
# Also force comments to be preserved. This helps when using ccache, in
|
||||
# combination with GCC 7's implicit-fallthrough warning.
|
||||
MAKE_CFLAGS := -C -Wall -Wextra -Werror -Wwrite-strings -Wshadow \
|
||||
-Wdeclaration-after-statement -Wbad-function-cast -Wformat-security \
|
||||
-Wtype-limits -Wunused-but-set-parameter -Wlogical-op -Wpointer-arith \
|
||||
-Wignored-qualifiers -Wformat-signedness -Wduplicated-cond
|
||||
|
||||
AM_CFLAGS += $(MAKE_CFLAGS)
|
||||
|
||||
# Unfortunately the Guile headers are sometimes broken. Convince GCC
|
||||
# to treat them as system headers so warnings are ignored.
|
||||
GUILE_CFLAGS := $(patsubst -I%,-isystem %,$(GUILE_CFLAGS))
|
||||
|
||||
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
|
||||
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
|
||||
|
||||
# I want this one but I have to wait for the const cleanup!
|
||||
# -Wwrite-strings
|
||||
|
||||
# Find the glob source files... this might be dangerous, but we're maintainers!
|
||||
globsrc := $(wildcard glob/*.c)
|
||||
globhdr := $(wildcard glob/*.h)
|
||||
|
||||
TEMPLATES = README README.DOS README.W32 README.OS2 \
|
||||
config.ami configh.dos config.h.W32 config.h-vms
|
||||
MTEMPLATES = Makefile.DOS SMakefile
|
||||
src/config.ami src/configh.dos src/config.h.W32 src/config.h-vms
|
||||
|
||||
# These are built as a side-effect of the dist rule
|
||||
#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
|
||||
all: $(TEMPLATES)
|
||||
|
||||
# Create preprocessor output files--GCC specific!
|
||||
%.i : %.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $<
|
||||
|
||||
# General rule for turning a .template into a regular file.
|
||||
#
|
||||
@@ -33,46 +66,38 @@ $(TEMPLATES) : % : %.template Makefile
|
||||
|
||||
# Construct Makefiles by adding on dependencies, etc.
|
||||
#
|
||||
$(MTEMPLATES) : % : %.template .dep_segment Makefile
|
||||
cvt = $(patsubst $1/%,$$($1)%,$(filter %.c,$2))
|
||||
Basic.mk: Basic.mk.template .dep_segment Makefile
|
||||
rm -f $@
|
||||
sed -e 's@%VERSION%@$(VERSION)@g' \
|
||||
-e 's@%PROGRAMS%@$(bin_PROGRAMS)@g' \
|
||||
-e 's@%SOURCES%@$(filter-out remote-%,$(make_SOURCES)) remote-$$(REMOTE).c@g' \
|
||||
-e 's@%OBJECTS%@$(filter-out remote-%,$(make_OBJECTS)) remote-$$(REMOTE).o@g' \
|
||||
-e 's@%GLOB_SOURCES%@$(globsrc) $(globhdr)@g' \
|
||||
-e 's@%GLOB_OBJECTS%@$(globsrc:glob/%.c=%.o)@g' \
|
||||
-e 's@%make_SOURCES%@$(call cvt,src,$(make_SRCS))@g' \
|
||||
-e 's@%w32_SOURCES%@$(call cvt,src,$(w32_SRCS))@g' \
|
||||
-e 's@%vms_SOURCES%@$(call cvt,src,$(vms_SRCS))@g' \
|
||||
-e 's@%amiga_SOURCES%@$(call cvt,src,$(amiga_SRCS))@g' \
|
||||
-e 's@%loadavg_SOURCES%@$(call cvt,lib,$(loadavg_SRCS))@g' \
|
||||
-e 's@%alloca_SOURCES%@$(call cvt,lib,$(alloca_SRCS))@g' \
|
||||
-e 's@%glob_SOURCES%@$(call cvt,lib,$(glob_SRCS))@g' \
|
||||
$< > $@
|
||||
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
||||
cat $(word 2,$^) >>$@
|
||||
sed -e 's@^\([^ ]*\)\.o:@$$(OUTDIR)\1.$$(OBJEXT):@' \
|
||||
-e 's@\([^ ]*\.[ch]\)@$$(SRCDIR)/\1@g' \
|
||||
-e 's@$$(SRCDIR)/src/config.h@$$(OUTDIR)src/config.h@g' \
|
||||
-e 's@$$(SRCDIR)/lib/stdlib.h@@g' \
|
||||
-e 's@$$(SRCDIR)/lib/sys/types.h@@g' \
|
||||
-e 's@$$(SRCDIR)/lib/unistd.h@@g' \
|
||||
$(word 2,$^) >>$@
|
||||
chmod a-w $@
|
||||
|
||||
NMakefile: NMakefile.template .dep_segment Makefile
|
||||
rm -f $@
|
||||
cp $< $@
|
||||
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
||||
sed 's/^\([^ ]*\)\.o:/$$(OUTDIR)\/\1.obj:/' $(word 2,$^) >>$@
|
||||
chmod a-w $@
|
||||
|
||||
# Construct build.sh.in
|
||||
# Use automake to build a dependency list file, for Makebase.mk.
|
||||
#
|
||||
build.sh.in: build.template Makefile
|
||||
rm -f $@
|
||||
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
|
||||
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(globsrc))@g' \
|
||||
$< > $@
|
||||
chmod a-w+x $@
|
||||
|
||||
|
||||
# Use automake to build a dependency list file, for "foreign" makefiles like
|
||||
# Makefile.DOS.
|
||||
#
|
||||
# Automake used to have a --generate-deps flag, but it's gone now, so we have
|
||||
# Automake used to have a --generate-deps flag but it's gone now, so we have
|
||||
# to do it ourselves.
|
||||
#
|
||||
DEP_FILES := $(wildcard $(DEPDIR)/*.Po)
|
||||
DEP_FILES := $(wildcard src/$(DEPDIR)/*.Po)
|
||||
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
||||
rm -f $@
|
||||
(for f in $(DEPDIR)/*.Po; do \
|
||||
(for f in src/$(DEPDIR)/*.Po; do \
|
||||
echo ""; \
|
||||
echo "# $$f"; \
|
||||
sed -e '/^[^:]*\.[ch] *:/d' \
|
||||
@@ -97,45 +122,67 @@ git-very-clean: git-clean
|
||||
-$(GIT) clean -fd
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
# The sections below were stolen from the Makefile.maint used by fileutils,
|
||||
# sh-utils, textutils, CPPI, Bison, and Autoconf.
|
||||
## ---------------------- ##
|
||||
## Generating ChangeLog. ##
|
||||
## ---------------------- ##
|
||||
|
||||
gl2cl-date := 2013-10-10
|
||||
gl2cl := $(GNULIBDIR)/build-aux/gitlog-to-changelog
|
||||
|
||||
# Rebuild the changelog whenever a new commit is added
|
||||
ChangeLog: .check-git-HEAD
|
||||
if test -f '$(gl2cl)'; then \
|
||||
'$(gl2cl)' --since='$(gl2cl-date)' > '$@'; \
|
||||
else \
|
||||
echo "WARNING: $(gl2cl) is not available. No $@ generated."; \
|
||||
fi
|
||||
|
||||
.PHONY: .check-git-HEAD
|
||||
.check-git-HEAD:
|
||||
sha="`git rev-parse HEAD`"; \
|
||||
[ -f '$@' ] && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \
|
||||
|| echo "$$sha" > '$@'
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Updating files. ##
|
||||
## ---------------- ##
|
||||
|
||||
WGET = wget --passive-ftp -nv
|
||||
RSYNC = rsync -Lrtvz
|
||||
WGET = wget --passive-ftp -np -nv
|
||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||
|
||||
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
||||
echo $(target) is unchanged; rm -f $(target).t; \
|
||||
else \
|
||||
mv $(target).t $(target); \
|
||||
mv -f $(target).t $(target); \
|
||||
fi
|
||||
|
||||
# ------------------- #
|
||||
# Updating PO files. #
|
||||
# ------------------- #
|
||||
|
||||
# NOTE: This is handled by the bootstrap script now
|
||||
|
||||
#update: po-update
|
||||
update: po-check
|
||||
|
||||
# PO archive mirrors --- Be careful; some might not be fully populated!
|
||||
# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
|
||||
# http://translation.sf.net/maint/
|
||||
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
||||
|
||||
po_wget_flags = --recursive --level=1 --no-directories --no-parent \
|
||||
--no-check-certificate
|
||||
po_repo = http://translationproject.org/latest/$(PACKAGE)
|
||||
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
|
||||
po_repo = https://translationproject.org/latest/$(PACKAGE)
|
||||
po_sync = translationproject.org::tp/latest/$(PACKAGE)/
|
||||
|
||||
.PHONY: do-po-update po-update
|
||||
do-po-update:
|
||||
tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
|
||||
&& rm -rf "$$tmppo" \
|
||||
&& mkdir "$$tmppo" \
|
||||
&& (cd "$$tmppo" \
|
||||
&& $(WGET) $(po_wget_flags) -A '*.po' $(po_repo)) \
|
||||
&& cp "$$tmppo"/*.po $(top_srcdir)/po && rm -rf "$$tmppo"
|
||||
&& $(RSYNC) $(po_sync) "$$tmppo" \
|
||||
&& cp "$$tmppo"/*.po $(top_srcdir)/po \
|
||||
&& rm -rf "$$tmppo"
|
||||
cd po && $(MAKE) update-po
|
||||
$(MAKE) po-check
|
||||
|
||||
@@ -146,22 +193,29 @@ po-update:
|
||||
# Updating GNU build files. #
|
||||
# -------------------------- #
|
||||
|
||||
# Note: this is handled by the bootstrap script now
|
||||
#update: scm-update
|
||||
|
||||
.PHONY: scm-update
|
||||
scm-update: get-build-aux/texinfo.tex get-build-aux/config.guess \
|
||||
get-build-aux/config.sub get-doc/make-stds.texi get-doc/fdl.texi
|
||||
|
||||
# The following pseudo table associates a local directory and a URL
|
||||
# with each of the files that belongs to some other package and is
|
||||
# regularly updated from the specified URL.
|
||||
|
||||
cvs-url = http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
||||
git-url = http://git.savannah.gnu.org/cgit
|
||||
cvs-url = https://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
||||
git-url = https://git.savannah.gnu.org/cgit
|
||||
target = $(patsubst get-%,%,$@)
|
||||
|
||||
config-url = $(git-url)/config.git/plain/$(patsubst get-config/%,%,$@)
|
||||
get-config/config.guess get-config/config.sub:
|
||||
config-url = $(git-url)/config.git/plain/$(patsubst get-build-aux/%,%,$@)
|
||||
get-build-aux/config.guess get-build-aux/config.sub:
|
||||
@echo $(WGET) $(config-url) -O $(target) \
|
||||
&& $(WGET) $(config-url) -O $(target).t \
|
||||
&& $(move_if_change)
|
||||
|
||||
gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-config/%,%,$@)
|
||||
get-config/texinfo.tex:
|
||||
gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-build-aux/%,%,$@)
|
||||
get-build-aux/texinfo.tex:
|
||||
@echo $(WGET) $(gnulib-url) -O $(target) \
|
||||
&& $(WGET) $(gnulib-url) -O $(target).t \
|
||||
&& $(move_if_change)
|
||||
@@ -172,44 +226,74 @@ get-doc/make-stds.texi get-doc/fdl.texi:
|
||||
&& $(WGET) $(gnustandards-url) -O $(target).t \
|
||||
&& $(move_if_change)
|
||||
|
||||
.PHONY: scm-update
|
||||
scm-update: get-config/texinfo.tex get-config/config.guess get-config/config.sub get-doc/make-stds.texi get-doc/fdl.texi
|
||||
|
||||
|
||||
# --------------------- #
|
||||
# Updating everything. #
|
||||
# --------------------- #
|
||||
|
||||
.PHONY: update
|
||||
update: po-update scm-update
|
||||
|
||||
|
||||
# ---------------------------------- #
|
||||
# Alternative configuration checks. #
|
||||
# ---------------------------------- #
|
||||
|
||||
.PHONY: check-alt-config
|
||||
check-alt-config: \
|
||||
CONFIG_CHECKS := \
|
||||
checkcfg.--disable-job-server \
|
||||
checkcfg.--disable-load \
|
||||
checkcfg.--without-guile \
|
||||
checkcfg.--disable-posix-spawn \
|
||||
checkcfg.make_cv_sys_gnu_glob^no \
|
||||
checkcfg.ac_cv_func_getloadavg^no+ac_cv_have_decl_getloadavg^no+gl_cv_have_raw_decl_getloadavg^no+ac_cv_lib_util_getloadavg^no+ac_cv_lib_getloadavg_getloadavg^no \
|
||||
checkcfg.CPPFLAGS^-DNO_OUTPUT_SYNC \
|
||||
checkcfg.CPPFLAGS^-DNO_ARCHIVES
|
||||
|
||||
checkcfg.%: distdir
|
||||
@ rm -rf $(distdir)/_build \
|
||||
.PHONY: check-alt-config
|
||||
check-alt-config: $(CONFIG_CHECKS)
|
||||
|
||||
# Trick GNU make so it doesn't run the submake as a recursive make.
|
||||
NR_MAKE = $(MAKE)
|
||||
|
||||
# Check builds both with build.sh and with make
|
||||
$(CONFIG_CHECKS): checkcfg.%: distdir
|
||||
@echo "Building $@ (output in checkcfg.$*.log)"
|
||||
exec >'checkcfg.$*.log' 2>&1; \
|
||||
echo "Testing configure with $(subst ^,=,$(subst +, ,$*))"; set -x; \
|
||||
rm -rf $(distdir)/_build \
|
||||
&& mkdir $(distdir)/_build \
|
||||
&& cd $(distdir)/_build \
|
||||
&& echo "Testing configure with $(subst ^,=,$*)" \
|
||||
&& ../configure --srcdir=.. $(subst ^,=,$*) \
|
||||
&& ../configure --srcdir=.. $(subst ^,=,$(subst +, ,$*)) \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
|
||||
exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
||||
cd $(distdir)/_build \
|
||||
&& OUTDIR=_bld ../build.sh \
|
||||
&& _bld/make $(AM_MAKEFLAGS) check-local \
|
||||
&& _bld/make $(AM_MAKEFLAGS) clean
|
||||
exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
||||
cd $(distdir)/_build \
|
||||
&& $(NR_MAKE) $(AM_MAKEFLAGS) CFLAGS='$(AM_CFLAGS)' \
|
||||
&& ./make $(AM_MAKEFLAGS) check \
|
||||
&& ./make $(AM_MAKEFLAGS) clean
|
||||
|
||||
# Try using Basic.mk. I can't test this on POSIX systems because it is only
|
||||
# used for non-POSIX systems; POSIX systems can just use normal
|
||||
# configure/Makefile.in etc.
|
||||
checkcfg.basicmk: checkcfg.% : distdir
|
||||
@echo "Building $@ (output in checkcfg.$*.log)"
|
||||
exec >'checkcfg.$*.log' 2>&1; \
|
||||
echo "Testing Basic.mk SRCDIR=.."; set -x; \
|
||||
rm -rf $(distdir)/_build \
|
||||
&& mkdir $(distdir)/_build \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
|
||||
exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
||||
cd $(distdir)/_build \
|
||||
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. CFLAGS='$(AM_CFLAGS)' \
|
||||
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. check \
|
||||
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. clean
|
||||
exec >>'checkcfg.$*.log' 2>&1; \
|
||||
echo "Testing Basic.mk SRCDIR=."; set -x; \
|
||||
&& rm -rf $(distdir)/_build \
|
||||
&& cd $(distdir) \
|
||||
&& ./configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
CFLAGS='$(AM_CFLAGS)' \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check
|
||||
|
||||
|
||||
.PHONY: update
|
||||
update: po-update scm-update
|
||||
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f Basic.mk CFLAGS='$(AM_CFLAGS)' \
|
||||
&& ./make $(AM_MAKEFLAGS) -f Basic.mk check \
|
||||
&& ./make $(AM_MAKEFLAGS) -f Basic.mk clean
|
||||
|
||||
|
||||
## --------------- ##
|
||||
@@ -219,6 +303,8 @@ update: po-update scm-update
|
||||
# Before we build a distribution be sure we run our local checks
|
||||
#distdir: local-check
|
||||
|
||||
.PHONY: local-check po-check changelog-check
|
||||
|
||||
# Checks that don't require Git. Run 'changelog-check' last as
|
||||
# previous test may reveal problems requiring new ChangeLog entries.
|
||||
local-check: po-check changelog-check
|
||||
@@ -234,15 +320,120 @@ changelog-check:
|
||||
fi
|
||||
|
||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||
# Ignore makeint.h; it defines _().
|
||||
# Ignore src/makeint.h; it defines _().
|
||||
po-check:
|
||||
if test -f po/POTFILES.in; then \
|
||||
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
||||
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "makeint.h" || print "$$ARGV\n" and close ARGV }' *.c *.h | sort > $@-2; \
|
||||
find [a-z]* -name '*.[ch]' | xargs grep -l '\b_(' | grep -v src/makeint.h | sort > $@-2; \
|
||||
diff -u $@-1 $@-2 || exit 1; \
|
||||
rm -f $@-1 $@-2; \
|
||||
fi
|
||||
|
||||
|
||||
## --------------- ##
|
||||
## Generate docs. ##
|
||||
## --------------- ##
|
||||
|
||||
.PHONY: update-makeweb gendocs
|
||||
|
||||
CVS = cvs
|
||||
|
||||
makeweb-repo = $(USER)@cvs.sv.gnu.org:/web/make
|
||||
gnuweb-repo = :pserver:anonymous@cvs.sv.gnu.org:/web/www
|
||||
gnuweb-dir = www/server/standards
|
||||
|
||||
# Get the GNU make web page boilerplate etc.
|
||||
update-makeweb:
|
||||
[ -d '$(MAKEWEBDIR)' ] || mkdir -p '$(MAKEWEBDIR)'
|
||||
[ -d '$(MAKEWEBDIR)'/CVS ] \
|
||||
&& { cd '$(MAKEWEBDIR)' && $(CVS) update; } \
|
||||
|| { mkdir -p '$(dir $(MAKEWEBDIR))' && cd '$(dir $(MAKEWEBDIR))' \
|
||||
&& $(CVS) -d $(makeweb-repo) co -d '$(notdir $(MAKEWEBDIR))' make; }
|
||||
|
||||
# Get the GNU web page boilerplate etc.
|
||||
update-gnuweb:
|
||||
[ -d '$(GNUWEBDIR)' ] || mkdir -p '$(GNUWEBDIR)'
|
||||
[ -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS ] \
|
||||
&& { cd '$(GNUWEBDIR)/$(gnuweb-dir)' && $(CVS) update; } \
|
||||
|| { cd '$(GNUWEBDIR)' && $(CVS) -d $(gnuweb-repo) co '$(gnuweb-dir)'; }
|
||||
|
||||
gendocs: update-gnuweb update-makeweb
|
||||
cp $(GNULIBDIR)/doc/gendocs_template doc
|
||||
cd doc \
|
||||
&& rm -rf doc/manual \
|
||||
&& $(GNULIBDIR)/build-aux/gendocs.sh --email '$(BUGLIST)' \
|
||||
make 'GNU Make Manual'
|
||||
find '$(MAKEWEBDIR)'/manual \( -name CVS -prune \) -o \( -name '[!.]*' -type f -exec rm -f '{}' \; \)
|
||||
cp -r doc/manual '$(MAKEWEBDIR)'
|
||||
@echo 'Status of $(MAKEWEBDIR) repo:' && cd '$(MAKEWEBDIR)' \
|
||||
&& cvs -q -n update | grep -v '^M '
|
||||
@echo '- cvs add <new files>' \
|
||||
&& echo '- cvs remove <deleted files>' \
|
||||
&& echo '- cvs commit' \
|
||||
&& echo '- cvs tag make-$(subst .,-,$(VERSION))'
|
||||
|
||||
|
||||
## --------------------------------------------- ##
|
||||
## Submitting Coverity cov-build results to Scan ##
|
||||
## --------------------------------------------- ##
|
||||
|
||||
# Note you must have set COVERITY_TOKEN and COVERITY_EMAIL properly
|
||||
# to submit results. COVERITY_PATH can be set to the root of the
|
||||
# cov-build tools if it's not already on your PATH.
|
||||
|
||||
COV_BUILD_FILE := cov-build.tgz
|
||||
|
||||
.PHONY: cov-build cov-submit
|
||||
|
||||
cov-build: $(COV_BUILD_FILE)
|
||||
|
||||
$(COV_BUILD_FILE): $(filter %.c %.h,$(DISTFILES))
|
||||
$(MAKE) distdir
|
||||
@echo "Running Coverity cov-build"
|
||||
rm -rf '$(distdir)'/_build
|
||||
mkdir '$(distdir)'/_build
|
||||
cd '$(distdir)'/_build \
|
||||
&& ../configure --srcdir=.. \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
CFLAGS='$(AM_CFLAGS)'
|
||||
PATH="$${COVERITY_PATH:+$$COVERITY_PATH/bin:}$$PATH"; \
|
||||
cd '$(distdir)'/_build \
|
||||
&& cov-build --dir cov-int ../build.sh
|
||||
rm -f '$@'
|
||||
(cd '$(distdir)'/_build && tar czf - cov-int) > '$@'
|
||||
|
||||
cov-submit: $(COV_BUILD_FILE)-submitted
|
||||
|
||||
$(COV_BUILD_FILE)-submitted: $(COV_BUILD_FILE)
|
||||
@[ -n "$(COVERITY_TOKEN)" ] || { echo 'COVERITY_TOKEN not set'; exit 1; }
|
||||
@[ -n "$(COVERITY_EMAIL)" ] || { echo 'COVERITY_EMAIL not set'; exit 1; }
|
||||
rm -f '$@'
|
||||
case '$(VERSION)' in \
|
||||
(*.*.9*) type="daily build"; ext=".$$(date +%Y%m%d)" ;; \
|
||||
(*) type="release"; ext= ;; \
|
||||
esac; \
|
||||
curl --form token='$(COVERITY_TOKEN)' \
|
||||
--form email='$(COVERITY_EMAIL)' \
|
||||
--form file='@$<' \
|
||||
--form version="$(VERSION)$$ext" \
|
||||
--form description="GNU make $$type" \
|
||||
'https://scan.coverity.com/builds?project=gmake'
|
||||
cp '$<' '$@'
|
||||
|
||||
|
||||
## ------------------------- ##
|
||||
## Make release targets. ##
|
||||
## ------------------------- ##
|
||||
|
||||
.PHONY: tag-release
|
||||
tag-release:
|
||||
case '$(VERSION)' in \
|
||||
(*.*.9*) message=" candidate" ;; \
|
||||
(*) message= ;; \
|
||||
esac; \
|
||||
$(GIT) tag -m "GNU Make release$$message $(VERSION)" -u '$(GPG_KEYID)' '$(VERSION)'
|
||||
|
||||
|
||||
## ------------------------- ##
|
||||
## GNU FTP upload artifacts. ##
|
||||
## ------------------------- ##
|
||||
@@ -252,7 +443,7 @@ po-check:
|
||||
# you're SOL! :)
|
||||
|
||||
GPG = gpg
|
||||
GPGFLAGS = -u 6338B6D4
|
||||
GPGFLAGS = -u $(GPG_KEYID)
|
||||
|
||||
DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES))
|
||||
DIST_ARCHIVES_DIRECTIVE = $(addsuffix .directive.asc,$(DIST_ARCHIVES))
|
||||
@@ -266,9 +457,9 @@ distsign: $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
|
||||
$(GPG) $(GPGFLAGS) -o "$@" -b "$<"
|
||||
|
||||
%.directive.asc: %
|
||||
@echo "Creating directive file '$@':"
|
||||
@echo "Creating signed directive file '$@':"
|
||||
@( \
|
||||
echo 'version: 1.1'; \
|
||||
echo 'version: 1.2'; \
|
||||
echo 'directory: make'; \
|
||||
echo 'filename: $*'; \
|
||||
echo 'comment: Official upload of GNU make version $(VERSION)'; \
|
||||
@@ -289,7 +480,10 @@ $(UPLOADS): $(DIST_ARCHIVES) $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
|
||||
$(FTPPUT) "$(gnu-upload-host)" "$(gnu-upload-dir)/$(@:upload-%=%)" $^
|
||||
|
||||
|
||||
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||
# Rebuild Makefile.in if this file is modifed.
|
||||
Makefile.in: maintMakefile
|
||||
|
||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
|
||||
175
make-gdb.py
Normal file
175
make-gdb.py
Normal file
@@ -0,0 +1,175 @@
|
||||
import re
|
||||
|
||||
import gdb #pylint: disable=import-error
|
||||
import gdb.printing #pylint: disable=import-error
|
||||
|
||||
# Memoize types we commonly use
|
||||
_TYPES = {}
|
||||
def getType(tname):
|
||||
global _TYPES
|
||||
if tname not in _TYPES:
|
||||
tn = tname.rstrip('*')
|
||||
if tn not in _TYPES:
|
||||
_TYPES[tn] = gdb.lookup_type(tn)
|
||||
while tn != tname:
|
||||
# Want a pointer type
|
||||
t = tn
|
||||
tn += '*'
|
||||
_TYPES[tn] = _TYPES[t].pointer()
|
||||
return _TYPES[tname]
|
||||
|
||||
class ShowArgv(gdb.Function):
|
||||
"""Return the pretty-print of a null-terminated array of strings
|
||||
|
||||
Argument:
|
||||
A char** where the last one is NULL (e.g., argv)
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
gdb.Function.__init__(self, "showargv")
|
||||
|
||||
def invoke(self, argv):
|
||||
str = '['
|
||||
i = 0
|
||||
while argv[i] != 0:
|
||||
if i > 0:
|
||||
str += ', '
|
||||
str += argv[i].string()
|
||||
i += 1
|
||||
str += ']'
|
||||
return str
|
||||
|
||||
ShowArgv()
|
||||
|
||||
|
||||
class FileLocation(object):
|
||||
"""Print a file location"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
if long(self.val['filenm']):
|
||||
return "%s:%d" % (str(self.val['filenm']), self.val['lineno'])
|
||||
return ''
|
||||
|
||||
class VariablePrinter(object):
|
||||
"""Print a struct variable"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
if self.val['append']:
|
||||
a = '+='
|
||||
elif self.val['conditional']:
|
||||
a = '?='
|
||||
else:
|
||||
a = '='
|
||||
flags = []
|
||||
s = str(self.val['flavor'])
|
||||
if s != 'f_bogus':
|
||||
flags.append(s)
|
||||
s = str(self.val['origin'])
|
||||
if s != 'o_default':
|
||||
flags.append(s)
|
||||
s = str(self.val['export'])
|
||||
if s != 'v_default':
|
||||
flags.append(s)
|
||||
return '%s[%s]: "%s" %s "%s"' % (
|
||||
self.val['fileinfo'], ','.join(flags),
|
||||
self.val['name'].string(), a, self.val['value'].string())
|
||||
|
||||
class HashTablePrinter(object):
|
||||
"""Manage a hash table."""
|
||||
|
||||
DELITEM = None
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
return "size=%d, capacity=%d, empty=%d, collisions=%d, rehashes=%d" % (
|
||||
self.val['ht_size'], self.val['ht_capacity'],
|
||||
self.val['ht_empty_slots'], self.val['ht_collisions'],
|
||||
self.val['ht_rehashes'])
|
||||
|
||||
def children(self):
|
||||
for (i, v) in self.iterator():
|
||||
nm = '[%d] ' % i
|
||||
yield (nm, i)
|
||||
yield (nm, v)
|
||||
|
||||
def iterator(self):
|
||||
if HashTablePrinter.DELITEM is None:
|
||||
HashTablePrinter.DELITEM = gdb.lookup_global_symbol('hash_deleted_item').value()
|
||||
lst = self.val['ht_vec']
|
||||
for i in xrange(0, self.val['ht_size']):
|
||||
v = lst[i]
|
||||
if long(v) != 0 and v != HashTablePrinter.DELITEM:
|
||||
yield (i, v)
|
||||
|
||||
def display_hint(self):
|
||||
return 'map'
|
||||
|
||||
class VariableSetPrinter(object):
|
||||
"""Print a variable_set"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.tbl = HashTablePrinter(val['table'])
|
||||
|
||||
def to_string(self):
|
||||
return self.tbl.to_string()
|
||||
|
||||
def children(self):
|
||||
for (i, v) in self.tbl.iterator():
|
||||
ptr = v.cast(getType('struct variable*'))
|
||||
nm = '[%d] ' % (i)
|
||||
yield (nm, ptr)
|
||||
yield (nm, str(ptr.dereference()))
|
||||
|
||||
def display_hint(self):
|
||||
return 'map'
|
||||
|
||||
class VariableSetListPrinter(object):
|
||||
"""Print a variable_set_list"""
|
||||
|
||||
GLOBALSET = None
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
return str(self.val.address)
|
||||
|
||||
def children(self):
|
||||
if VariableSetListPrinter.GLOBALSET is None:
|
||||
block = gdb.lookup_global_symbol('init_hash_global_variable_set').symtab.static_block()
|
||||
VariableSetListPrinter.GLOBALSET = gdb.lookup_symbol('global_variable_set', block)[0].value().address
|
||||
ptr = self.val.address
|
||||
i = 0
|
||||
while long(ptr) != 0:
|
||||
nm = '[%d] ' % (i)
|
||||
yield (nm, ptr['set'])
|
||||
if long(ptr['set']) == long(VariableSetListPrinter.GLOBALSET):
|
||||
yield (nm, "global_variable_set")
|
||||
else:
|
||||
yield (nm, str(ptr['set'].dereference()))
|
||||
i += 1
|
||||
ptr = ptr['next']
|
||||
|
||||
def display_hint(self):
|
||||
return 'map'
|
||||
|
||||
def build_pretty_printer():
|
||||
pp = gdb.printing.RegexpCollectionPrettyPrinter("gnumake")
|
||||
pp.add_printer('floc', r'^floc$', FileLocation)
|
||||
pp.add_printer('variable', r'^variable$', VariablePrinter)
|
||||
pp.add_printer('hashtable', r'^hash_table$', HashTablePrinter)
|
||||
pp.add_printer('variableset', r'^variable_set$', VariableSetPrinter)
|
||||
pp.add_printer('variablesetlist', r'^variable_set_list$', VariableSetListPrinter)
|
||||
return pp
|
||||
|
||||
# Use replace=True so we can re-source this file
|
||||
gdb.printing.register_pretty_printer(gdb.current_objfile(),
|
||||
build_pretty_printer(), replace=True)
|
||||
5
make.lnk
5
make.lnk
@@ -1,5 +0,0 @@
|
||||
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"+"hash.o"+"strcache.o"+"output.o"
|
||||
TO "make.new"
|
||||
LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib
|
||||
QUIET
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_msvc.net2003", "make_msvc_net2003.vcproj", "{E96B5060-3240-4723-91C9-E64F1C877A04}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.ActiveCfg = Debug|Win32
|
||||
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.Build.0 = Debug|Win32
|
||||
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.ActiveCfg = Release|Win32
|
||||
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,337 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="make_msvc.net2003"
|
||||
ProjectGUID="{E96B5060-3240-4723-91C9-E64F1C877A04}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".;w32/include;glob"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="TRUE"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/make_msvc.net2003.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/make_msvc.net2003.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Copying config.h.W32 to config.h"
|
||||
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".;w32/include;glob"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
|
||||
RuntimeLibrary="0"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/make_msvc.net2003.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Copying config.h.W32 to config.h"
|
||||
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="src"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\ar.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arscan.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\commands.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\default.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dir.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\expand.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\file.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\function.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getloadavg.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getopt.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getopt1.c">
|
||||
</File>
|
||||
<!--
|
||||
<File
|
||||
RelativePath=".\guile.c">
|
||||
</File>
|
||||
-->
|
||||
<File
|
||||
RelativePath=".\hash.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\strcache.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\implicit.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\job.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\load.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\output.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\main.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\misc.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\read.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\remake.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\remote-stub.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rule.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\signame.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\variable.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\version.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\vpath.c">
|
||||
</File>
|
||||
<Filter
|
||||
Name="w32"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\w32\compat\dirent.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\compat\posixfcn.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\subproc\misc.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\pathstuff.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\subproc\sub_proc.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\subproc\w32err.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="glob"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\glob\fnmatch.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\glob\glob.c">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="include"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\commands.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\config.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\debug.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dep.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\filedef.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getopt.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gettext.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gmk-default.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hash.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\job.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\output.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\makeint.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rule.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\variable.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\vmsdir.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="w32"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\w32\include\dirent.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\include\pathstuff.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\subproc\proc.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\include\sub_proc.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\include\w32err.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="glob"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\glob\fnmatch.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\glob\glob.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
52
makefile.com
52
makefile.com
@@ -1,8 +1,7 @@
|
||||
$!
|
||||
$! Makefile.com - builds GNU Make for VMS
|
||||
$!
|
||||
$! P1 is non-empty if you want to link with the VAXCRTL library instead
|
||||
$! of the shareable executable
|
||||
$! P1 = LIST will provide compiler listings.
|
||||
$! P2 = DEBUG will build an image with debug information
|
||||
$! P3 = WALL will enable all warning messages (some are suppressed since
|
||||
$! one macro intentionally causes an error condition)
|
||||
@@ -50,6 +49,12 @@ $ endif
|
||||
$ endif
|
||||
$ endif
|
||||
$!
|
||||
$!
|
||||
$ if (p1 .eqs. "LIST")
|
||||
$ then
|
||||
$ ccopt = ccopt + "/list/show=(expan,inclu)"
|
||||
$ endif
|
||||
$!
|
||||
$! Should we build a debug image
|
||||
$!
|
||||
$ if (p2.eqs."DEBUG")
|
||||
@@ -66,29 +71,33 @@ $ if (p3.nes."WALL")
|
||||
$ then
|
||||
$ gosub check_cc_qual
|
||||
$ endif
|
||||
$ filelist = "alloca ar arscan commands default dir expand file function " + -
|
||||
"hash implicit job load main misc read remake remote-stub rule " + -
|
||||
"output signame variable version vmsfunctions vmsify vpath " + -
|
||||
"[.glob]glob [.glob]fnmatch getopt1 getopt strcache"
|
||||
$ copy config.h-vms config.h
|
||||
$ filelist = "[.src]ar [.src]arscan [.src]commands [.src]default [.src]dir " + -
|
||||
"[.src]expand [.src]file [.src]function [.src]guile " + -
|
||||
"[.src]hash [.src]implicit [.src]job [.src]load [.src]main " + -
|
||||
"[.src]misc [.src]read [.src]remake [.src]remote-stub " + -
|
||||
"[.src]rule [.src]output [.src]signame [.src]variable " + -
|
||||
"[.src]version [.src]strcache [.src]vpath " + -
|
||||
"[.src]vmsfunctions [.src]vmsify [.src]vms_progname " + -
|
||||
"[.src]vms_exit [.src]vms_export_symbol " + -
|
||||
"[.lib]alloca [.lib]fnmatch [.lib]glob [.src]getopt1 [.src]getopt"
|
||||
$!
|
||||
$ copy [.src]config.h-vms [.src]config.h
|
||||
$ copy [.lib]fnmatch.in.h [.lib]fnmatch.h
|
||||
$ copy [.lib]glob.in.h [.lib]glob.h
|
||||
$ n=0
|
||||
$ open/write optf make.opt
|
||||
$ loop:
|
||||
$ cfile = f$elem(n," ",filelist)
|
||||
$ if cfile .eqs. " " then goto linkit
|
||||
$ write sys$output "Compiling ''cfile'..."
|
||||
$ call compileit 'cfile' 'p1'
|
||||
$ call compileit 'cfile'
|
||||
$ n = n + 1
|
||||
$ goto loop
|
||||
$ linkit:
|
||||
$ close optf
|
||||
$ if p1 .nes. "" then goto link_using_library
|
||||
$ link/exe=make make.opt/opt'lopt
|
||||
$ goto cleanup
|
||||
$
|
||||
$ link_using_library:
|
||||
$ link/exe=make make.opt/opt,sys$library:vaxcrtl/lib'lopt
|
||||
$
|
||||
$ cleanup:
|
||||
$ if f$trnlnm("SYS").nes."" then $ deassign sys
|
||||
$ if f$trnlnm("OPTF").nes."" then $ close optf
|
||||
@@ -128,17 +137,24 @@ $!-----------------------------------------------------------------------------
|
||||
$!
|
||||
$ compileit : subroutine
|
||||
$ ploc = f$locate("]",p1)
|
||||
$ filnam = p1
|
||||
$ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
|
||||
$ write optf "''filnam'"
|
||||
$ cc'ccopt'/include=([],[.glob]) -
|
||||
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
|
||||
$! filnam = p1
|
||||
$ if ploc .lt. f$length(p1)
|
||||
$ then
|
||||
$ objdir = f$extract(0, ploc+1, p1)
|
||||
$ write optf p1
|
||||
$ else
|
||||
$ objdir := []
|
||||
$ write optf objdir+p1
|
||||
$ endif
|
||||
$ cc'ccopt'/nested=none/include=([],[.src],[.lib])/obj='objdir' -
|
||||
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file",-
|
||||
"unlink=remove","HAVE_CONFIG_H","VMS") -
|
||||
'p1'
|
||||
$ exit
|
||||
$ endsubroutine : compileit
|
||||
$!
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
$!Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
$!This file is part of GNU Make.
|
||||
$!
|
||||
$!GNU Make is free software; you can redistribute it and/or modify it under
|
||||
|
||||
157
makefile.vms
157
makefile.vms
@@ -1,157 +0,0 @@
|
||||
# -*-Makefile-*- to build GNU make on VMS
|
||||
#
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# VMS extensions from GNU Make 3.60 imported by
|
||||
# Klaus Kämpf (kkaempf@rmi.de)
|
||||
# Modified for version 3.78.1 by Hartmut.Becker@compaq.com.
|
||||
# Modified for version 3.80 by zinser@decus.de
|
||||
# Modified for versions 3.81, 3.99.90 by Hartmut Becker
|
||||
|
||||
CC = cc
|
||||
CP = copy
|
||||
|
||||
%.obj: %.c
|
||||
$(CC) $(CFLAGS)/obj=$@ $<
|
||||
#
|
||||
# Makefile for GNU Make
|
||||
#
|
||||
|
||||
ifeq ($(CC),cc)
|
||||
CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed/warn=(disable=questcompare)
|
||||
else
|
||||
CFLAGS = $(defines) /include=([],[.glob])
|
||||
endif
|
||||
#LDFLAGS = /deb
|
||||
LDFLAGS =
|
||||
|
||||
ifeq ($(CC),cc)
|
||||
defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","allocated_variable_expand_for_file=alloc_var_expand_for_file")
|
||||
else
|
||||
ifeq ($(ARCH),VAX)
|
||||
defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE","VAX")
|
||||
else
|
||||
defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE")
|
||||
endif
|
||||
endif
|
||||
|
||||
LOAD_AVG = /define="NO_LDAV"
|
||||
|
||||
# If you don't want archive support, comment these out.
|
||||
ARCHIVES = ,ar.obj,arscan.obj
|
||||
ARCHIVES_SRC = ar.c arscan.c
|
||||
|
||||
# If your system needs extra libraries loaded in, define them here.
|
||||
# System V probably need -lPW for alloca.
|
||||
# if on vax, uncomment the following line
|
||||
#LOADLIBES = ,c.opt/opt
|
||||
ifeq ($(CC),cc)
|
||||
#LOADLIBES =,sys$$library:vaxcrtl.olb/lib
|
||||
CRT0 =
|
||||
else
|
||||
LOADLIBES =,gnu_cc_library:libgcc.olb/lib
|
||||
endif
|
||||
|
||||
# If your system doesn't have alloca, or the one provided is bad,
|
||||
# get it from the Emacs distribution and define these.
|
||||
#ALLOCA = ,alloca.obj
|
||||
#ALLOCASRC = alloca.c
|
||||
|
||||
# If there are remote execution facilities defined,
|
||||
# enable them with switches here (see remote-*.c).
|
||||
REMOTE =
|
||||
|
||||
# Any extra object files your system needs.
|
||||
extras = ,signame.obj,remote-stub.obj,vmsfunctions.obj,vmsify.obj
|
||||
#,directory.obj
|
||||
# as an alternative:
|
||||
glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
|
||||
getopt = ,getopt.obj,getopt1.obj
|
||||
# Directory to install 'make' in.
|
||||
bindir = []
|
||||
# Directory to install the man page in.
|
||||
mandir = []
|
||||
# Number to put on the man page filename.
|
||||
manext = 1
|
||||
|
||||
#guile = ,guile.obj
|
||||
|
||||
objs = commands.obj,job.obj,output.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
||||
load.obj,main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
||||
default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\
|
||||
vpath.obj,version.obj\
|
||||
$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob)$(guile)
|
||||
|
||||
srcs = commands.c job.c output.c dir.c file.c misc.c guile.c hash.c \
|
||||
load.c main.c read.c remake.c rule.c implicit.c \
|
||||
default.c variable.c expand.c function.c strcache.c \
|
||||
vpath.c version.c vmsfunctions.c vmsify.c $(ARCHIVES_SRC) $(ALLOCASRC) \
|
||||
commands.h dep.h filedef.h job.h output.h makeint.h rule.h variable.h
|
||||
|
||||
|
||||
.PHONY: all doc
|
||||
all: config.h make.exe
|
||||
|
||||
doc: make.info make.dvi
|
||||
|
||||
|
||||
make.exe: $(objs)
|
||||
$(LD)$(LDFLAGS)/exe=$@ $^$(LOADLIBES)$(CRT0)
|
||||
|
||||
.PHONY: clean realclean
|
||||
clean:
|
||||
-purge [...]
|
||||
-$(RM) make.exe;,*.obj;
|
||||
-$(RM) [.glob]*.obj;
|
||||
|
||||
# Automatically generated dependencies.
|
||||
# makeint.h: config.h gnumake.h gettext.h
|
||||
# filedef.h: hash.h
|
||||
ar.obj: ar.c makeint.h filedef.h dep.h [.glob]fnmatch.h
|
||||
arscan.obj: arscan.c makeint.h
|
||||
commands.obj: commands.c makeint.h dep.h commands.h filedef.h variable.h job.h
|
||||
default.obj: default.c makeint.h rule.h dep.h job.h filedef.h commands.h variable.h
|
||||
dir.obj: dir.c makeint.h hash.h [.glob]glob.h
|
||||
expand.obj: expand.c makeint.h commands.h filedef.h job.h rule.h variable.h
|
||||
file.obj: file.c makeint.h commands.h dep.h filedef.h variable.h job.h debug.h
|
||||
function.obj: function.c makeint.h variable.h dep.h commands.h filedef.h debug.h job.h
|
||||
getopt.obj: getopt.c getopt.h config.h gettext.h
|
||||
getopt1.obj: getopt1.c getopt.h config.h
|
||||
guile.obj: guile.c makeint.h debug.h dep.h gmk-default.h
|
||||
hash.obj: hash.c makeint.h hash.h
|
||||
implicit.obj: implicit.c makeint.h rule.h dep.h filedef.h debug.h variable.h job.h commands.h
|
||||
job.obj: job.c vmsjobs.c makeint.h commands.h job.h filedef.h variable.h debug.h
|
||||
output.obj: output.c vmsjobs.c makeint.h output.h filedef.h debug.h
|
||||
load.obj: load.c makeint.h debug.h filedef.h variable.h
|
||||
main.obj: main.c makeint.h commands.h dep.h filedef.h variable.h job.h rule.h debug.h getopt.h
|
||||
misc.obj: misc.c makeint.h dep.h debug.h
|
||||
read.obj: read.c makeint.h commands.h dep.h filedef.h variable.h [.glob]glob.h debug.h rule.h job.h
|
||||
remake.obj: remake.c makeint.h commands.h job.h dep.h filedef.h variable.h debug.h
|
||||
remote-stub.obj: remote-stub.c makeint.h filedef.h job.h commands.h
|
||||
rule.obj: rule.c makeint.h commands.h dep.h filedef.h variable.h rule.h job.h
|
||||
signame.obj: signame.c makeint.h
|
||||
strcache.obj: strcache.c makeint.h hash.h
|
||||
variable.obj: variable.c makeint.h commands.h variable.h dep.h filedef.h job.h rule.h
|
||||
version.obj: version.c config.h
|
||||
vmsfunctions.obj: vmsfunctions.c makeint.h vmsdir.h debug.h job.h
|
||||
vmsify.obj: vmsify.c
|
||||
vpath.obj: vpath.c makeint.h filedef.h variable.h
|
||||
[.glob]fnmatch.obj: [.glob]fnmatch.c [.glob]fnmatch.h config.h
|
||||
[.glob]glob.obj: [.glob]glob.c [.glob]glob.h [.glob]fnmatch.h config.h
|
||||
|
||||
config.h: config.h-vms
|
||||
$(CP) $< $@
|
||||
45
mk/Amiga.mk
Normal file
45
mk/Amiga.mk
Normal file
@@ -0,0 +1,45 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on Amiga
|
||||
#
|
||||
# Amiga overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
CC = sc
|
||||
LD = $(CC) Link
|
||||
|
||||
MKDIR.cmd = makedir $1
|
||||
RM.cmd = delete $1
|
||||
CP.cmd = copy $1 To $2
|
||||
|
||||
CPPFLAGS =
|
||||
CFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
prog_SOURCES += $(alloca_SOURCES) $(loadavg_SOURCES) $(glob_SOURCES) $(amiga_SOURCES)
|
||||
|
||||
BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h
|
||||
|
||||
extra_CPPFLAGS = IDir $(OUTDIR)src IDir $(SRCDIR)/src IDir $(OUTDIR)lib IDir $(SRCDIR)/lib
|
||||
|
||||
C_SOURCE =
|
||||
OUTPUT_OPTION =
|
||||
LDFLAGS = From LIB:cres.o
|
||||
LDLIBS = Lib LIB:sc.lib LIB:amiga.lib
|
||||
LINK_OUTPUT = To $@
|
||||
|
||||
$(OUTDIR)src/config.h: $(SRCDIR)/src/config.ami
|
||||
$(call CP.cmd,$<,$@)
|
||||
@@ -1,5 +1,8 @@
|
||||
# Makefile.am to create libw32.a for mingw32 host.
|
||||
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||
# GNU -*-Makefile-*- to build GNU make on POSIX systems
|
||||
#
|
||||
# POSIX overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
@@ -15,9 +18,11 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
noinst_LIBRARIES = libw32.a
|
||||
# Very little is needed here since the default Basic.mk assumes POSIX
|
||||
|
||||
libw32_a_SOURCES = subproc/misc.c subproc/sub_proc.c subproc/w32err.c \
|
||||
compat/posixfcn.c pathstuff.c
|
||||
prog_SOURCES += $(posix_SOURCES)
|
||||
|
||||
libw32_a_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/subproc -I$(top_srcdir)
|
||||
extra_CPPFLAGS += @GUILE_CFLAGS@
|
||||
extra_LDFLAGS += @AM_LDFLAGS@
|
||||
LDLIBS += @LIBOBJS@ @gl_LIBOBS@ @ALLOCA@
|
||||
LDLIBS += @GUILE_LIBS@ @GETLOADAVG_LIBS@ @LIBINTL@ @LIBS@
|
||||
97
mk/VMS.mk
Normal file
97
mk/VMS.mk
Normal file
@@ -0,0 +1,97 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on VMS
|
||||
#
|
||||
# VMS overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
src = [.src]
|
||||
lib = [.lib]
|
||||
SRCDIR = []
|
||||
|
||||
OBJEXT = .obj
|
||||
EXEEXT = .exe
|
||||
|
||||
e =
|
||||
s = $e $e
|
||||
c = ,
|
||||
|
||||
defs = HAVE_CONFIG_H
|
||||
|
||||
ifeq ($(CC),cc)
|
||||
defs += VMS unlink=remove allocated_variable_expand_for_file=alloc_var_expand_for_file
|
||||
else
|
||||
defs += GCC_IS_NATIVE
|
||||
ifeq ($(ARCH),VAX)
|
||||
defs += VAX
|
||||
endif
|
||||
endif
|
||||
|
||||
extra_CPPFLAGS = /define=($(subst $s,$c,$(patsubst %,"%",$(defs))))
|
||||
|
||||
cinclude = /nested=none/include=($(src),$(lib))
|
||||
ifeq ($(CC),cc)
|
||||
cprefix = /prefix=(all,except=(glob,globfree))
|
||||
cwarn = /standard=relaxed/warn=(disable=questcompare)
|
||||
endif
|
||||
|
||||
extra_CFLAGS = $(cinclude)$(cprefix)$(cwarn)
|
||||
|
||||
#extra_LDFLAGS = /deb
|
||||
extra_LDFLAGS =
|
||||
|
||||
# If your system needs extra libraries loaded in, define them here.
|
||||
# System V probably need -lPW for alloca.
|
||||
# if on vax, uncomment the following line
|
||||
#LDLIBS = ,c.opt/opt
|
||||
ifeq ($(CC),cc)
|
||||
#LDLIBS =,sys$$library:vaxcrtl.olb/lib
|
||||
else
|
||||
LDLIBS =,gnu_cc_library:libgcc.olb/lib
|
||||
endif
|
||||
|
||||
# If your system doesn't have alloca, or the one provided is bad,
|
||||
# uncomment this
|
||||
#ALLOCA = $(alloca_SOURCES)
|
||||
|
||||
# If your system doesn't have alloca.h, or the one provided is bad,
|
||||
# uncomment this
|
||||
#BUILT_SOURCES += $(lib)alloca.h
|
||||
|
||||
prog_SOURCES += $(ALLOCA) $(glob_SOURCES) $(vms_SOURCES)
|
||||
|
||||
BUILT_SOURCES += $(lib)fnmatch.h $(lib)glob.h
|
||||
|
||||
COMPILE.cmd = $(CC) $(extra_CFLAGS)$(CFLAGS)/obj=$@ $(extra_CPPFLAGS)$(CPPFLAGS) $1
|
||||
|
||||
LINK.cmd = $(LD)$(extra_LDFLAGS)$(LDFLAGS)/exe=$@ $(subst $s,$c,$1)$(LDLIBS)
|
||||
|
||||
# Don't know how to do this
|
||||
CHECK.cmd =
|
||||
|
||||
MKDIR.cmd = create/dir $1
|
||||
RM.cmd = delete $1
|
||||
CP.cmd = copy $1 $2
|
||||
|
||||
define CLEANSPACE
|
||||
-purge [...]
|
||||
-delete $(PROG);
|
||||
-delete $(src)*.$(OBJEXT);
|
||||
endef
|
||||
|
||||
|
||||
$(OUTDIR)$(src)config.h: $(SRCDIR)$(src)config.h.W32
|
||||
$(call CP.cmd,$<,$@)
|
||||
122
mk/Windows32.mk
Normal file
122
mk/Windows32.mk
Normal file
@@ -0,0 +1,122 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on Windows
|
||||
#
|
||||
# Windows overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# TARGET_TYPE can be either "release" or "debug"
|
||||
TARGET_TYPE = release
|
||||
|
||||
# TOOLCHAIN can be either "msvc" or "gcc"
|
||||
TOOLCHAIN = msvc
|
||||
|
||||
# Translate a POSIX path into a Windows path. Don't bother with drives.
|
||||
# Used only inside recipes, with DOS/CMD tools that require it.
|
||||
P2W = $(subst /,\,$1)
|
||||
|
||||
prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES) $(w32_SOURCES)
|
||||
|
||||
BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h
|
||||
|
||||
w32_LIBS = kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 \
|
||||
oleaut32 uuid odbc32 odbccp32
|
||||
|
||||
CPPFLAGS =
|
||||
CFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
# --- Visual Studio
|
||||
msvc_CC = cl.exe
|
||||
msvc_LD = link.exe
|
||||
|
||||
msvc_CPPFLAGS = /DHAVE_CONFIG_H /DWINDOWS32 /DWIN32 /D_CONSOLE
|
||||
msvc_CPPFLAGS += /I$(OUTDIR)src /I$(SRCDIR)/src /I$(SRCDIR)/src/w32/include /I$(OUTDIR)lib /I$(SRCDIR)/lib
|
||||
|
||||
msvc_CFLAGS = /nologo /MT /W4 /EHsc
|
||||
msvc_CFLAGS += /FR$(OUTDIR) /Fp$(BASE_PROG).pch /Fd$(BASE_PROG).pdb
|
||||
|
||||
msvc_LDFLAGS = /nologo /SUBSYSTEM:console /PDB:$(BASE_PROG).pdb
|
||||
|
||||
msvc_LDLIBS = $(addsuffix .lib,$(w32_LIBS))
|
||||
|
||||
msvc_C_SOURCE = /c
|
||||
msvc_OUTPUT_OPTION = /Fo$@
|
||||
msvc_LINK_OUTPUT = /OUT:$@
|
||||
|
||||
release_msvc_OUTDIR = ./WinRel/
|
||||
release_msvc_CPPFLAGS = /D NDEBUG
|
||||
release_msvc_CFLAGS = /O2
|
||||
|
||||
debug_msvc_OUTDIR = ./WinDebug/
|
||||
debug_msvc_CPPFLAGS = /D _DEBUG
|
||||
debug_msvc_CFLAGS = /Zi /Od
|
||||
debug_msvc_LDFLAGS = /DEBUG
|
||||
|
||||
# --- GCC
|
||||
gcc_CC = gcc
|
||||
gcc_LD = $(gcc_CC)
|
||||
|
||||
release_gcc_OUTDIR = ./GccRel/
|
||||
debug_gcc_OUTDIR = ./GccDebug/
|
||||
|
||||
gcc_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src -I$(SRCDIR)/src/w32/include -I$(OUTDIR)lib -I$(SRCDIR)/lib
|
||||
gcc_CFLAGS = -mthreads -Wall -std=gnu99 -gdwarf-2 -g3
|
||||
gcc_LDFLAGS = -mthreads -gdwarf-2 -g3
|
||||
gcc_LDLIBS = $(addprefix -l,$(w32_libs))
|
||||
|
||||
gcc_C_SOURCE = -c
|
||||
gcc_OUTPUT_OPTION = -o $@
|
||||
gcc_LINK_OUTPUT = -o $@
|
||||
|
||||
debug_gcc_CFLAGS = -O0
|
||||
release_gcc_CFLAGS = -O2
|
||||
|
||||
# ---
|
||||
|
||||
LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $1 $(LDLIBS) $(LINK_OUTPUT)
|
||||
|
||||
CHECK.cmd = cmd /c cd tests \& .\run_make_tests.bat -make ../$(PROG)
|
||||
|
||||
MKDIR.cmd = cmd /c mkdir $(call P2W,$1)
|
||||
RM.cmd = cmd /c del /F /Q $(call P2W,$1)
|
||||
CP.cmd = cmd /c copy /Y $(call P2W,$1 $2)
|
||||
|
||||
CC = $($(TOOLCHAIN)_CC)
|
||||
LD = $($(TOOLCHAIN)_LD)
|
||||
|
||||
C_SOURCE = $($(TOOLCHAIN)_C_SOURCE)
|
||||
OUTPUT_OPTION = $($(TOOLCHAIN)_OUTPUT_OPTION)
|
||||
LINK_OUTPUT = $($(TOOLCHAIN)_LINK_OUTPUT)
|
||||
|
||||
OUTDIR = $($(TARGET_TYPE)_$(TOOLCHAIN)_OUTDIR)
|
||||
|
||||
OBJEXT = obj
|
||||
EXEEXT = .exe
|
||||
|
||||
_CUSTOM = $($(TOOLCHAIN)_$1) $($(TARGET_TYPE)_$1) $($(TARGET_TYPE)_$(TOOLCHAIN)_$1)
|
||||
|
||||
# I'm not sure why this builds gnumake rather than make...?
|
||||
PROG = $(OUTDIR)gnumake$(EXEEXT)
|
||||
BASE_PROG = $(basename $(PROG))
|
||||
|
||||
extra_CPPFLAGS = $(call _CUSTOM,CPPFLAGS)
|
||||
extra_CFLAGS = $(call _CUSTOM,CFLAGS)
|
||||
extra_LDFLAGS = $(call _CUSTOM,LDFLAGS)
|
||||
LDLIBS = $(call _CUSTOM,LDLIBS)
|
||||
|
||||
$(OUTDIR)src/config.h: $(SRCDIR)/src/config.h.W32
|
||||
$(call CP.cmd,$<,$@)
|
||||
43
mk/msdosdjgpp.mk
Normal file
43
mk/msdosdjgpp.mk
Normal file
@@ -0,0 +1,43 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on MS-DOS with DJGPP
|
||||
#
|
||||
# MS-DOS overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
OBJEXT = o
|
||||
EXEEXT = .exe
|
||||
|
||||
CC = gcc
|
||||
|
||||
# Translate a POSIX path into a Windows path. Don't bother with drives.
|
||||
# Used only inside recipes, with DOS/CMD tools that require it.
|
||||
P2W = $(subst /,\,$1)
|
||||
|
||||
prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES)
|
||||
|
||||
BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h
|
||||
|
||||
INCLUDEDIR = c:/djgpp/include
|
||||
LIBDIR = c:/djgpp/lib
|
||||
LOCALEDIR = c:/djgpp/share
|
||||
|
||||
MKDIR.cmd = command.com /c mkdir $(call P2W,$1)
|
||||
RM.cmd = command.com /c del /F /Q $(call P2W,$1)
|
||||
CP.cmd = command.com /c copy /Y $(call P2W,$1 $2)
|
||||
|
||||
$(OUTDIR)src/config.h: $(SRCDIR)/src/configh.dos
|
||||
$(call CP.cmd,$<,$@)
|
||||
19
po/.gitignore
vendored
19
po/.gitignore
vendored
@@ -1,15 +1,4 @@
|
||||
Makefile.in.in
|
||||
Makevars.template
|
||||
POTFILES
|
||||
Rules-quot
|
||||
boldquot.sed
|
||||
en@boldquot.header
|
||||
en@quot.header
|
||||
insert-header.sin
|
||||
make.pot
|
||||
quot.sed
|
||||
remove-potcdate.sin
|
||||
remove-potcdate.sed
|
||||
stamp-po
|
||||
*.gmo
|
||||
*.po
|
||||
*
|
||||
!.gitignore
|
||||
!LINGUAS
|
||||
!POTFILES.in
|
||||
|
||||
93
po/ChangeLog
93
po/ChangeLog
@@ -1,93 +0,0 @@
|
||||
2013-01-06 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* POTFILES.in: Add new load.c file.
|
||||
|
||||
2012-01-12 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* POTFILES.in: Add new guile.c file.
|
||||
|
||||
2011-09-26 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added new translation file for Czech (cs).
|
||||
|
||||
2009-09-16 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added new translation for Italian (it).
|
||||
|
||||
2008-05-17 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added new translation for Lithuanian (lt).
|
||||
|
||||
2007-08-15 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: The Kinyarwanda (rw) translation has disappeared from
|
||||
the translation site, so remove it.
|
||||
|
||||
2006-01-28 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added new translation for Vietnamese (vi).
|
||||
|
||||
2005-07-14 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added new translation for Indonesian (id).
|
||||
|
||||
2005-05-09 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* POTFILES.in: Add new file vmsjobs.c.
|
||||
|
||||
2005-04-06 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added a new translation for Kinywarwanda (rw).
|
||||
|
||||
2005-02-09 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added a new translation for Irish (ga).
|
||||
|
||||
2005-02-01 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added a new translation for Finnish (fi).
|
||||
|
||||
2003-10-18 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added a new translation for Belarusian (be).
|
||||
|
||||
2002-12-19 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Added a new translation for Ukrainian (uk).
|
||||
|
||||
2002-10-05 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* POTFILES.in: Add variable.h as it has a translatable string.
|
||||
|
||||
2002-08-08 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Add a new translation for Chinese (simplified) (zh_CN).
|
||||
|
||||
2002-08-02 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS: Add a new translation for Swedish (sv).
|
||||
|
||||
2002-04-21 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* LINGUAS, hr.po: Added new translation: Croatian.
|
||||
|
||||
* da.po, de.po, es.po, fr.po, gl.po, he.po, ja.po, ko.po, nl.po,
|
||||
pl.po, pt_BR.po, ru.po, tr.po: Moved from i18n to here.
|
||||
* .cvsignore: Moved from i18n to here.
|
||||
|
||||
* POTFILES.in, LINGUAS, Makevars: Created.
|
||||
|
||||
Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
34
po/LINGUAS
34
po/LINGUAS
@@ -1,5 +1,29 @@
|
||||
# Set of available languages: 25 languages
|
||||
|
||||
be cs da de es fi fr ga gl he hr id it ja ko lt nl pl pt_BR ru sv tr uk vi zh_CN
|
||||
|
||||
# Can't seem to get en@quot and en@boldquot to build properly?
|
||||
be
|
||||
bg
|
||||
cs
|
||||
da
|
||||
de
|
||||
es
|
||||
fi
|
||||
fr
|
||||
ga
|
||||
gl
|
||||
he
|
||||
hr
|
||||
id
|
||||
it
|
||||
ja
|
||||
ko
|
||||
lt
|
||||
nl
|
||||
pl
|
||||
pt
|
||||
pt_BR
|
||||
ru
|
||||
sr
|
||||
sv
|
||||
tr
|
||||
uk
|
||||
vi
|
||||
zh_CN
|
||||
zh_TW
|
||||
|
||||
59
po/Makevars
59
po/Makevars
@@ -1,59 +0,0 @@
|
||||
# This is a -*-Makefile-*-
|
||||
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 3 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS = bug-make@gnu.org
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
||||
@@ -1,5 +1,5 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
@@ -15,31 +15,33 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
ar.c
|
||||
arscan.c
|
||||
commands.c
|
||||
dir.c
|
||||
expand.c
|
||||
file.c
|
||||
function.c
|
||||
getopt.c
|
||||
guile.c
|
||||
hash.c
|
||||
implicit.c
|
||||
job.c
|
||||
job.h
|
||||
load.c
|
||||
main.c
|
||||
misc.c
|
||||
output.c
|
||||
read.c
|
||||
remake.c
|
||||
remote-cstms.c
|
||||
rule.c
|
||||
signame.c
|
||||
strcache.c
|
||||
variable.c
|
||||
variable.h
|
||||
vmsfunctions.c
|
||||
vmsjobs.c
|
||||
vpath.c
|
||||
src/ar.c
|
||||
src/arscan.c
|
||||
src/commands.c
|
||||
src/dir.c
|
||||
src/expand.c
|
||||
src/file.c
|
||||
src/function.c
|
||||
src/getopt.c
|
||||
src/guile.c
|
||||
src/hash.c
|
||||
src/implicit.c
|
||||
src/job.c
|
||||
src/load.c
|
||||
src/main.c
|
||||
src/misc.c
|
||||
src/output.c
|
||||
src/output.h
|
||||
src/posixos.c
|
||||
src/read.c
|
||||
src/remake.c
|
||||
src/remote-cstms.c
|
||||
src/rule.c
|
||||
src/signame.c
|
||||
src/strcache.c
|
||||
src/variable.c
|
||||
src/variable.h
|
||||
src/vmsfunctions.c
|
||||
src/vmsjobs.c
|
||||
src/vpath.c
|
||||
src/w32/w32os.c
|
||||
|
||||
59
prepare_vms.com
Normal file
59
prepare_vms.com
Normal file
@@ -0,0 +1,59 @@
|
||||
$!
|
||||
$! prepare_vms.com - Build config.h-vms from master on VMS.
|
||||
$!
|
||||
$! This is used for building off the master instead of a release tarball.
|
||||
$!
|
||||
$!
|
||||
$!
|
||||
$! First try ODS-5, Pathworks V6 or UNZIP name.
|
||||
$!
|
||||
$ config_template = f$search("sys$disk:[]config*h-vms.template")
|
||||
$ if config_template .eqs. ""
|
||||
$ then
|
||||
$!
|
||||
$! Try NFS, VMStar, or Pathworks V5 ODS-2 encoded name.
|
||||
$!
|
||||
$ config_template = f$search("sys$disk:[]config.h-vms*template")
|
||||
$ if config_template .eqs. ""
|
||||
$ then
|
||||
$ write sys$output "Could not find config.h-vms*template!"
|
||||
$ exit 44
|
||||
$ endif
|
||||
$ endif
|
||||
$ config_template_file = f$parse(config_template,,,"name")
|
||||
$ config_template_type = f$parse(config_template,,,"type")
|
||||
$ config_template = "sys$disk:[]" + config_template_file + config_template_type
|
||||
$!
|
||||
$!
|
||||
$! Pull the package and version from configure.ac
|
||||
$!
|
||||
$ open/read ac_file sys$disk:[]configure.ac
|
||||
$ac_read_loop:
|
||||
$ read ac_file/end=ac_read_loop_end line_in
|
||||
$ key = f$extract(0, 7, line_in)
|
||||
$ if key .nes. "AC_INIT" then goto ac_read_loop
|
||||
$ package = f$element (1,"[",line_in)
|
||||
$ package = f$element (0,"]",package)
|
||||
$ version = f$element (2,"[",line_in)
|
||||
$ version = f$element (0,"]",version)
|
||||
$ac_read_loop_end:
|
||||
$ close ac_file
|
||||
$!
|
||||
$ if (package .eqs. "") .or. (version .eqs. "")
|
||||
$ then
|
||||
$ write sys$output "Unable to determine package and/or version!"
|
||||
$ exit 44
|
||||
$ endif
|
||||
$!
|
||||
$!
|
||||
$ outfile = "sys$disk:[]config.h-vms"
|
||||
$!
|
||||
$! Note the pipe command is close to the length of 255, which is the
|
||||
$! maximum token length prior to VMS V8.2:
|
||||
$! %DCL-W-TKNOVF, command element is too long - shorten
|
||||
$ pipe (write sys$output "sub/%PACKAGE%/''package'/WHOLE/NOTYPE" ;-
|
||||
write sys$output "sub/%VERSION%/''version'/WHOLE/NOTYPE" ;-
|
||||
write sys$output "exit") |-
|
||||
edit/edt 'config_template'/out='outfile'/command=sys$pipe >nla0:
|
||||
$!
|
||||
$ write sys$output package, ", version: ", version, " prepared for VMS"
|
||||
@@ -1,6 +0,0 @@
|
||||
@echo off
|
||||
@echo Windows32 SCM build preparation of config.h.W32 and NMakefile.
|
||||
if not exist config.h.W32 copy config.h.W32.template config.h.W32
|
||||
if not exist config.h copy config.h.W32 config.h
|
||||
if not exist NMakefile copy NMakefile.template NMakefile
|
||||
@echo Preparation complete. Run build_w32.bat to compile and link.
|
||||
63
scripts/copyright-update
Executable file
63
scripts/copyright-update
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2014-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# Update GNU make copyrights using gnulib update-copyright
|
||||
|
||||
EXCLUDE='^\(\.[a-z].*\|.*/\.[a-z].*\|.*COPYING\|src/hash\.[ch]\|ChangeLog.*\|.*/ChangeLog.*\|INSTALL\|doc/make\.texi\|bootstrap\)$'
|
||||
|
||||
update=${UPDATE_COPYRIGHT:-${GNULIB_SRCDIR:-../../gnulib}/build-aux/update-copyright}
|
||||
|
||||
die () { echo "$*"; exit 1; }
|
||||
|
||||
getfiles () {
|
||||
git ls-files | grep -v "$EXCLUDE"
|
||||
}
|
||||
|
||||
run () {
|
||||
cmd=$(command -v "$update") || die "Cannot locate update-copyright ($update)"
|
||||
[ -x "$cmd" ] || die "Cannot locate update-copyright ($update)"
|
||||
|
||||
force=false
|
||||
|
||||
case $1 in
|
||||
(-v) getfiles | sort; exit 0 ;;
|
||||
(-f) force=true ;;
|
||||
(--) : ;;
|
||||
(-*) echo "usage: $0 [-v]"; exit 1 ;;
|
||||
esac
|
||||
|
||||
if $force; then
|
||||
: just do it
|
||||
elif [ ! -f src/makeint.h ]; then
|
||||
die "Run in the root of the GNU make workspace"
|
||||
elif [ -f configure ]; then
|
||||
die "Run in a clean workspace (git clean -fdX)"
|
||||
fi
|
||||
|
||||
# We use intervals
|
||||
export UPDATE_COPYRIGHT_USE_INTERVALS=1
|
||||
|
||||
"$cmd" $(getfiles)
|
||||
|
||||
echo "*** Update doc/make.texi copyright by hand!"
|
||||
echo "*** Update src/main.c:print_version() copyright by hand!"
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
run "$@"
|
||||
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Running commands on Amiga
|
||||
Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -42,7 +42,7 @@ MyExecute (char **argv)
|
||||
buffer = AllocMem (len, MEMF_ANY);
|
||||
|
||||
if (!buffer)
|
||||
fatal (NILF, "MyExecute: Cannot allocate space for calling a command");
|
||||
O (fatal, NILF, "MyExecute: Cannot allocate space for calling a command\n");
|
||||
|
||||
ptr = buffer;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for amiga specific things
|
||||
Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Interface to 'ar' archives for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Make.
|
||||
|
||||
@@ -43,7 +43,7 @@ ar_name (const char *name)
|
||||
return 0;
|
||||
|
||||
if (p[1] == '(' && end[-1] == ')')
|
||||
fatal (NILF, _("attempt to use unsupported feature: '%s'"), name);
|
||||
OS (fatal, NILF, _("attempt to use unsupported feature: '%s'"), name);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ static long int
|
||||
ar_member_date_1 (int desc UNUSED, const char *mem, int truncated,
|
||||
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||
long int size UNUSED, long int date,
|
||||
int uid UNUSED, int gid UNUSED, int mode UNUSED,
|
||||
int uid UNUSED, int gid UNUSED, unsigned int mode UNUSED,
|
||||
const void *name)
|
||||
{
|
||||
return ar_name_equal (name, mem, truncated) ? date : 0;
|
||||
@@ -120,7 +120,7 @@ ar_member_date (const char *name)
|
||||
int
|
||||
ar_touch (const char *name)
|
||||
{
|
||||
error (NILF, _("touch archive member is not available on VMS"));
|
||||
O (error, NILF, _("touch archive member is not available on VMS"));
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
@@ -144,24 +144,24 @@ ar_touch (const char *name)
|
||||
switch (ar_member_touch (arname, memname))
|
||||
{
|
||||
case -1:
|
||||
error (NILF, _("touch: Archive '%s' does not exist"), arname);
|
||||
OS (error, NILF, _("touch: Archive '%s' does not exist"), arname);
|
||||
break;
|
||||
case -2:
|
||||
error (NILF, _("touch: '%s' is not a valid archive"), arname);
|
||||
OS (error, NILF, _("touch: '%s' is not a valid archive"), arname);
|
||||
break;
|
||||
case -3:
|
||||
perror_with_name ("touch: ", arname);
|
||||
break;
|
||||
case 1:
|
||||
error (NILF,
|
||||
_("touch: Member '%s' does not exist in '%s'"), memname, arname);
|
||||
OSS (error, NILF,
|
||||
_("touch: Member '%s' does not exist in '%s'"), memname, arname);
|
||||
break;
|
||||
case 0:
|
||||
val = 0;
|
||||
break;
|
||||
default:
|
||||
error (NILF,
|
||||
_("touch: Bad return code from ar_member_touch on '%s'"), name);
|
||||
OS (error, NILF,
|
||||
_("touch: Bad return code from ar_member_touch on '%s'"), name);
|
||||
}
|
||||
|
||||
free (arname);
|
||||
@@ -172,11 +172,21 @@ ar_touch (const char *name)
|
||||
|
||||
/* State of an 'ar_glob' run, passed to 'ar_glob_match'. */
|
||||
|
||||
/* On VMS, (object) modules in libraries do not have suffixes. That is, to
|
||||
find a match for a pattern, the pattern must not have any suffix. So the
|
||||
suffix of the pattern is saved and the pattern is stripped (ar_glob).
|
||||
If there is a match and the match, which is a module name, is added to
|
||||
the chain, the saved suffix is added back to construct a source filename
|
||||
(ar_glob_match). */
|
||||
|
||||
struct ar_glob_state
|
||||
{
|
||||
const char *arname;
|
||||
const char *pattern;
|
||||
unsigned int size;
|
||||
#ifdef VMS
|
||||
char *suffix;
|
||||
#endif
|
||||
size_t size;
|
||||
struct nameseq *chain;
|
||||
unsigned int n;
|
||||
};
|
||||
@@ -188,7 +198,7 @@ static long int
|
||||
ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
||||
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||
long int size UNUSED, long int date UNUSED, int uid UNUSED,
|
||||
int gid UNUSED, int mode UNUSED, const void *arg)
|
||||
int gid UNUSED, unsigned int mode UNUSED, const void *arg)
|
||||
{
|
||||
struct ar_glob_state *state = (struct ar_glob_state *)arg;
|
||||
|
||||
@@ -196,7 +206,13 @@ ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
||||
{
|
||||
/* We have a match. Add it to the chain. */
|
||||
struct nameseq *new = xcalloc (state->size);
|
||||
new->name = strcache_add (concat (4, state->arname, "(", mem, ")"));
|
||||
#ifdef VMS
|
||||
if (state->suffix)
|
||||
new->name = strcache_add(
|
||||
concat(5, state->arname, "(", mem, state->suffix, ")"));
|
||||
else
|
||||
#endif
|
||||
new->name = strcache_add(concat(4, state->arname, "(", mem, ")"));
|
||||
new->next = state->chain;
|
||||
state->chain = new;
|
||||
++state->n;
|
||||
@@ -208,7 +224,7 @@ ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
||||
/* Return nonzero if PATTERN contains any metacharacters.
|
||||
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
|
||||
static int
|
||||
glob_pattern_p (const char *pattern, int quote)
|
||||
ar_glob_pattern_p (const char *pattern, int quote)
|
||||
{
|
||||
const char *p;
|
||||
int opened = 0;
|
||||
@@ -242,25 +258,52 @@ glob_pattern_p (const char *pattern, int quote)
|
||||
Return a malloc'd chain of matching elements (or nil if none). */
|
||||
|
||||
struct nameseq *
|
||||
ar_glob (const char *arname, const char *member_pattern, unsigned int size)
|
||||
ar_glob (const char *arname, const char *member_pattern, size_t size)
|
||||
{
|
||||
struct ar_glob_state state;
|
||||
struct nameseq *n;
|
||||
const char **names;
|
||||
unsigned int i;
|
||||
|
||||
if (! glob_pattern_p (member_pattern, 1))
|
||||
#ifdef VMS
|
||||
char *vms_member_pattern;
|
||||
#endif
|
||||
if (! ar_glob_pattern_p (member_pattern, 1))
|
||||
return 0;
|
||||
|
||||
/* Scan the archive for matches.
|
||||
ar_glob_match will accumulate them in STATE.chain. */
|
||||
state.arname = arname;
|
||||
state.pattern = member_pattern;
|
||||
#ifdef VMS
|
||||
{
|
||||
/* In a copy of the pattern, find the suffix, save it and remove it from
|
||||
the pattern */
|
||||
char *lastdot;
|
||||
vms_member_pattern = xstrdup(member_pattern);
|
||||
lastdot = strrchr(vms_member_pattern, '.');
|
||||
state.suffix = lastdot;
|
||||
if (lastdot)
|
||||
{
|
||||
state.suffix = xstrdup(lastdot);
|
||||
*lastdot = 0;
|
||||
}
|
||||
state.pattern = vms_member_pattern;
|
||||
}
|
||||
#endif
|
||||
state.size = size;
|
||||
state.chain = 0;
|
||||
state.n = 0;
|
||||
ar_scan (arname, ar_glob_match, &state);
|
||||
|
||||
#ifdef VMS
|
||||
/* Deallocate any duplicated string */
|
||||
free(vms_member_pattern);
|
||||
if (state.suffix)
|
||||
{
|
||||
free(state.suffix);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (state.chain == 0)
|
||||
return 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Library function for scanning an archive file.
|
||||
Copyright (C) 1987-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -16,6 +16,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#ifdef TEST
|
||||
/* Hack, the real error() routine eventually pulls in die from main.c */
|
||||
#define error(a, b, c, d)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
@@ -30,99 +35,145 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#include <credef.h>
|
||||
#include <descrip.h>
|
||||
#include <ctype.h>
|
||||
#if __DECC
|
||||
#include <unixlib.h>
|
||||
#include <lbr$routines.h>
|
||||
#include <ssdef.h>
|
||||
#include <stsdef.h>
|
||||
#include <rmsdef.h>
|
||||
|
||||
/* This symbol should be present in lbrdef.h. */
|
||||
#if !defined LBR$_HDRTRUNC
|
||||
#pragma extern_model save
|
||||
#pragma extern_model globalvalue
|
||||
extern unsigned int LBR$_HDRTRUNC;
|
||||
#pragma extern_model restore
|
||||
#endif
|
||||
|
||||
#include <unixlib.h>
|
||||
#include <lbr$routines.h>
|
||||
|
||||
const char *
|
||||
vmsify (const char *name, int type);
|
||||
|
||||
/* Time conversion from VMS to Unix
|
||||
Conversion from local time (stored in library) to GMT (needed for gmake)
|
||||
Note: The tm_gmtoff element is a VMS extension to the ANSI standard. */
|
||||
static time_t
|
||||
vms_time_to_unix(void *vms_time)
|
||||
{
|
||||
struct tm *tmp;
|
||||
time_t unix_time;
|
||||
|
||||
unix_time = decc$fix_time(vms_time);
|
||||
tmp = localtime(&unix_time);
|
||||
unix_time -= tmp->tm_gmtoff;
|
||||
|
||||
return unix_time;
|
||||
}
|
||||
|
||||
|
||||
/* VMS library routines need static variables for callback */
|
||||
static void *VMS_lib_idx;
|
||||
|
||||
static char *VMS_saved_memname;
|
||||
|
||||
static time_t VMS_member_date;
|
||||
static const void *VMS_saved_arg;
|
||||
|
||||
static long int (*VMS_function) ();
|
||||
|
||||
static long int VMS_function_ret;
|
||||
|
||||
|
||||
/* This is a callback procedure for lib$get_index */
|
||||
static int
|
||||
VMS_get_member_info (struct dsc$descriptor_s *module, unsigned long *rfa)
|
||||
VMS_get_member_info(struct dsc$descriptor_s *module, unsigned long *rfa)
|
||||
{
|
||||
int status, i;
|
||||
long int fnval;
|
||||
const int truncated = 0; /* Member name may be truncated */
|
||||
time_t member_date; /* Member date */
|
||||
char *filename;
|
||||
unsigned int buffer_length; /* Actual buffer length */
|
||||
|
||||
time_t val;
|
||||
/* Unused constants - Make does not actually use most of these */
|
||||
const int file_desc = -1; /* archive file descriptor for reading the data */
|
||||
const int header_position = 0; /* Header position */
|
||||
const int data_position = 0; /* Data position in file */
|
||||
const int data_size = 0; /* Data size */
|
||||
const int uid = 0; /* member gid */
|
||||
const int gid = 0; /* member gid */
|
||||
const int mode = 0; /* member protection mode */
|
||||
/* End of unused constants */
|
||||
|
||||
static struct dsc$descriptor_s bufdesc =
|
||||
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
|
||||
|
||||
/* Only need the module definition */
|
||||
struct mhddef *mhd;
|
||||
char filename[128];
|
||||
|
||||
bufdesc.dsc$a_pointer = filename;
|
||||
bufdesc.dsc$w_length = sizeof (filename);
|
||||
|
||||
status = lbr$set_module (&VMS_lib_idx, rfa, &bufdesc,
|
||||
&bufdesc.dsc$w_length, 0);
|
||||
if (! (status & 1))
|
||||
/* If a previous callback is non-zero, just return that status */
|
||||
if (VMS_function_ret)
|
||||
{
|
||||
error (NILF, _("lbr$set_module() failed to extract module info, status = %d"),
|
||||
status);
|
||||
|
||||
lbr$close (&VMS_lib_idx);
|
||||
|
||||
return 0;
|
||||
return SS$_NORMAL;
|
||||
}
|
||||
|
||||
mhd = (struct mhddef *) filename;
|
||||
/* lbr_set_module returns more than just the module header. So allocate
|
||||
a buffer which is big enough: the maximum LBR$C_MAXHDRSIZ. That's at
|
||||
least bigger than the size of struct mhddef.
|
||||
If the request is too small, a buffer truncated warning is issued so
|
||||
it can be reissued with a larger buffer.
|
||||
We do not care if the buffer is truncated, so that is still a success. */
|
||||
mhd = xmalloc(LBR$C_MAXHDRSIZ);
|
||||
bufdesc.dsc$a_pointer = (char *) mhd;
|
||||
bufdesc.dsc$w_length = LBR$C_MAXHDRSIZ;
|
||||
|
||||
#ifdef __DECC
|
||||
/* John Fowler <jfowler@nyx.net> writes this is needed in his environment,
|
||||
* but that decc$fix_time() isn't documented to work this way. Let me
|
||||
* know if this causes problems in other VMS environments.
|
||||
*/
|
||||
{
|
||||
/* Modified by M. Gehre at 11-JAN-2008 because old formula is wrong:
|
||||
* val = decc$fix_time (&mhd->mhd$l_datim) + timezone - daylight*3600;
|
||||
* a) daylight specifies, if the timezone has daylight saving enabled, not
|
||||
* if it is active
|
||||
* b) what we need is the information, if daylight saving was active, if
|
||||
* the library module was replaced. This information we get using the
|
||||
* localtime function
|
||||
*/
|
||||
status = lbr$set_module(&VMS_lib_idx, rfa, &bufdesc, &buffer_length, 0);
|
||||
|
||||
struct tm *tmp;
|
||||
if ((status != LBR$_HDRTRUNC) && !$VMS_STATUS_SUCCESS(status))
|
||||
{
|
||||
ON(error, NILF,
|
||||
_("lbr$set_module() failed to extract module info, status = %d"),
|
||||
status);
|
||||
|
||||
/* Conversion from VMS time to C time */
|
||||
val = decc$fix_time (&mhd->mhd$l_datim);
|
||||
lbr$close(&VMS_lib_idx);
|
||||
|
||||
/*
|
||||
* Conversion from local time (stored in library) to GMT (needed for gmake)
|
||||
* Note: The tm_gmtoff element is a VMS extension to the ANSI standard.
|
||||
*/
|
||||
tmp = localtime (&val);
|
||||
val -= tmp->tm_gmtoff;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
/* When testing this code, it is useful to know the length returned */
|
||||
printf ("Input length = %d, actual = %u\n",
|
||||
bufdesc.dsc$w_length, buffer_length);
|
||||
#endif
|
||||
|
||||
/* Conversion from VMS time to C time.
|
||||
VMS defectlet - mhddef is sub-optimal, for the time, it has a 32 bit
|
||||
longword, mhd$l_datim, and a 32 bit fill instead of two longwords, or
|
||||
equivalent. */
|
||||
member_date = vms_time_to_unix(&mhd->mhd$l_datim);
|
||||
free(mhd);
|
||||
|
||||
/* Here we have a problem. The module name on VMS does not have
|
||||
a file type, but the filename pattern in the "VMS_saved_arg"
|
||||
may have one.
|
||||
But only the method being called knows how to interpret the
|
||||
filename pattern.
|
||||
There are currently two different formats being used.
|
||||
This means that we need a VMS specific code in those methods
|
||||
to handle it. */
|
||||
filename = xmalloc(module->dsc$w_length + 1);
|
||||
|
||||
/* TODO: We may need an option to preserve the case of the module
|
||||
For now force the module name to lower case */
|
||||
for (i = 0; i < module->dsc$w_length; i++)
|
||||
filename[i] = _tolower ((unsigned char)module->dsc$a_pointer[i]);
|
||||
filename[i] = _tolower((unsigned char )module->dsc$a_pointer[i]);
|
||||
|
||||
filename[i] = '\0';
|
||||
|
||||
VMS_member_date = (time_t) -1;
|
||||
VMS_function_ret = (*VMS_function)(file_desc, filename, truncated,
|
||||
header_position, data_position, data_size, member_date, uid, gid, mode,
|
||||
VMS_saved_arg);
|
||||
|
||||
fnval =
|
||||
(*VMS_function) (-1, filename, 0, 0, 0, 0, val, 0, 0, 0,
|
||||
VMS_saved_memname);
|
||||
|
||||
if (fnval)
|
||||
{
|
||||
VMS_member_date = fnval;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
free(filename);
|
||||
return SS$_NORMAL;
|
||||
}
|
||||
|
||||
|
||||
/* Takes three arguments ARCHIVE, FUNCTION and ARG.
|
||||
|
||||
Open the archive named ARCHIVE, find its members one by one,
|
||||
@@ -153,60 +204,89 @@ VMS_get_member_info (struct dsc$descriptor_s *module, unsigned long *rfa)
|
||||
Returns 0 if have scanned successfully. */
|
||||
|
||||
long int
|
||||
ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
ar_scan (const char *archive, ar_member_func_t function, const void *varg)
|
||||
{
|
||||
char *p;
|
||||
char *vms_archive;
|
||||
|
||||
static struct dsc$descriptor_s libdesc =
|
||||
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
|
||||
|
||||
unsigned long func = LBR$C_READ;
|
||||
unsigned long type = LBR$C_TYP_UNK;
|
||||
unsigned long index = 1;
|
||||
|
||||
const unsigned long func = LBR$C_READ;
|
||||
const unsigned long type = LBR$C_TYP_UNK;
|
||||
const unsigned long index = 1;
|
||||
unsigned long lib_idx;
|
||||
int status;
|
||||
|
||||
status = lbr$ini_control (&VMS_lib_idx, &func, &type, 0);
|
||||
VMS_saved_arg = varg;
|
||||
|
||||
if (! (status & 1))
|
||||
/* Null archive string can show up in test and cause an access violation */
|
||||
if (archive == NULL)
|
||||
{
|
||||
error (NILF, _("lbr$ini_control() failed with status = %d"), status);
|
||||
return -2;
|
||||
}
|
||||
|
||||
/* there is no such descriptor with "const char *dsc$a_pointer" */
|
||||
libdesc.dsc$a_pointer = (char *)archive;
|
||||
libdesc.dsc$w_length = strlen (archive);
|
||||
|
||||
status = lbr$open (&VMS_lib_idx, &libdesc, 0, 0, 0, 0, 0);
|
||||
|
||||
if (! (status & 1))
|
||||
{
|
||||
error (NILF, _("unable to open library '%s' to lookup member '%s'"),
|
||||
archive, (char *)arg);
|
||||
/* Null filenames do not exist */
|
||||
return -1;
|
||||
}
|
||||
|
||||
VMS_saved_memname = (char *)arg;
|
||||
/* archive path name must be in VMS format */
|
||||
vms_archive = (char *) vmsify(archive, 0);
|
||||
|
||||
/* For comparison, delete .obj from arg name. */
|
||||
status = lbr$ini_control(&VMS_lib_idx, &func, &type, 0);
|
||||
|
||||
p = strrchr (VMS_saved_memname, '.');
|
||||
if (p)
|
||||
*p = '\0';
|
||||
if (!$VMS_STATUS_SUCCESS(status))
|
||||
{
|
||||
ON(error, NILF, _("lbr$ini_control() failed with status = %d"), status);
|
||||
return -2;
|
||||
}
|
||||
|
||||
libdesc.dsc$a_pointer = vms_archive;
|
||||
libdesc.dsc$w_length = strlen(vms_archive);
|
||||
|
||||
status = lbr$open(&VMS_lib_idx, &libdesc, 0, NULL, 0, NULL, 0);
|
||||
|
||||
if (!$VMS_STATUS_SUCCESS(status))
|
||||
{
|
||||
|
||||
/* TODO: A library format failure could mean that this is a file
|
||||
generated by the GNU AR utility and in that case, we need to
|
||||
take the UNIX codepath. This will also take a change to the
|
||||
GNV AR wrapper program. */
|
||||
|
||||
switch (status)
|
||||
{
|
||||
case RMS$_FNF:
|
||||
/* Archive does not exist */
|
||||
return -1;
|
||||
default:
|
||||
#ifndef TEST
|
||||
OSN(error, NILF,
|
||||
_("unable to open library '%s' to lookup member status %d"),
|
||||
archive, status);
|
||||
#endif
|
||||
/* For library format errors, specification says to return -2 */
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
VMS_function = function;
|
||||
|
||||
VMS_member_date = (time_t) -1;
|
||||
lbr$get_index (&VMS_lib_idx, &index, VMS_get_member_info, 0);
|
||||
/* Clear the return status, as we are supposed to stop calling the
|
||||
callback function if it becomes non-zero, and this is a static
|
||||
variable. */
|
||||
VMS_function_ret = 0;
|
||||
|
||||
/* Undo the damage. */
|
||||
if (p)
|
||||
*p = '.';
|
||||
status = lbr$get_index(&VMS_lib_idx, &index, VMS_get_member_info, NULL, 0);
|
||||
|
||||
lbr$close (&VMS_lib_idx);
|
||||
lbr$close(&VMS_lib_idx);
|
||||
|
||||
return VMS_member_date > 0 ? VMS_member_date : 0;
|
||||
/* Unless a failure occurred in the lbr$ routines, return the
|
||||
the status from the 'function' routine. */
|
||||
if ($VMS_STATUS_SUCCESS(status))
|
||||
{
|
||||
return VMS_function_ret;
|
||||
}
|
||||
|
||||
/* This must be something wrong with the library and an error
|
||||
message should already have been printed. */
|
||||
return -2;
|
||||
}
|
||||
|
||||
#else /* !VMS */
|
||||
@@ -251,10 +331,10 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
#endif
|
||||
|
||||
#ifndef WINDOWS32
|
||||
# ifndef __BEOS__
|
||||
# if !defined (__ANDROID__) && !defined (__BEOS__)
|
||||
# include <ar.h>
|
||||
# else
|
||||
/* BeOS 5 doesn't have <ar.h> but has archives in the same format
|
||||
/* These platforms don't have <ar.h> but have archives in the same format
|
||||
* as many other Unices. This was taken from GNU binutils for BeOS.
|
||||
*/
|
||||
# define ARMAG "!<arch>\n" /* String that begins an archive file. */
|
||||
@@ -295,6 +375,8 @@ struct ar_hdr
|
||||
#ifndef AR_HDR_SIZE
|
||||
# define AR_HDR_SIZE (sizeof (struct ar_hdr))
|
||||
#endif
|
||||
|
||||
#include "output.h"
|
||||
|
||||
/* Takes three arguments ARCHIVE, FUNCTION and ARG.
|
||||
|
||||
@@ -334,59 +416,51 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
# endif
|
||||
#endif
|
||||
char *namemap = 0;
|
||||
int namemap_size = 0;
|
||||
int desc = open (archive, O_RDONLY, 0);
|
||||
if (desc < 0)
|
||||
return -1;
|
||||
|
||||
#ifdef SARMAG
|
||||
{
|
||||
char buf[SARMAG];
|
||||
register int nread = read (desc, buf, SARMAG);
|
||||
int nread;
|
||||
nread = readbuf (desc, buf, SARMAG);
|
||||
if (nread != SARMAG || memcmp (buf, ARMAG, SARMAG))
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
}
|
||||
#else
|
||||
#ifdef AIAMAG
|
||||
{
|
||||
register int nread = read (desc, &fl_header, FL_HSZ);
|
||||
|
||||
int nread;
|
||||
nread = readbuf (desc, &fl_header, FL_HSZ);
|
||||
if (nread != FL_HSZ)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
|
||||
#ifdef AIAMAGBIG
|
||||
/* If this is a "big" archive, then set the flag and
|
||||
re-read the header into the "big" structure. */
|
||||
if (!memcmp (fl_header.fl_magic, AIAMAGBIG, SAIAMAG))
|
||||
{
|
||||
off_t o;
|
||||
|
||||
big_archive = 1;
|
||||
|
||||
/* seek back to beginning of archive */
|
||||
if (lseek (desc, 0, 0) < 0)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
EINTRLOOP (o, lseek (desc, 0, 0));
|
||||
if (o < 0)
|
||||
goto invalid;
|
||||
|
||||
/* re-read the header into the "big" structure */
|
||||
nread = read (desc, &fl_header_big, FL_HSZ_BIG);
|
||||
nread = readbuf (desc, &fl_header_big, FL_HSZ_BIG);
|
||||
if (nread != FL_HSZ_BIG)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
/* Check to make sure this is a "normal" archive. */
|
||||
if (memcmp (fl_header.fl_magic, AIAMAG, SAIAMAG))
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
}
|
||||
#else
|
||||
{
|
||||
@@ -395,12 +469,10 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
#else
|
||||
unsigned short int buf;
|
||||
#endif
|
||||
register int nread = read (desc, &buf, sizeof (buf));
|
||||
int nread;
|
||||
nread = readbuf (desc, &buf, sizeof (buf));
|
||||
if (nread != sizeof (buf) || buf != ARMAG)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -408,7 +480,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
/* Now find the members one by one. */
|
||||
{
|
||||
#ifdef SARMAG
|
||||
register long int member_offset = SARMAG;
|
||||
long int member_offset = SARMAG;
|
||||
#else
|
||||
#ifdef AIAMAG
|
||||
long int member_offset;
|
||||
@@ -435,41 +507,42 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
}
|
||||
#else
|
||||
#ifndef M_XENIX
|
||||
register long int member_offset = sizeof (int);
|
||||
long int member_offset = sizeof (int);
|
||||
#else /* Xenix. */
|
||||
register long int member_offset = sizeof (unsigned short int);
|
||||
long int member_offset = sizeof (unsigned short int);
|
||||
#endif /* Not Xenix. */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
while (1)
|
||||
{
|
||||
register int nread;
|
||||
int nread;
|
||||
struct ar_hdr member_header;
|
||||
#ifdef AIAMAGBIG
|
||||
struct ar_hdr_big member_header_big;
|
||||
#endif
|
||||
#ifdef AIAMAG
|
||||
char name[256];
|
||||
# define ARNAME_MAX 255
|
||||
char name[ARNAME_MAX + 1];
|
||||
int name_len;
|
||||
long int dateval;
|
||||
int uidval, gidval;
|
||||
long int data_offset;
|
||||
#else
|
||||
char namebuf[sizeof member_header.ar_name + 1];
|
||||
# define ARNAME_MAX (int)sizeof(member_header.ar_name)
|
||||
char namebuf[ARNAME_MAX + 1];
|
||||
char *name;
|
||||
int is_namemap; /* Nonzero if this entry maps long names. */
|
||||
int long_name = 0;
|
||||
#endif
|
||||
long int eltsize;
|
||||
int eltmode;
|
||||
unsigned int eltmode;
|
||||
long int fnval;
|
||||
off_t o;
|
||||
|
||||
if (lseek (desc, member_offset, 0) < 0)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
EINTRLOOP (o, lseek (desc, member_offset, 0));
|
||||
if (o < 0)
|
||||
goto invalid;
|
||||
|
||||
#ifdef AIAMAG
|
||||
#define AR_MEMHDR_SZ(x) (sizeof(x) - sizeof (x._ar_name))
|
||||
@@ -477,25 +550,21 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
#ifdef AIAMAGBIG
|
||||
if (big_archive)
|
||||
{
|
||||
nread = read (desc, &member_header_big,
|
||||
AR_MEMHDR_SZ(member_header_big) );
|
||||
nread = readbuf (desc, &member_header_big,
|
||||
AR_MEMHDR_SZ(member_header_big));
|
||||
|
||||
if (nread != AR_MEMHDR_SZ(member_header_big))
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
|
||||
sscanf (member_header_big.ar_namlen, "%4d", &name_len);
|
||||
nread = read (desc, name, name_len);
|
||||
if (name_len < 1 || name_len > ARNAME_MAX)
|
||||
goto invalid;
|
||||
|
||||
nread = readbuf (desc, name, name_len);
|
||||
if (nread != name_len)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
|
||||
name[name_len] = 0;
|
||||
name[name_len] = '\0';
|
||||
|
||||
sscanf (member_header_big.ar_date, "%12ld", &dateval);
|
||||
sscanf (member_header_big.ar_uid, "%12d", &uidval);
|
||||
@@ -509,25 +578,21 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
nread = read (desc, &member_header,
|
||||
AR_MEMHDR_SZ(member_header) );
|
||||
nread = readbuf (desc, &member_header,
|
||||
AR_MEMHDR_SZ(member_header));
|
||||
|
||||
if (nread != AR_MEMHDR_SZ(member_header))
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
|
||||
sscanf (member_header.ar_namlen, "%4d", &name_len);
|
||||
nread = read (desc, name, name_len);
|
||||
if (name_len < 1 || name_len > ARNAME_MAX)
|
||||
goto invalid;
|
||||
|
||||
nread = readbuf (desc, name, name_len);
|
||||
if (nread != name_len)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
|
||||
name[name_len] = 0;
|
||||
name[name_len] = '\0';
|
||||
|
||||
sscanf (member_header.ar_date, "%12ld", &dateval);
|
||||
sscanf (member_header.ar_uid, "%12d", &uidval);
|
||||
@@ -547,7 +612,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
eltmode, arg);
|
||||
|
||||
#else /* Not AIAMAG. */
|
||||
nread = read (desc, &member_header, AR_HDR_SIZE);
|
||||
nread = readbuf (desc, &member_header, AR_HDR_SIZE);
|
||||
if (nread == 0)
|
||||
/* No data left means end of file; that is OK. */
|
||||
break;
|
||||
@@ -569,15 +634,12 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
|
||||
name = namebuf;
|
||||
memcpy (name, member_header.ar_name, sizeof member_header.ar_name);
|
||||
{
|
||||
register char *p = name + sizeof member_header.ar_name;
|
||||
char *p = name + sizeof member_header.ar_name;
|
||||
do
|
||||
*p = '\0';
|
||||
while (p > name && *--p == ' ');
|
||||
@@ -592,6 +654,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
is_namemap = (!strcmp (name, "//")
|
||||
|| !strcmp (name, "ARFILENAMES/"));
|
||||
#endif /* Not AIAMAG. */
|
||||
|
||||
/* On some systems, there is a slash after each member name. */
|
||||
if (*p == '/')
|
||||
*p = '\0';
|
||||
@@ -606,23 +669,33 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
&& (name[0] == ' ' || name[0] == '/')
|
||||
&& namemap != 0)
|
||||
{
|
||||
name = namemap + atoi (name + 1);
|
||||
int name_off = atoi (name + 1);
|
||||
int name_len;
|
||||
|
||||
if (name_off < 0 || name_off >= namemap_size)
|
||||
goto invalid;
|
||||
|
||||
name = namemap + name_off;
|
||||
name_len = strlen (name);
|
||||
if (name_len < 1)
|
||||
goto invalid;
|
||||
long_name = 1;
|
||||
}
|
||||
else if (name[0] == '#'
|
||||
&& name[1] == '1'
|
||||
&& name[2] == '/')
|
||||
{
|
||||
int namesize = atoi (name + 3);
|
||||
int name_len = atoi (name + 3);
|
||||
|
||||
name = alloca (namesize + 1);
|
||||
nread = read (desc, name, namesize);
|
||||
if (nread != namesize)
|
||||
{
|
||||
close (desc);
|
||||
return -2;
|
||||
}
|
||||
name[namesize] = '\0';
|
||||
if (name_len < 1)
|
||||
goto invalid;
|
||||
|
||||
name = alloca (name_len + 1);
|
||||
nread = readbuf (desc, name, name_len);
|
||||
if (nread != name_len)
|
||||
goto invalid;
|
||||
|
||||
name[name_len] = '\0';
|
||||
|
||||
long_name = 1;
|
||||
}
|
||||
@@ -630,7 +703,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
}
|
||||
|
||||
#ifndef M_XENIX
|
||||
sscanf (TOCHAR (member_header.ar_mode), "%o", &eltmode);
|
||||
sscanf (TOCHAR (member_header.ar_mode), "%8o", &eltmode);
|
||||
eltsize = atol (TOCHAR (member_header.ar_size));
|
||||
#else /* Xenix. */
|
||||
eltmode = (unsigned short int) member_header.ar_mode;
|
||||
@@ -672,10 +745,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
sscanf (member_header.ar_nxtmem, "%12ld", &member_offset);
|
||||
|
||||
if (lseek (desc, member_offset, 0) != member_offset)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
#else
|
||||
|
||||
/* If this member maps archive names, we must read it in. The
|
||||
@@ -686,13 +756,13 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
char *clear;
|
||||
char *limit;
|
||||
|
||||
namemap = alloca (eltsize);
|
||||
nread = read (desc, namemap, eltsize);
|
||||
if (eltsize > INT_MAX)
|
||||
goto invalid;
|
||||
namemap = alloca (eltsize + 1);
|
||||
nread = readbuf (desc, namemap, eltsize);
|
||||
if (nread != eltsize)
|
||||
{
|
||||
(void) close (desc);
|
||||
return -2;
|
||||
}
|
||||
goto invalid;
|
||||
namemap_size = eltsize;
|
||||
|
||||
/* The names are separated by newlines. Some formats have
|
||||
a trailing slash. Null terminate the strings for
|
||||
@@ -707,6 +777,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
clear[-1] = '\0';
|
||||
}
|
||||
}
|
||||
*limit = '\0';
|
||||
|
||||
is_namemap = 0;
|
||||
}
|
||||
@@ -720,6 +791,10 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||
|
||||
close (desc);
|
||||
return 0;
|
||||
|
||||
invalid:
|
||||
close (desc);
|
||||
return -2;
|
||||
}
|
||||
#endif /* !VMS */
|
||||
|
||||
@@ -751,9 +826,32 @@ ar_name_equal (const char *name, const char *mem, int truncated)
|
||||
#endif /* !__hpux && !cray */
|
||||
#endif /* !AIAMAG */
|
||||
}
|
||||
#endif /* !VMS */
|
||||
|
||||
return !strcmp (name, mem);
|
||||
#else
|
||||
/* VMS members do not have suffixes, but the filenames usually
|
||||
have.
|
||||
Do we need to strip VMS disk/directory format paths?
|
||||
|
||||
Most VMS compilers etc. by default are case insensitive
|
||||
but produce uppercase external names, incl. module names.
|
||||
However the VMS librarian (ar) and the linker by default
|
||||
are case sensitive: they take what they get, usually
|
||||
uppercase names. So for the non-default settings of the
|
||||
compilers etc. there is a need to have a case sensitive
|
||||
mode. */
|
||||
{
|
||||
int len;
|
||||
len = strlen(mem);
|
||||
int match;
|
||||
char *dot;
|
||||
if ((dot=strrchr(name,'.')))
|
||||
match = (len == dot - name) && !strncasecmp(name, mem, len);
|
||||
else
|
||||
match = !strcasecmp (name, mem);
|
||||
return match;
|
||||
}
|
||||
#endif /* !VMS */
|
||||
}
|
||||
|
||||
#ifndef VMS
|
||||
@@ -762,7 +860,7 @@ static long int
|
||||
ar_member_pos (int desc UNUSED, const char *mem, int truncated,
|
||||
long int hdrpos, long int datapos UNUSED, long int size UNUSED,
|
||||
long int date UNUSED, int uid UNUSED, int gid UNUSED,
|
||||
int mode UNUSED, const void *name)
|
||||
unsigned int mode UNUSED, const void *name)
|
||||
{
|
||||
if (!ar_name_equal (name, mem, truncated))
|
||||
return 0;
|
||||
@@ -782,7 +880,8 @@ ar_member_touch (const char *arname, const char *memname)
|
||||
long int pos = ar_scan (arname, ar_member_pos, memname);
|
||||
int fd;
|
||||
struct ar_hdr ar_hdr;
|
||||
int i;
|
||||
off_t o;
|
||||
int r;
|
||||
unsigned int ui;
|
||||
struct stat statbuf;
|
||||
|
||||
@@ -791,46 +890,43 @@ ar_member_touch (const char *arname, const char *memname)
|
||||
if (!pos)
|
||||
return 1;
|
||||
|
||||
fd = open (arname, O_RDWR, 0666);
|
||||
EINTRLOOP (fd, open (arname, O_RDWR, 0666));
|
||||
if (fd < 0)
|
||||
return -3;
|
||||
/* Read in this member's header */
|
||||
if (lseek (fd, pos, 0) < 0)
|
||||
EINTRLOOP (o, lseek (fd, pos, 0));
|
||||
if (o < 0)
|
||||
goto lose;
|
||||
if (AR_HDR_SIZE != read (fd, &ar_hdr, AR_HDR_SIZE))
|
||||
goto lose;
|
||||
/* Write back the header, thus touching the archive file. */
|
||||
if (lseek (fd, pos, 0) < 0)
|
||||
goto lose;
|
||||
if (AR_HDR_SIZE != write (fd, &ar_hdr, AR_HDR_SIZE))
|
||||
r = readbuf (fd, &ar_hdr, AR_HDR_SIZE);
|
||||
if (r != AR_HDR_SIZE)
|
||||
goto lose;
|
||||
/* The file's mtime is the time we we want. */
|
||||
EINTRLOOP (i, fstat (fd, &statbuf));
|
||||
if (i < 0)
|
||||
EINTRLOOP (r, fstat (fd, &statbuf));
|
||||
if (r < 0)
|
||||
goto lose;
|
||||
#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32)
|
||||
/* Advance member's time to that time */
|
||||
#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32)
|
||||
for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++)
|
||||
ar_hdr.ar_date[ui] = ' ';
|
||||
sprintf (TOCHAR (ar_hdr.ar_date), "%ld", (long int) statbuf.st_mtime);
|
||||
#ifdef AIAMAG
|
||||
ar_hdr.ar_date[strlen (ar_hdr.ar_date)] = ' ';
|
||||
#endif
|
||||
sprintf (TOCHAR (ar_hdr.ar_date), "%lu", (long unsigned) statbuf.st_mtime);
|
||||
ar_hdr.ar_date[strlen ((char *) ar_hdr.ar_date)] = ' ';
|
||||
#else
|
||||
ar_hdr.ar_date = statbuf.st_mtime;
|
||||
#endif
|
||||
/* Write back this member's header */
|
||||
if (lseek (fd, pos, 0) < 0)
|
||||
EINTRLOOP (o, lseek (fd, pos, 0));
|
||||
if (o < 0)
|
||||
goto lose;
|
||||
if (AR_HDR_SIZE != write (fd, &ar_hdr, AR_HDR_SIZE))
|
||||
r = writebuf (fd, &ar_hdr, AR_HDR_SIZE);
|
||||
if (r != AR_HDR_SIZE)
|
||||
goto lose;
|
||||
close (fd);
|
||||
return 0;
|
||||
|
||||
lose:
|
||||
i = errno;
|
||||
r = errno;
|
||||
close (fd);
|
||||
errno = i;
|
||||
errno = r;
|
||||
return -3;
|
||||
}
|
||||
#endif
|
||||
@@ -840,7 +936,8 @@ ar_member_touch (const char *arname, const char *memname)
|
||||
long int
|
||||
describe_member (int desc, const char *name, int truncated,
|
||||
long int hdrpos, long int datapos, long int size,
|
||||
long int date, int uid, int gid, int mode, const void *arg)
|
||||
long int date, int uid, int gid, unsigned int mode,
|
||||
const void *arg)
|
||||
{
|
||||
extern char *ctime ();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Command processing for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -14,8 +14,6 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "makeint.h"
|
||||
#include "filedef.h"
|
||||
#include "dep.h"
|
||||
@@ -28,15 +26,13 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#endif
|
||||
|
||||
#if VMS
|
||||
# define FILE_LIST_SEPARATOR ','
|
||||
# define FILE_LIST_SEPARATOR (vms_comma_separator ? ',' : ' ')
|
||||
#else
|
||||
# define FILE_LIST_SEPARATOR ' '
|
||||
#endif
|
||||
|
||||
int remote_kill (int id, int sig);
|
||||
|
||||
#ifndef HAVE_UNISTD_H
|
||||
int getpid ();
|
||||
pid_t getpid ();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -76,7 +72,7 @@ set_file_variables (struct file *file)
|
||||
|
||||
if (ar_name (file->name))
|
||||
{
|
||||
unsigned int len;
|
||||
size_t len;
|
||||
const char *cp;
|
||||
char *p;
|
||||
|
||||
@@ -105,7 +101,7 @@ set_file_variables (struct file *file)
|
||||
any suffix in the .SUFFIXES list stripped off for
|
||||
explicit rules. We store this in the 'stem' member. */
|
||||
const char *name;
|
||||
unsigned int len;
|
||||
size_t len;
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (file->name))
|
||||
@@ -122,7 +118,7 @@ set_file_variables (struct file *file)
|
||||
|
||||
for (d = enter_file (strcache_add (".SUFFIXES"))->deps; d ; d = d->next)
|
||||
{
|
||||
unsigned int slen = strlen (dep_name (d));
|
||||
size_t slen = strlen (dep_name (d));
|
||||
if (len > slen && strneq (dep_name (d), name + (len - slen), slen))
|
||||
{
|
||||
file->stem = strcache_add_len (name, len - slen);
|
||||
@@ -137,14 +133,14 @@ set_file_variables (struct file *file)
|
||||
/* $< is the first not order-only dependency. */
|
||||
less = "";
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
if (!d->ignore_mtime)
|
||||
if (!d->ignore_mtime && !d->ignore_automatic_vars)
|
||||
{
|
||||
if (!d->need_2nd_expansion)
|
||||
less = dep_name (d);
|
||||
break;
|
||||
}
|
||||
|
||||
if (file->cmds == default_file->cmds)
|
||||
if (file->cmds != 0 && file->cmds == default_file->cmds)
|
||||
/* This file got its commands from .DEFAULT.
|
||||
In this case $< is the same as $@. */
|
||||
less = at;
|
||||
@@ -163,14 +159,14 @@ set_file_variables (struct file *file)
|
||||
|
||||
{
|
||||
static char *plus_value=0, *bar_value=0, *qmark_value=0;
|
||||
static unsigned int plus_max=0, bar_max=0, qmark_max=0;
|
||||
static size_t plus_max=0, bar_max=0, qmark_max=0;
|
||||
|
||||
unsigned int qmark_len, plus_len, bar_len;
|
||||
size_t qmark_len, plus_len, bar_len;
|
||||
char *cp;
|
||||
char *caret_value;
|
||||
char *qp;
|
||||
char *bp;
|
||||
unsigned int len;
|
||||
size_t len;
|
||||
|
||||
struct hash_table dep_hash;
|
||||
void **slot;
|
||||
@@ -182,7 +178,7 @@ set_file_variables (struct file *file)
|
||||
bar_len = 0;
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
{
|
||||
if (!d->need_2nd_expansion)
|
||||
if (!d->need_2nd_expansion && !d->ignore_automatic_vars)
|
||||
{
|
||||
if (d->ignore_mtime)
|
||||
bar_len += strlen (dep_name (d)) + 1;
|
||||
@@ -204,7 +200,7 @@ set_file_variables (struct file *file)
|
||||
|
||||
qmark_len = plus_len + 1; /* Will be this or less. */
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
if (! d->ignore_mtime && ! d->need_2nd_expansion)
|
||||
if (! d->ignore_mtime && ! d->need_2nd_expansion && ! d->ignore_automatic_vars)
|
||||
{
|
||||
const char *c = dep_name (d);
|
||||
|
||||
@@ -251,7 +247,7 @@ set_file_variables (struct file *file)
|
||||
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
{
|
||||
if (d->need_2nd_expansion)
|
||||
if (d->need_2nd_expansion || d->ignore_automatic_vars)
|
||||
continue;
|
||||
|
||||
slot = hash_find_slot (&dep_hash, d);
|
||||
@@ -273,7 +269,7 @@ set_file_variables (struct file *file)
|
||||
{
|
||||
const char *c;
|
||||
|
||||
if (d->need_2nd_expansion || hash_find_item (&dep_hash, d) != d)
|
||||
if (d->need_2nd_expansion || d->ignore_automatic_vars || hash_find_item (&dep_hash, d) != d)
|
||||
continue;
|
||||
|
||||
c = dep_name (d);
|
||||
@@ -330,7 +326,8 @@ set_file_variables (struct file *file)
|
||||
void
|
||||
chop_commands (struct commands *cmds)
|
||||
{
|
||||
unsigned int nlines, idx;
|
||||
unsigned int nlines;
|
||||
unsigned short idx;
|
||||
char **lines;
|
||||
|
||||
/* If we don't have any commands,
|
||||
@@ -343,7 +340,7 @@ chop_commands (struct commands *cmds)
|
||||
|
||||
if (one_shell)
|
||||
{
|
||||
int l = strlen (cmds->commands);
|
||||
size_t l = strlen (cmds->commands);
|
||||
|
||||
nlines = 1;
|
||||
lines = xmalloc (nlines * sizeof (char *));
|
||||
@@ -386,7 +383,7 @@ chop_commands (struct commands *cmds)
|
||||
nlines += 2;
|
||||
lines = xrealloc (lines, nlines * sizeof (char *));
|
||||
}
|
||||
lines[idx++] = xstrndup (p, end - p);
|
||||
lines[idx++] = xstrndup (p, (size_t) (end - p));
|
||||
p = end;
|
||||
if (*p != '\0')
|
||||
++p;
|
||||
@@ -403,9 +400,9 @@ chop_commands (struct commands *cmds)
|
||||
CMDS->any_recurse flag. */
|
||||
|
||||
if (nlines > USHRT_MAX)
|
||||
fatal (&cmds->fileinfo, _("Recipe has too many lines (%ud)"), nlines);
|
||||
ON (fatal, &cmds->fileinfo, _("Recipe has too many lines (%ud)"), nlines);
|
||||
|
||||
cmds->ncommand_lines = nlines;
|
||||
cmds->ncommand_lines = (unsigned short)nlines;
|
||||
cmds->command_lines = lines;
|
||||
|
||||
cmds->any_recurse = 0;
|
||||
@@ -413,10 +410,10 @@ chop_commands (struct commands *cmds)
|
||||
|
||||
for (idx = 0; idx < nlines; ++idx)
|
||||
{
|
||||
int flags = 0;
|
||||
unsigned char flags = 0;
|
||||
const char *p = lines[idx];
|
||||
|
||||
while (isblank (*p) || *p == '-' || *p == '@' || *p == '+')
|
||||
while (ISBLANK (*p) || *p == '-' || *p == '@' || *p == '+')
|
||||
switch (*(p++))
|
||||
{
|
||||
case '+':
|
||||
@@ -453,7 +450,7 @@ execute_file_commands (struct file *file)
|
||||
the commands are nothing but whitespace. */
|
||||
|
||||
for (p = file->cmds->commands; *p != '\0'; ++p)
|
||||
if (!isspace ((unsigned char)*p) && *p != '-' && *p != '@')
|
||||
if (!ISSPACE (*p) && *p != '-' && *p != '@' && *p != '+')
|
||||
break;
|
||||
if (*p == '\0')
|
||||
{
|
||||
@@ -542,7 +539,7 @@ fatal_error_signal (int sig)
|
||||
{
|
||||
struct child *c;
|
||||
for (c = children; c != 0; c = c->next)
|
||||
if (!c->remote)
|
||||
if (!c->remote && c->pid > 0)
|
||||
(void) kill (c->pid, SIGTERM);
|
||||
}
|
||||
|
||||
@@ -563,7 +560,7 @@ fatal_error_signal (int sig)
|
||||
/* Remote children won't automatically get signals sent
|
||||
to the process group, so we must send them. */
|
||||
for (c = children; c != 0; c = c->next)
|
||||
if (c->remote)
|
||||
if (c->remote && c->pid > 0)
|
||||
(void) remote_kill (c->pid, sig);
|
||||
|
||||
for (c = children; c != 0; c = c->next)
|
||||
@@ -587,7 +584,7 @@ fatal_error_signal (int sig)
|
||||
if (sig == SIGQUIT)
|
||||
/* We don't want to send ourselves SIGQUIT, because it will
|
||||
cause a core dump. Just exit instead. */
|
||||
exit (EXIT_FAILURE);
|
||||
exit (MAKE_TROUBLE);
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
||||
@@ -627,11 +624,13 @@ delete_target (struct file *file, const char *on_behalf_of)
|
||||
if (ar_member_date (file->name) != file_date)
|
||||
{
|
||||
if (on_behalf_of)
|
||||
error (NILF, _("*** [%s] Archive member '%s' may be bogus; not deleted"),
|
||||
on_behalf_of, file->name);
|
||||
OSS (error, NILF,
|
||||
_("*** [%s] Archive member '%s' may be bogus; not deleted"),
|
||||
on_behalf_of, file->name);
|
||||
else
|
||||
error (NILF, _("*** Archive member '%s' may be bogus; not deleted"),
|
||||
file->name);
|
||||
OS (error, NILF,
|
||||
_("*** Archive member '%s' may be bogus; not deleted"),
|
||||
file->name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -643,9 +642,10 @@ delete_target (struct file *file, const char *on_behalf_of)
|
||||
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
|
||||
{
|
||||
if (on_behalf_of)
|
||||
error (NILF, _("*** [%s] Deleting file '%s'"), on_behalf_of, file->name);
|
||||
OSS (error, NILF,
|
||||
_("*** [%s] Deleting file '%s'"), on_behalf_of, file->name);
|
||||
else
|
||||
error (NILF, _("*** Deleting file '%s'"), file->name);
|
||||
OS (error, NILF, _("*** Deleting file '%s'"), file->name);
|
||||
if (unlink (file->name) < 0
|
||||
&& errno != ENOENT) /* It disappeared; so what. */
|
||||
perror_with_name ("unlink: ", file->name);
|
||||
@@ -661,7 +661,7 @@ delete_child_targets (struct child *child)
|
||||
{
|
||||
struct dep *d;
|
||||
|
||||
if (child->deleted)
|
||||
if (child->deleted || child->pid < 0)
|
||||
return;
|
||||
|
||||
/* Delete the target file if it changed. */
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definition of data structures describing shell commands for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -19,10 +19,10 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
struct commands
|
||||
{
|
||||
gmk_floc fileinfo; /* Where commands were defined. */
|
||||
floc fileinfo; /* Where commands were defined. */
|
||||
char *commands; /* Commands text. */
|
||||
char **command_lines; /* Commands chopped up into lines. */
|
||||
char *lines_flags; /* One set of flag bits for each line. */
|
||||
unsigned char *lines_flags; /* One set of flag bits for each line. */
|
||||
unsigned short ncommand_lines;/* Number of command lines. */
|
||||
char recipe_prefix; /* Recipe prefix for this command set. */
|
||||
unsigned int any_recurse:1; /* Nonzero if any 'lines_flags' elt has */
|
||||
@@ -34,6 +34,7 @@ struct commands
|
||||
#define COMMANDS_SILENT 2 /* Silent: @. */
|
||||
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
||||
|
||||
RETSIGTYPE fatal_error_signal (int sig);
|
||||
void execute_file_commands (struct file *file);
|
||||
void print_commands (const struct commands *cmds);
|
||||
void delete_child_targets (struct child *child);
|
||||
@@ -1,5 +1,5 @@
|
||||
/* config.h -- hand-massaged for Amiga -*-C-*-
|
||||
Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -258,9 +258,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the stricmp function. */
|
||||
/* #undef HAVE_STRICMP */
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the strsignal function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
@@ -318,6 +315,12 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define if you have the kstat library (-lkstat). */
|
||||
/* #undef HAVE_LIBKSTAT */
|
||||
|
||||
/* Define to 1 if you have the `isatty' function. */
|
||||
/* #undef HAVE_ISATTY */
|
||||
|
||||
/* Define to 1 if you have the `ttyname' function. */
|
||||
/* #undef HAVE_TTYNAME */
|
||||
|
||||
/* Define if you have the sun library (-lsun). */
|
||||
/* #undef HAVE_LIBSUN */
|
||||
|
||||
@@ -329,3 +332,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "Amiga"
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#define ssize_t int
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
|
||||
|
||||
Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -18,6 +18,12 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.ac by autoheader. */
|
||||
|
||||
/* Pull in types.h here to get __CRTL_VER defined for old versions of the
|
||||
compiler which don't define it. */
|
||||
#ifdef __DECC
|
||||
# include <types.h>
|
||||
#endif
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
@@ -292,9 +298,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the stricmp function. */
|
||||
/* #undef HAVE_STRICMP */
|
||||
|
||||
/* Define to 1 if you have the strerror function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the strsignal function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
@@ -356,6 +359,12 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the sun library (-lsun). */
|
||||
/* #undef HAVE_LIBSUN */
|
||||
|
||||
/* Define to 1 if you have the `isatty' function. */
|
||||
/* #undef HAVE_ISATTY */
|
||||
|
||||
/* Define to 1 if you have the `ttyname' function. */
|
||||
/* #undef HAVE_TTYNAME */
|
||||
|
||||
/* Use high resolution file timestamps if nonzero. */
|
||||
#define FILE_TIMESTAMP_HI_RES 0
|
||||
|
||||
@@ -372,15 +381,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* #undef HAVE_VMSDIR_H */
|
||||
/* #undef _DIRENT_HAVE_D_NAMLEN */
|
||||
|
||||
/* On older systems without 7.0 backport of CRTL the first one is defined */
|
||||
#ifdef __CRTL_VER
|
||||
# if __CRTL_VER < 70000000
|
||||
# define HAVE_VMSDIR_H 1
|
||||
# endif
|
||||
#else
|
||||
# if __VMS_VER < 70000000
|
||||
# define HAVE_VMSDIR_H 1
|
||||
# endif
|
||||
/* On older systems without 7.0 backport of CRTL use non-VMS code for opendir() etc. */
|
||||
#if __CRTL_VER < 70000000
|
||||
# define HAVE_VMSDIR_H 1
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_VMSDIR_H) && defined(HAVE_DIRENT_H)
|
||||
@@ -411,8 +414,20 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#define alloca(n) __ALLOCA(n)
|
||||
#endif
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Output sync sypport */
|
||||
#define NO_OUTPUT_SYNC
|
||||
|
||||
/* Define to 1 to write even short single-line actions into a VMS/DCL command
|
||||
file; this also enables exporting make environment variables into the
|
||||
(sub-)process, which executes the action.
|
||||
The usual make rules apply whether a shell variable - here a DCL symbol or
|
||||
VMS logical [see CRTL getenv()] - is added to the make environment and
|
||||
is exported. */
|
||||
#define USE_DCL_COM_FILE 1
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "VMS"
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
|
||||
|
||||
Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -261,14 +261,13 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the 'strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the 'strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the 'stricmp' function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
/* #define HAVE_STRINGS_H 1 */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_STRINGS_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
@@ -292,6 +291,24 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the 'strsignal' function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define to 1 if `d_type' is a member of `struct dirent'. */
|
||||
/* SV 57152: MinGW64 version of dirent doesn't support d_type. */
|
||||
#ifndef __MINGW64__
|
||||
# define HAVE_STRUCT_DIRENT_D_TYPE 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `isatty' function. */
|
||||
#define HAVE_ISATTY 1
|
||||
|
||||
/* Define to 1 if you have the `ttyname' function. */
|
||||
#define HAVE_TTYNAME 1
|
||||
char *ttyname (int);
|
||||
|
||||
/* Define to 1 if you have the `umask' function. */
|
||||
#ifdef __MINGW32__
|
||||
# define HAVE_UMASK 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if 'n_un.n_name' is a member of 'struct nlist'. */
|
||||
/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
|
||||
@@ -441,6 +458,10 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* # undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
@@ -460,6 +481,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to empty if 'const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
#ifdef __MINGW32__
|
||||
# undef __USE_MINGW_ANSI_STDIO
|
||||
# define __USE_MINGW_ANSI_STDIO 1
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
@@ -475,6 +501,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#define ssize_t int
|
||||
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
#define uid_t int
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
|
||||
|
||||
Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -111,3 +111,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Grok DOS paths (drive specs and backslash path element separators) */
|
||||
#define HAVE_DOS_PATHS
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#define ssize_t int
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Debugging macros and interface.
|
||||
Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -27,6 +27,8 @@ extern int db_level;
|
||||
|
||||
#define ISDB(_l) ((_l)&db_level)
|
||||
|
||||
/* When adding macros to this list be sure to update the value of
|
||||
XGETTEXT_OPTIONS in the po/Makevars file. */
|
||||
#define DBS(_l,_x) do{ if(ISDB(_l)) {print_spaces (depth); \
|
||||
printf _x; fflush (stdout);} }while(0)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Data base of default implicit rules for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -38,9 +38,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
static char default_suffixes[]
|
||||
#ifdef VMS
|
||||
= ".exe .olb .ln .obj .c .cxx .cc .pas .p .for .f .r .y .l .mar \
|
||||
.s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||
.w .ch .cweb .web .com .sh .elc .el";
|
||||
/* VMS should include all UNIX/POSIX + some VMS extensions */
|
||||
= ".out .exe .a .olb .hlb .tlb .mlb .ln .o .obj .c .cxx .cc .cpp .pas .p \
|
||||
.for .f .r .y .l .ym .yl .mar .s .ss .i .ii .mod .sym .def .h .info .dvi \
|
||||
.tex .texinfo .texi .txinfo .mem .hlp .brn .rnh .rno .rnt .rnx .w .ch .cweb \
|
||||
.web .com .sh .elc .el";
|
||||
#elif defined(__EMX__)
|
||||
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||
@@ -53,19 +55,35 @@ static char default_suffixes[]
|
||||
|
||||
static struct pspec default_pattern_rules[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
{ "(%)", "%",
|
||||
"@if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/"
|
||||
"$(or "
|
||||
"$(patsubst %,TEXT,$(filter %.tlb %.TLB,$@)),"
|
||||
"$(patsubst %,HELP,$(filter %.hlb %.HLB,$@)),"
|
||||
"$(patsubst %,MACRO,$(filter %.mlb %.MLB,$@)),"
|
||||
"$(and "
|
||||
"$(patsubst %,SHARE,$(filter %.olb %.OLB,$@)),"
|
||||
"$(patsubst %,SHARE,$(filter %.exe %.EXE,$<))),"
|
||||
"OBJECT)"
|
||||
" $@\n"
|
||||
"$(AR) $(ARFLAGS) $@ $<" },
|
||||
|
||||
#else
|
||||
{ "(%)", "%",
|
||||
"$(AR) $(ARFLAGS) $@ $<" },
|
||||
#endif
|
||||
/* The X.out rules are only in BSD's default set because
|
||||
BSD Make has no null-suffix rules, so 'foo.out' and
|
||||
'foo' are the same thing. */
|
||||
#ifdef VMS
|
||||
{ "%.exe", "%",
|
||||
"copy $< $@" },
|
||||
#else
|
||||
"$(CP) $< $@" },
|
||||
|
||||
#endif
|
||||
{ "%.out", "%",
|
||||
"@rm -f $@ \n cp $< $@" },
|
||||
#endif
|
||||
|
||||
/* Syntax is "ctangle foo.w foo.ch foo.c". */
|
||||
{ "%.c", "%.w %.ch",
|
||||
"$(CTANGLE) $^ $@" },
|
||||
@@ -78,18 +96,20 @@ static struct pspec default_pattern_rules[] =
|
||||
static struct pspec default_terminal_rules[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
|
||||
/* RCS. */
|
||||
{ "%", "%$$5lv", /* Multinet style */
|
||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "[.$$rcs]%$$5lv", /* Multinet style */
|
||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "%_v", /* Normal style */
|
||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "[.rcs]%_v", /* Normal style */
|
||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
|
||||
/* SCCS. */
|
||||
/* ain't no SCCS on vms */
|
||||
|
||||
#else
|
||||
/* RCS. */
|
||||
{ "%", "%,v",
|
||||
@@ -108,13 +128,50 @@ static struct pspec default_terminal_rules[] =
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
static char *default_suffix_rules[] =
|
||||
static const char *default_suffix_rules[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
".o",
|
||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".obj",
|
||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".s",
|
||||
"$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".S",
|
||||
"$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".c",
|
||||
"$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".cc",
|
||||
"$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".C",
|
||||
"$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".cpp",
|
||||
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".f",
|
||||
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".m",
|
||||
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".p",
|
||||
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".F",
|
||||
"$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".r",
|
||||
"$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".mod",
|
||||
"$(COMPILE.mod) -o $@ -e $@ $^",
|
||||
|
||||
".def.sym",
|
||||
"$(COMPILE.def) -o $@ $<",
|
||||
|
||||
".sh",
|
||||
"copy $< >$@",
|
||||
|
||||
".obj.exe",
|
||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".mar.exe",
|
||||
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".s.o",
|
||||
"$(COMPILE.s) -o $@ $<",
|
||||
".s.exe",
|
||||
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".c.exe",
|
||||
@@ -149,6 +206,8 @@ static char *default_suffix_rules[] =
|
||||
"$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
|
||||
".c.obj",
|
||||
"$(COMPILE.c) /obj=$@ $<",
|
||||
".c.o",
|
||||
"$(COMPILE.c) /obj=$@ $<",
|
||||
".cc.ii",
|
||||
"$(COMPILE.cc)/prep /list=$@ $<",
|
||||
".cc.ss",
|
||||
@@ -157,12 +216,20 @@ static char *default_suffix_rules[] =
|
||||
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
|
||||
".cc.obj",
|
||||
"$(COMPILE.cc) /obj=$@ $<",
|
||||
".cc.o",
|
||||
"$(COMPILE.cc) /obj=$@ $<",
|
||||
".cxx.obj",
|
||||
"$(COMPILE.cxx) /obj=$@ $<",
|
||||
".cxx.o",
|
||||
"$(COMPILE.cxx) /obj=$@ $<",
|
||||
".for.obj",
|
||||
"$(COMPILE.for) /obj=$@ $<",
|
||||
".for.o",
|
||||
"$(COMPILE.for) /obj=$@ $<",
|
||||
".pas.obj",
|
||||
"$(COMPILE.pas) /obj=$@ $<",
|
||||
".pas.o",
|
||||
"$(COMPILE.pas) /obj=$@ $<",
|
||||
|
||||
".y.c",
|
||||
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||
@@ -175,6 +242,27 @@ static char *default_suffix_rules[] =
|
||||
".tex.dvi",
|
||||
"$(TEX) $<",
|
||||
|
||||
".cpp.o",
|
||||
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
||||
".f.o",
|
||||
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
||||
".m.o",
|
||||
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
||||
".p.o",
|
||||
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
||||
".r.o",
|
||||
"$(COMPILE.r) $(OUTPUT_OPTION) $<",
|
||||
".mod.o",
|
||||
"$(COMPILE.mod) -o $@ $<",
|
||||
|
||||
".c.ln",
|
||||
"$(LINT.c) -C$* $<",
|
||||
".y.ln",
|
||||
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||
|
||||
".l.ln",
|
||||
"@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c",
|
||||
|
||||
#else /* ! VMS */
|
||||
|
||||
".o",
|
||||
@@ -322,7 +410,8 @@ static const char *default_variables[] =
|
||||
#ifdef __VAX
|
||||
"ARCH", "VAX",
|
||||
#endif
|
||||
"AR", "library/obj",
|
||||
"AR", "library",
|
||||
"LIBRARY", "library",
|
||||
"ARFLAGS", "/replace",
|
||||
"AS", "macro",
|
||||
"MACRO", "macro",
|
||||
@@ -332,15 +421,21 @@ static const char *default_variables[] =
|
||||
"CC", "cc",
|
||||
#endif
|
||||
"CD", "builtin_cd",
|
||||
"MAKE", "make",
|
||||
"ECHO", "write sys$$output \"",
|
||||
"ECHO", "builtin_echo",
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"C++", "gcc/plus",
|
||||
"CXX", "gcc/plus",
|
||||
#else
|
||||
"C++", "cxx",
|
||||
"CXX", "cxx",
|
||||
#ifndef __ia64
|
||||
"CXXLD", "cxxlink",
|
||||
"CXXLINK", "cxxlink",
|
||||
#else
|
||||
/* CXXLINK is not used on VMS/IA64 */
|
||||
"CXXLD", "link",
|
||||
"CXXLINK", "link",
|
||||
#endif
|
||||
#endif
|
||||
"CO", "co",
|
||||
"CPP", "$(CC) /preprocess_only",
|
||||
@@ -376,23 +471,49 @@ static const char *default_variables[] =
|
||||
"LDLIBS", "",
|
||||
#endif
|
||||
|
||||
"LINK.o", "$(LD) $(LDFLAGS)",
|
||||
"LINK.obj", "$(LD) $(LDFLAGS)",
|
||||
#ifndef GCC_IS_NATIVE
|
||||
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
||||
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
#endif
|
||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.C", "$(COMPILE.cc)",
|
||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||
"LINK.C", "$(LINK.cc)",
|
||||
"LINK.cpp", "$(LINK.cc)",
|
||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||
"LEX.l", "$(LEX) $(LFLAGS)",
|
||||
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
|
||||
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
||||
"LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)",
|
||||
"COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c",
|
||||
"PREPROCESS.S", "$(CC) -E $(CPPFLAGS)",
|
||||
"PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F",
|
||||
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
||||
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
|
||||
"MV", "rename/new_version",
|
||||
"CP", "copy",
|
||||
".LIBPATTERNS", "%.olb lib%.a",
|
||||
|
||||
#else /* !VMS */
|
||||
|
||||
@@ -481,10 +602,21 @@ static const char *default_variables[] =
|
||||
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||
/* On case-insensitive filesystems, treat *.C files as *.c files,
|
||||
to avoid erroneously compiling C sources as C++, which will
|
||||
probably fail. */
|
||||
"COMPILE.C", "$(COMPILE.cc)",
|
||||
#else
|
||||
"COMPILE.C", "$(COMPILE.c)",
|
||||
#endif
|
||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||
"LINK.C", "$(LINK.cc)",
|
||||
#else
|
||||
"LINK.C", "$(LINK.c)",
|
||||
#endif
|
||||
"LINK.cpp", "$(LINK.cc)",
|
||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
||||
@@ -523,6 +655,8 @@ static const char *default_variables[] =
|
||||
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
|
||||
#elif defined(__APPLE__)
|
||||
".LIBPATTERNS", "lib%.dylib lib%.a",
|
||||
#elif defined(__CYGWIN__) || defined(WINDOWS32)
|
||||
".LIBPATTERNS", "lib%.dll.a %.dll.a lib%.a %.lib lib%.dll %.dll",
|
||||
#else
|
||||
".LIBPATTERNS", "lib%.so lib%.a",
|
||||
#endif
|
||||
@@ -546,8 +680,8 @@ set_default_suffixes (void)
|
||||
else
|
||||
{
|
||||
struct dep *d;
|
||||
char *p = default_suffixes;
|
||||
suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ (&p, struct dep),
|
||||
const char *p = default_suffixes;
|
||||
suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ ((char **)&p, struct dep),
|
||||
NULL);
|
||||
for (d = suffix_file->deps; d; d = d->next)
|
||||
d->file->builtin = 1;
|
||||
@@ -564,7 +698,7 @@ set_default_suffixes (void)
|
||||
void
|
||||
install_default_suffix_rules (void)
|
||||
{
|
||||
char **s;
|
||||
const char **s;
|
||||
|
||||
if (no_builtin_rules_flag)
|
||||
return;
|
||||
@@ -576,7 +710,7 @@ install_default_suffix_rules (void)
|
||||
assert (f->cmds == 0);
|
||||
f->cmds = xmalloc (sizeof (struct commands));
|
||||
f->cmds->fileinfo.filenm = 0;
|
||||
f->cmds->commands = s[1];
|
||||
f->cmds->commands = xstrdup (s[1]);
|
||||
f->cmds->command_lines = 0;
|
||||
f->cmds->recipe_prefix = RECIPEPREFIX_DEFAULT;
|
||||
f->builtin = 1;
|
||||
133
src/dep.h
Normal file
133
src/dep.h
Normal file
@@ -0,0 +1,133 @@
|
||||
/* Definitions of dependency data structures for GNU Make.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Structure used in chains of names, for parsing and globbing. */
|
||||
|
||||
#define NAMESEQ(_t) \
|
||||
_t *next; \
|
||||
const char *name
|
||||
|
||||
struct nameseq
|
||||
{
|
||||
NAMESEQ (struct nameseq);
|
||||
};
|
||||
|
||||
/* Flag bits for the second argument to 'read_makefile'.
|
||||
These flags are saved in the 'flags' field of each
|
||||
'struct goaldep' in the chain returned by 'read_all_makefiles'. */
|
||||
|
||||
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
||||
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
||||
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
||||
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
||||
#define RM_NOFLAG 0
|
||||
|
||||
/* Structure representing one dependency of a file.
|
||||
Each struct file's 'deps' points to a chain of these, through 'next'.
|
||||
'stem' is the stem for this dep line of static pattern rule or NULL. */
|
||||
|
||||
#define DEP(_t) \
|
||||
NAMESEQ (_t); \
|
||||
struct file *file; \
|
||||
const char *stem; \
|
||||
unsigned int flags : 8; \
|
||||
unsigned int changed : 1; \
|
||||
unsigned int ignore_mtime : 1; \
|
||||
unsigned int staticpattern : 1; \
|
||||
unsigned int need_2nd_expansion : 1; \
|
||||
unsigned int ignore_automatic_vars : 1
|
||||
|
||||
struct dep
|
||||
{
|
||||
DEP (struct dep);
|
||||
};
|
||||
|
||||
/* Structure representing one goal.
|
||||
The goals to be built constitute a chain of these, chained through 'next'.
|
||||
'stem' is not used, but it's simpler to include and ignore it. */
|
||||
|
||||
struct goaldep
|
||||
{
|
||||
DEP (struct goaldep);
|
||||
int error;
|
||||
floc floc;
|
||||
};
|
||||
|
||||
/* Options for parsing lists of filenames. */
|
||||
|
||||
#define PARSEFS_NONE 0x0000
|
||||
#define PARSEFS_NOSTRIP 0x0001
|
||||
#define PARSEFS_NOAR 0x0002
|
||||
#define PARSEFS_NOGLOB 0x0004
|
||||
#define PARSEFS_EXISTS 0x0008
|
||||
#define PARSEFS_NOCACHE 0x0010
|
||||
#define PARSEFS_ONEWORD 0x0020
|
||||
|
||||
#define PARSE_FILE_SEQ(_s,_t,_c,_p,_f) \
|
||||
(_t *)parse_file_seq ((_s),sizeof (_t),(_c),(_p),(_f))
|
||||
#define PARSE_SIMPLE_SEQ(_s,_t) \
|
||||
(_t *)parse_file_seq ((_s),sizeof (_t),MAP_NUL,NULL,PARSEFS_NONE)
|
||||
|
||||
#ifdef VMS
|
||||
void *parse_file_seq ();
|
||||
#else
|
||||
void *parse_file_seq (char **stringp, size_t size,
|
||||
int stopmap, const char *prefix, int flags);
|
||||
#endif
|
||||
|
||||
char *tilde_expand (const char *name);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
struct nameseq *ar_glob (const char *arname, const char *member_pattern, size_t size);
|
||||
#endif
|
||||
|
||||
#define dep_name(d) ((d)->name ? (d)->name : (d)->file->name)
|
||||
|
||||
#define alloc_seq_elt(_t) xcalloc (sizeof (_t))
|
||||
void free_ns_chain (struct nameseq *n);
|
||||
|
||||
#if defined(MAKE_MAINTAINER_MODE) && defined(__GNUC__)
|
||||
/* Use inline to get real type-checking. */
|
||||
#define SI static inline
|
||||
SI struct nameseq *alloc_ns() { return alloc_seq_elt (struct nameseq); }
|
||||
SI struct dep *alloc_dep() { return alloc_seq_elt (struct dep); }
|
||||
SI struct goaldep *alloc_goaldep() { return alloc_seq_elt (struct goaldep); }
|
||||
|
||||
SI void free_ns(struct nameseq *n) { free (n); }
|
||||
SI void free_dep(struct dep *d) { free_ns ((struct nameseq *)d); }
|
||||
SI void free_goaldep(struct goaldep *g) { free_dep ((struct dep *)g); }
|
||||
|
||||
SI void free_dep_chain(struct dep *d) { free_ns_chain((struct nameseq *)d); }
|
||||
SI void free_goal_chain(struct goaldep *g) { free_dep_chain((struct dep *)g); }
|
||||
#else
|
||||
# define alloc_ns() alloc_seq_elt (struct nameseq)
|
||||
# define alloc_dep() alloc_seq_elt (struct dep)
|
||||
# define alloc_goaldep() alloc_seq_elt (struct goaldep)
|
||||
|
||||
# define free_ns(_n) free (_n)
|
||||
# define free_dep(_d) free_ns (_d)
|
||||
# define free_goaldep(_g) free_dep (_g)
|
||||
|
||||
# define free_dep_chain(_d) free_ns_chain ((struct nameseq *)(_d))
|
||||
# define free_goal_chain(_g) free_ns_chain ((struct nameseq *)(_g))
|
||||
#endif
|
||||
|
||||
struct dep *copy_dep_chain (const struct dep *d);
|
||||
|
||||
struct goaldep *read_all_makefiles (const char **makefiles);
|
||||
void eval_buffer (char *buffer, const floc *floc);
|
||||
enum update_status update_goal_chain (struct goaldep *goals);
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Directory hashing for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -142,6 +142,32 @@ downcase (const char *filename)
|
||||
|
||||
#ifdef VMS
|
||||
|
||||
static char *
|
||||
downcase_inplace(char *filename)
|
||||
{
|
||||
char *name;
|
||||
name = filename;
|
||||
while (*name != '\0')
|
||||
{
|
||||
*name = tolower ((unsigned char)*name);
|
||||
++name;
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
|
||||
#ifndef _USE_STD_STAT
|
||||
/* VMS 8.2 fixed the VMS stat output to have unique st_dev and st_ino
|
||||
when _USE_STD_STAT is used on the compile line.
|
||||
|
||||
Prior to _USE_STD_STAT support, the st_dev is a pointer to thread
|
||||
static memory containing the device of the last filename looked up.
|
||||
|
||||
Todo: find out if the ino_t still needs to be faked on a directory.
|
||||
*/
|
||||
|
||||
/* Define this if the older VMS_INO_T is needed */
|
||||
#define VMS_INO_T 1
|
||||
|
||||
static int
|
||||
vms_hash (const char *name)
|
||||
{
|
||||
@@ -200,6 +226,10 @@ vmsstat_dir (const char *name, struct stat *st)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
# define stat(__path, __sbuf) vmsstat_dir (__path, __sbuf)
|
||||
|
||||
#endif /* _USE_STD_STAT */
|
||||
#endif /* VMS */
|
||||
|
||||
/* Hash table of directories. */
|
||||
@@ -218,14 +248,14 @@ struct directory_contents
|
||||
* qualified name of the directory. Beware though, this is also
|
||||
* unreliable. I'm open to suggestion on a better way to emulate inode. */
|
||||
char *path_key;
|
||||
int ctime;
|
||||
int mtime; /* controls check for stale directory cache */
|
||||
int fs_flags; /* FS_FAT, FS_NTFS, ... */
|
||||
time_t ctime;
|
||||
time_t mtime; /* controls check for stale directory cache */
|
||||
int fs_flags; /* FS_FAT, FS_NTFS, ... */
|
||||
# define FS_FAT 0x1
|
||||
# define FS_NTFS 0x2
|
||||
# define FS_UNKNOWN 0x4
|
||||
#else
|
||||
# ifdef VMS
|
||||
# ifdef VMS_INO_T
|
||||
ino_t ino[3];
|
||||
# else
|
||||
ino_t ino;
|
||||
@@ -246,7 +276,7 @@ directory_contents_hash_1 (const void *key_0)
|
||||
ISTRING_HASH_1 (key->path_key, hash);
|
||||
hash ^= ((unsigned int) key->dev << 4) ^ (unsigned int) key->ctime;
|
||||
#else
|
||||
# ifdef VMS
|
||||
# ifdef VMS_INO_T
|
||||
hash = (((unsigned int) key->dev << 4)
|
||||
^ ((unsigned int) key->ino[0]
|
||||
+ (unsigned int) key->ino[1]
|
||||
@@ -269,7 +299,7 @@ directory_contents_hash_2 (const void *key_0)
|
||||
ISTRING_HASH_2 (key->path_key, hash);
|
||||
hash ^= ((unsigned int) key->dev << 4) ^ (unsigned int) ~key->ctime;
|
||||
#else
|
||||
# ifdef VMS
|
||||
# ifdef VMS_INO_T
|
||||
hash = (((unsigned int) key->dev << 4)
|
||||
^ ~((unsigned int) key->ino[0]
|
||||
+ (unsigned int) key->ino[1]
|
||||
@@ -308,7 +338,7 @@ directory_contents_hash_cmp (const void *xv, const void *yv)
|
||||
if (result)
|
||||
return result;
|
||||
#else
|
||||
# ifdef VMS
|
||||
# ifdef VMS_INO_T
|
||||
result = MAKECMP(x->ino[0], y->ino[0]);
|
||||
if (result)
|
||||
return result;
|
||||
@@ -375,8 +405,9 @@ static unsigned int open_directories = 0;
|
||||
struct dirfile
|
||||
{
|
||||
const char *name; /* Name of the file. */
|
||||
short length;
|
||||
size_t length;
|
||||
short impossible; /* This file is impossible. */
|
||||
unsigned char type;
|
||||
};
|
||||
|
||||
static unsigned long
|
||||
@@ -396,7 +427,7 @@ dirfile_hash_cmp (const void *xv, const void *yv)
|
||||
{
|
||||
const struct dirfile *x = xv;
|
||||
const struct dirfile *y = yv;
|
||||
int result = x->length - y->length;
|
||||
int result = (int) (x->length - y->length);
|
||||
if (result)
|
||||
return result;
|
||||
return_ISTRING_COMPARE (x->name, y->name);
|
||||
@@ -419,13 +450,6 @@ find_directory (const char *name)
|
||||
struct directory **dir_slot;
|
||||
struct directory dir_key;
|
||||
|
||||
#ifdef VMS
|
||||
if ((*name == '.') && (*(name+1) == 0))
|
||||
name = "[]";
|
||||
else
|
||||
name = vmsify (name,1);
|
||||
#endif
|
||||
|
||||
dir_key.name = name;
|
||||
dir_slot = (struct directory **) hash_find_slot (&directories, &dir_key);
|
||||
dir = *dir_slot;
|
||||
@@ -439,7 +463,12 @@ find_directory (const char *name)
|
||||
|
||||
dir = xmalloc (sizeof (struct directory));
|
||||
#if defined(HAVE_CASE_INSENSITIVE_FS) && defined(VMS)
|
||||
dir->name = strcache_add_len (downcase (name), p - name);
|
||||
/* Todo: Why is this only needed on VMS? */
|
||||
{
|
||||
char *lname = downcase_inplace (xstrdup (name));
|
||||
dir->name = strcache_add_len (lname, p - name);
|
||||
free (lname);
|
||||
}
|
||||
#else
|
||||
dir->name = strcache_add_len (name, p - name);
|
||||
#endif
|
||||
@@ -447,9 +476,7 @@ find_directory (const char *name)
|
||||
/* The directory is not in the name hash table.
|
||||
Find its device and inode numbers, and look it up by them. */
|
||||
|
||||
#ifdef VMS
|
||||
r = vmsstat_dir (name, &st);
|
||||
#elif defined(WINDOWS32)
|
||||
#if defined(WINDOWS32)
|
||||
{
|
||||
char tem[MAXPATHLEN], *tstart, *tend;
|
||||
|
||||
@@ -492,7 +519,7 @@ find_directory (const char *name)
|
||||
dc_key.path_key = w32_path = w32ify (name, 1);
|
||||
dc_key.ctime = st.st_ctime;
|
||||
#else
|
||||
# ifdef VMS
|
||||
# ifdef VMS_INO_T
|
||||
dc_key.ino[0] = st.st_ino[0];
|
||||
dc_key.ino[1] = st.st_ino[1];
|
||||
dc_key.ino[2] = st.st_ino[2];
|
||||
@@ -537,7 +564,7 @@ find_directory (const char *name)
|
||||
else
|
||||
dc->fs_flags = FS_UNKNOWN;
|
||||
#else
|
||||
# ifdef VMS
|
||||
# ifdef VMS_INO_T
|
||||
dc->ino[0] = st.st_ino[0];
|
||||
dc->ino[1] = st.st_ino[1];
|
||||
dc->ino[2] = st.st_ino[2];
|
||||
@@ -602,11 +629,6 @@ dir_contents_file_exists_p (struct directory_contents *dir,
|
||||
if (filename != 0)
|
||||
_fnlwr (filename); /* lower case for FAT drives */
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
filename = vmsify (filename,0);
|
||||
#endif
|
||||
|
||||
if (filename != 0)
|
||||
{
|
||||
struct dirfile dirfile_key;
|
||||
@@ -666,7 +688,7 @@ dir_contents_file_exists_p (struct directory_contents *dir,
|
||||
while (1)
|
||||
{
|
||||
/* Enter the file in the hash table. */
|
||||
unsigned int len;
|
||||
size_t len;
|
||||
struct dirfile dirfile_key;
|
||||
struct dirfile **dirfile_slot;
|
||||
|
||||
@@ -674,12 +696,14 @@ dir_contents_file_exists_p (struct directory_contents *dir,
|
||||
if (d == 0)
|
||||
{
|
||||
if (errno)
|
||||
fatal (NILF, "INTERNAL: readdir: %s\n", strerror (errno));
|
||||
pfatal_with_name ("INTERNAL: readdir");
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(VMS) && defined(HAVE_DIRENT_H)
|
||||
/* In VMS we get file versions too, which have to be stripped off */
|
||||
/* In VMS we get file versions too, which have to be stripped off.
|
||||
Some versions of VMS return versions on Unix files even when
|
||||
the feature option to strip them is set. */
|
||||
{
|
||||
char *p = strrchr (d->d_name, ';');
|
||||
if (p)
|
||||
@@ -703,9 +727,13 @@ dir_contents_file_exists_p (struct directory_contents *dir,
|
||||
{
|
||||
df = xmalloc (sizeof (struct dirfile));
|
||||
#if defined(HAVE_CASE_INSENSITIVE_FS) && defined(VMS)
|
||||
df->name = strcache_add_len (downcase (d->d_name), len);
|
||||
/* TODO: Why is this only needed on VMS? */
|
||||
df->name = strcache_add_len (downcase_inplace (d->d_name), len);
|
||||
#else
|
||||
df->name = strcache_add_len (d->d_name, len);
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_DIRENT_D_TYPE
|
||||
df->type = d->d_type;
|
||||
#endif
|
||||
df->length = len;
|
||||
df->impossible = 0;
|
||||
@@ -734,6 +762,15 @@ dir_contents_file_exists_p (struct directory_contents *dir,
|
||||
int
|
||||
dir_file_exists_p (const char *dirname, const char *filename)
|
||||
{
|
||||
#ifdef VMS
|
||||
if ((filename != NULL) && (dirname != NULL))
|
||||
{
|
||||
int want_vmsify;
|
||||
want_vmsify = (strpbrk (dirname, ":<[") != NULL);
|
||||
if (want_vmsify)
|
||||
filename = vmsify (filename, 0);
|
||||
}
|
||||
#endif
|
||||
return dir_contents_file_exists_p (find_directory (dirname)->contents,
|
||||
filename);
|
||||
}
|
||||
@@ -752,14 +789,24 @@ file_exists_p (const char *name)
|
||||
return ar_member_date (name) != (time_t) -1;
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
dirend = strrchr (name, ']');
|
||||
if (dirend == 0)
|
||||
dirend = strrchr (name, ':');
|
||||
if (dirend == 0)
|
||||
return dir_file_exists_p ("[]", name);
|
||||
#else /* !VMS */
|
||||
dirend = strrchr (name, '/');
|
||||
#ifdef VMS
|
||||
if (dirend == 0)
|
||||
{
|
||||
dirend = strrchr (name, ']');
|
||||
dirend == NULL ? dirend : dirend++;
|
||||
}
|
||||
if (dirend == 0)
|
||||
{
|
||||
dirend = strrchr (name, '>');
|
||||
dirend == NULL ? dirend : dirend++;
|
||||
}
|
||||
if (dirend == 0)
|
||||
{
|
||||
dirend = strrchr (name, ':');
|
||||
dirend == NULL ? dirend : dirend++;
|
||||
}
|
||||
#endif /* VMS */
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
/* Forward and backslashes might be mixed. We need the rightmost one. */
|
||||
{
|
||||
@@ -774,10 +821,9 @@ file_exists_p (const char *name)
|
||||
if (dirend == 0)
|
||||
#ifndef _AMIGA
|
||||
return dir_file_exists_p (".", name);
|
||||
#else /* !VMS && !AMIGA */
|
||||
#else /* !AMIGA */
|
||||
return dir_file_exists_p ("", name);
|
||||
#endif /* AMIGA */
|
||||
#endif /* VMS */
|
||||
|
||||
slash = dirend;
|
||||
if (dirend == name)
|
||||
@@ -796,7 +842,13 @@ file_exists_p (const char *name)
|
||||
p[dirend - name] = '\0';
|
||||
dirname = p;
|
||||
}
|
||||
return dir_file_exists_p (dirname, slash + 1);
|
||||
#ifdef VMS
|
||||
if (*slash == '/')
|
||||
slash++;
|
||||
#else
|
||||
slash++;
|
||||
#endif
|
||||
return dir_file_exists_p (dirname, slash);
|
||||
}
|
||||
|
||||
/* Mark FILENAME as 'impossible' for 'file_impossible_p'.
|
||||
@@ -811,16 +863,25 @@ file_impossible (const char *filename)
|
||||
struct directory *dir;
|
||||
struct dirfile *new;
|
||||
|
||||
#ifdef VMS
|
||||
dirend = strrchr (p, ']');
|
||||
if (dirend == 0)
|
||||
dirend = strrchr (p, ':');
|
||||
dirend++;
|
||||
if (dirend == (char *)1)
|
||||
dir = find_directory ("[]");
|
||||
#else
|
||||
dirend = strrchr (p, '/');
|
||||
# ifdef HAVE_DOS_PATHS
|
||||
#ifdef VMS
|
||||
if (dirend == NULL)
|
||||
{
|
||||
dirend = strrchr (p, ']');
|
||||
dirend == NULL ? dirend : dirend++;
|
||||
}
|
||||
if (dirend == NULL)
|
||||
{
|
||||
dirend = strrchr (p, '>');
|
||||
dirend == NULL ? dirend : dirend++;
|
||||
}
|
||||
if (dirend == NULL)
|
||||
{
|
||||
dirend = strrchr (p, ':');
|
||||
dirend == NULL ? dirend : dirend++;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
/* Forward and backslashes might be mixed. We need the rightmost one. */
|
||||
{
|
||||
const char *bslash = strrchr (p, '\\');
|
||||
@@ -830,14 +891,13 @@ file_impossible (const char *filename)
|
||||
if (!dirend && p[0] && p[1] == ':')
|
||||
dirend = p + 1;
|
||||
}
|
||||
# endif /* HAVE_DOS_PATHS */
|
||||
#endif /* HAVE_DOS_PATHS */
|
||||
if (dirend == 0)
|
||||
# ifdef _AMIGA
|
||||
#ifdef _AMIGA
|
||||
dir = find_directory ("");
|
||||
# else /* !VMS && !AMIGA */
|
||||
#else /* !AMIGA */
|
||||
dir = find_directory (".");
|
||||
# endif /* AMIGA */
|
||||
#endif /* VMS */
|
||||
#endif /* AMIGA */
|
||||
else
|
||||
{
|
||||
const char *dirname;
|
||||
@@ -859,7 +919,14 @@ file_impossible (const char *filename)
|
||||
dirname = cp;
|
||||
}
|
||||
dir = find_directory (dirname);
|
||||
#ifdef VMS
|
||||
if (*slash == '/')
|
||||
filename = p = slash + 1;
|
||||
else
|
||||
filename = p = slash;
|
||||
#else
|
||||
filename = p = slash + 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (dir->contents == 0)
|
||||
@@ -878,6 +945,7 @@ file_impossible (const char *filename)
|
||||
new = xmalloc (sizeof (struct dirfile));
|
||||
new->length = strlen (filename);
|
||||
#if defined(HAVE_CASE_INSENSITIVE_FS) && defined(VMS)
|
||||
/* todo: Why is this only needed on VMS? */
|
||||
new->name = strcache_add_len (downcase (filename), new->length);
|
||||
#else
|
||||
new->name = strcache_add_len (filename, new->length);
|
||||
@@ -895,13 +963,22 @@ file_impossible_p (const char *filename)
|
||||
struct directory_contents *dir;
|
||||
struct dirfile *dirfile;
|
||||
struct dirfile dirfile_key;
|
||||
|
||||
#ifdef VMS
|
||||
dirend = strrchr (filename, ']');
|
||||
if (dirend == 0)
|
||||
dir = find_directory ("[]")->contents;
|
||||
#else
|
||||
int want_vmsify = 0;
|
||||
#endif
|
||||
|
||||
dirend = strrchr (filename, '/');
|
||||
#ifdef VMS
|
||||
if (dirend == NULL)
|
||||
{
|
||||
want_vmsify = (strpbrk (filename, "]>:^") != NULL);
|
||||
dirend = strrchr (filename, ']');
|
||||
}
|
||||
if (dirend == NULL && want_vmsify)
|
||||
dirend = strrchr (filename, '>');
|
||||
if (dirend == NULL && want_vmsify)
|
||||
dirend = strrchr (filename, ':');
|
||||
#endif
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
/* Forward and backslashes might be mixed. We need the rightmost one. */
|
||||
{
|
||||
@@ -916,10 +993,9 @@ file_impossible_p (const char *filename)
|
||||
if (dirend == 0)
|
||||
#ifdef _AMIGA
|
||||
dir = find_directory ("")->contents;
|
||||
#else /* !VMS && !AMIGA */
|
||||
#else /* !AMIGA */
|
||||
dir = find_directory (".")->contents;
|
||||
#endif /* AMIGA */
|
||||
#endif /* VMS */
|
||||
else
|
||||
{
|
||||
const char *dirname;
|
||||
@@ -941,7 +1017,14 @@ file_impossible_p (const char *filename)
|
||||
dirname = cp;
|
||||
}
|
||||
dir = find_directory (dirname)->contents;
|
||||
#ifdef VMS
|
||||
if (*slash == '/')
|
||||
filename = slash + 1;
|
||||
else
|
||||
filename = slash;
|
||||
#else
|
||||
filename = slash + 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (dir == 0 || dir->dirfiles.ht_vec == 0)
|
||||
@@ -955,7 +1038,8 @@ file_impossible_p (const char *filename)
|
||||
filename = downcase (filename);
|
||||
#endif
|
||||
#ifdef VMS
|
||||
filename = vmsify (filename, 1);
|
||||
if (want_vmsify)
|
||||
filename = vmsify (filename, 1);
|
||||
#endif
|
||||
|
||||
dirfile_key.name = filename;
|
||||
@@ -1002,10 +1086,11 @@ print_dir_data_base (void)
|
||||
else if (dir->contents->dirfiles.ht_vec == 0)
|
||||
{
|
||||
#ifdef WINDOWS32
|
||||
printf (_("# %s (key %s, mtime %d): could not be opened.\n"),
|
||||
dir->name, dir->contents->path_key,dir->contents->mtime);
|
||||
printf (_("# %s (key %s, mtime %I64u): could not be opened.\n"),
|
||||
dir->name, dir->contents->path_key,
|
||||
(unsigned long long)dir->contents->mtime);
|
||||
#else /* WINDOWS32 */
|
||||
#ifdef VMS
|
||||
#ifdef VMS_INO_T
|
||||
printf (_("# %s (device %d, inode [%d,%d,%d]): could not be opened.\n"),
|
||||
dir->name, dir->contents->dev,
|
||||
dir->contents->ino[0], dir->contents->ino[1],
|
||||
@@ -1038,10 +1123,11 @@ print_dir_data_base (void)
|
||||
}
|
||||
}
|
||||
#ifdef WINDOWS32
|
||||
printf (_("# %s (key %s, mtime %d): "),
|
||||
dir->name, dir->contents->path_key, dir->contents->mtime);
|
||||
printf (_("# %s (key %s, mtime %I64u): "),
|
||||
dir->name, dir->contents->path_key,
|
||||
(unsigned long long)dir->contents->mtime);
|
||||
#else /* WINDOWS32 */
|
||||
#ifdef VMS
|
||||
#ifdef VMS_INO_T
|
||||
printf (_("# %s (device %d, inode [%d,%d,%d]): "),
|
||||
dir->name, dir->contents->dev,
|
||||
dir->contents->ino[0], dir->contents->ino[1],
|
||||
@@ -1087,8 +1173,6 @@ print_dir_data_base (void)
|
||||
|
||||
/* Hooks for globbing. */
|
||||
|
||||
#include <glob.h>
|
||||
|
||||
/* Structure describing state of iterating through a directory hash table. */
|
||||
|
||||
struct dirstream
|
||||
@@ -1128,7 +1212,7 @@ static struct dirent *
|
||||
read_dirstream (__ptr_t stream)
|
||||
{
|
||||
static char *buf;
|
||||
static unsigned int bufsz;
|
||||
static size_t bufsz;
|
||||
|
||||
struct dirstream *const ds = (struct dirstream *) stream;
|
||||
struct directory_contents *dc = ds->contents;
|
||||
@@ -1141,8 +1225,8 @@ read_dirstream (__ptr_t stream)
|
||||
{
|
||||
/* The glob interface wants a 'struct dirent', so mock one up. */
|
||||
struct dirent *d;
|
||||
unsigned int len = df->length + 1;
|
||||
unsigned int sz = sizeof (*d) - sizeof (d->d_name) + len;
|
||||
size_t len = df->length + 1;
|
||||
size_t sz = sizeof (*d) - sizeof (d->d_name) + len;
|
||||
if (sz > bufsz)
|
||||
{
|
||||
bufsz *= 2;
|
||||
@@ -1161,8 +1245,8 @@ read_dirstream (__ptr_t stream)
|
||||
#ifdef _DIRENT_HAVE_D_NAMLEN
|
||||
d->d_namlen = len - 1;
|
||||
#endif
|
||||
#ifdef _DIRENT_HAVE_D_TYPE
|
||||
d->d_type = DT_UNKNOWN;
|
||||
#ifdef HAVE_STRUCT_DIRENT_D_TYPE
|
||||
d->d_type = df->type;
|
||||
#endif
|
||||
memcpy (d->d_name, df->name, len);
|
||||
return d;
|
||||
@@ -1172,13 +1256,6 @@ read_dirstream (__ptr_t stream)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
ansi_free (void *p)
|
||||
{
|
||||
if (p)
|
||||
free (p);
|
||||
}
|
||||
|
||||
/* On 64 bit ReliantUNIX (5.44 and above) in LFS mode, stat() is actually a
|
||||
* macro for stat64(). If stat is a macro, make a local wrapper function to
|
||||
* invoke it.
|
||||
@@ -1186,9 +1263,16 @@ ansi_free (void *p)
|
||||
* On MS-Windows, stat() "succeeds" for foo/bar/. where foo/bar is a
|
||||
* regular file; fix that here.
|
||||
*/
|
||||
#if !defined(stat) && !defined(WINDOWS32)
|
||||
#if !defined(stat) && !defined(WINDOWS32) || defined(VMS)
|
||||
# ifndef VMS
|
||||
# ifndef HAVE_SYS_STAT_H
|
||||
int stat (const char *path, struct stat *sbuf);
|
||||
# endif
|
||||
# else
|
||||
/* We are done with the fake stat. Go back to the real stat */
|
||||
# ifdef stat
|
||||
# undef stat
|
||||
# endif
|
||||
# endif
|
||||
# define local_stat stat
|
||||
#else
|
||||
@@ -1219,15 +1303,41 @@ local_stat (const char *path, struct stat *buf)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Similarly for lstat. */
|
||||
#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
|
||||
# ifndef VMS
|
||||
# ifndef HAVE_SYS_STAT_H
|
||||
int lstat (const char *path, struct stat *sbuf);
|
||||
# endif
|
||||
# else
|
||||
/* We are done with the fake lstat. Go back to the real lstat */
|
||||
# ifdef lstat
|
||||
# undef lstat
|
||||
# endif
|
||||
# endif
|
||||
# define local_lstat lstat
|
||||
#elif defined(WINDOWS32)
|
||||
/* Windows doesn't support lstat(). */
|
||||
# define local_lstat local_stat
|
||||
#else
|
||||
static int
|
||||
local_lstat (const char *path, struct stat *buf)
|
||||
{
|
||||
int e;
|
||||
EINTRLOOP (e, lstat (path, buf));
|
||||
return e;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
dir_setup_glob (glob_t *gl)
|
||||
{
|
||||
gl->gl_offs = 0;
|
||||
gl->gl_opendir = open_dirstream;
|
||||
gl->gl_readdir = read_dirstream;
|
||||
gl->gl_closedir = ansi_free;
|
||||
gl->gl_closedir = free;
|
||||
gl->gl_lstat = local_lstat;
|
||||
gl->gl_stat = local_stat;
|
||||
/* We don't bother setting gl_lstat, since glob never calls it.
|
||||
The slot is only there for compatibility with 4.4 BSD. */
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Variable expansion functions for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -26,7 +26,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Initially, any errors reported when expanding strings will be reported
|
||||
against the file where the error appears. */
|
||||
const gmk_floc **expanding_var = &reading_file;
|
||||
const floc **expanding_var = &reading_file;
|
||||
|
||||
/* The next two describe the variable output buffer.
|
||||
This buffer is used to hold the variable-expansion of a line of the
|
||||
@@ -42,7 +42,7 @@ const gmk_floc **expanding_var = &reading_file;
|
||||
|
||||
#define VARIABLE_BUFFER_ZONE 5
|
||||
|
||||
static unsigned int variable_buffer_length;
|
||||
static size_t variable_buffer_length;
|
||||
char *variable_buffer;
|
||||
|
||||
/* Subroutine of variable_expand and friends:
|
||||
@@ -53,13 +53,13 @@ char *variable_buffer;
|
||||
the following call. */
|
||||
|
||||
char *
|
||||
variable_buffer_output (char *ptr, const char *string, unsigned int length)
|
||||
variable_buffer_output (char *ptr, const char *string, size_t length)
|
||||
{
|
||||
register unsigned int newlen = length + (ptr - variable_buffer);
|
||||
size_t newlen = length + (ptr - variable_buffer);
|
||||
|
||||
if ((newlen + VARIABLE_BUFFER_ZONE) > variable_buffer_length)
|
||||
{
|
||||
unsigned int offset = ptr - variable_buffer;
|
||||
size_t offset = ptr - variable_buffer;
|
||||
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
||||
? newlen + 100
|
||||
: 2 * variable_buffer_length);
|
||||
@@ -96,8 +96,8 @@ char *
|
||||
recursively_expand_for_file (struct variable *v, struct file *file)
|
||||
{
|
||||
char *value;
|
||||
const gmk_floc *this_var;
|
||||
const gmk_floc **saved_varp;
|
||||
const floc *this_var;
|
||||
const floc **saved_varp;
|
||||
struct variable_set_list *save = 0;
|
||||
int set_reading = 0;
|
||||
|
||||
@@ -121,9 +121,9 @@ recursively_expand_for_file (struct variable *v, struct file *file)
|
||||
{
|
||||
if (!v->exp_count)
|
||||
/* Expanding V causes infinite recursion. Lose. */
|
||||
fatal (*expanding_var,
|
||||
_("Recursive variable '%s' references itself (eventually)"),
|
||||
v->name);
|
||||
OS (fatal, *expanding_var,
|
||||
_("Recursive variable '%s' references itself (eventually)"),
|
||||
v->name);
|
||||
--v->exp_count;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ recursively_expand_for_file (struct variable *v, struct file *file)
|
||||
__inline
|
||||
#endif
|
||||
static char *
|
||||
reference_variable (char *o, const char *name, unsigned int length)
|
||||
reference_variable (char *o, const char *name, size_t length)
|
||||
{
|
||||
struct variable *v;
|
||||
char *value;
|
||||
@@ -191,13 +191,13 @@ reference_variable (char *o, const char *name, unsigned int length)
|
||||
NULL.
|
||||
*/
|
||||
char *
|
||||
variable_expand_string (char *line, const char *string, long length)
|
||||
variable_expand_string (char *line, const char *string, size_t length)
|
||||
{
|
||||
struct variable *v;
|
||||
const char *p, *p1;
|
||||
char *save;
|
||||
char *o;
|
||||
unsigned int line_offset;
|
||||
size_t line_offset;
|
||||
|
||||
if (!line)
|
||||
line = initialize_variable_output ();
|
||||
@@ -213,7 +213,7 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
/* We need a copy of STRING: due to eval, it's possible that it will get
|
||||
freed as we process it (it might be the value of a variable that's reset
|
||||
for example). Also having a nil-terminated string is handy. */
|
||||
save = length < 0 ? xstrdup (string) : xstrndup (string, length);
|
||||
save = length == SIZE_MAX ? xstrdup (string) : xstrndup (string, length);
|
||||
p = save;
|
||||
|
||||
while (1)
|
||||
@@ -224,7 +224,7 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
|
||||
p1 = strchr (p, '$');
|
||||
|
||||
o = variable_buffer_output (o, p, p1 != 0 ? (unsigned int)(p1 - p) : strlen (p) + 1);
|
||||
o = variable_buffer_output (o, p, p1 != 0 ? (size_t) (p1 - p) : strlen (p) + 1);
|
||||
|
||||
if (p1 == 0)
|
||||
break;
|
||||
@@ -235,8 +235,10 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
switch (*p)
|
||||
{
|
||||
case '$':
|
||||
/* $$ seen means output one $ to the variable output buffer. */
|
||||
o = variable_buffer_output (o, p, 1);
|
||||
case '\0':
|
||||
/* $$ or $ at the end of the string means output one $ to the
|
||||
variable output buffer. */
|
||||
o = variable_buffer_output (o, p1, 1);
|
||||
break;
|
||||
|
||||
case '(':
|
||||
@@ -266,7 +268,7 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
end = strchr (beg, closeparen);
|
||||
if (end == 0)
|
||||
/* Unterminated variable reference. */
|
||||
fatal (*expanding_var, _("unterminated variable reference"));
|
||||
O (fatal, *expanding_var, _("unterminated variable reference"));
|
||||
p1 = lindex (beg, end, '$');
|
||||
if (p1 != 0)
|
||||
{
|
||||
@@ -377,16 +379,12 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
Look up the value of the variable. */
|
||||
o = reference_variable (o, beg, end - beg);
|
||||
|
||||
if (abeg)
|
||||
free (abeg);
|
||||
}
|
||||
break;
|
||||
|
||||
case '\0':
|
||||
break;
|
||||
|
||||
default:
|
||||
if (isblank ((unsigned char)p[-1]))
|
||||
if (ISSPACE (p[-1]))
|
||||
break;
|
||||
|
||||
/* A $ followed by a random char is a variable reference:
|
||||
@@ -416,7 +414,7 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
char *
|
||||
variable_expand (const char *line)
|
||||
{
|
||||
return variable_expand_string (NULL, line, (long)-1);
|
||||
return variable_expand_string (NULL, line, SIZE_MAX);
|
||||
}
|
||||
|
||||
/* Expand an argument for an expansion function.
|
||||
@@ -447,8 +445,7 @@ expand_argument (const char *str, const char *end)
|
||||
|
||||
r = allocated_variable_expand (tmp);
|
||||
|
||||
if (alloc)
|
||||
free (alloc);
|
||||
free (alloc);
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -461,7 +458,7 @@ variable_expand_for_file (const char *line, struct file *file)
|
||||
{
|
||||
char *result;
|
||||
struct variable_set_list *savev;
|
||||
const gmk_floc *savef;
|
||||
const floc *savef;
|
||||
|
||||
if (file == 0)
|
||||
return variable_expand (line);
|
||||
@@ -488,18 +485,20 @@ variable_expand_for_file (const char *line, struct file *file)
|
||||
any upper variable sets. Then expand the resulting value. */
|
||||
|
||||
static char *
|
||||
variable_append (const char *name, unsigned int length,
|
||||
variable_append (const char *name, size_t length,
|
||||
const struct variable_set_list *set, int local)
|
||||
{
|
||||
const struct variable *v;
|
||||
char *buf = 0;
|
||||
/* If this set is local and the next is not a parent, then next is local. */
|
||||
int nextlocal = local && set->next_is_parent == 0;
|
||||
int nextlocal;
|
||||
|
||||
/* If there's nothing left to check, return the empty buffer. */
|
||||
if (!set)
|
||||
return initialize_variable_output ();
|
||||
|
||||
/* If this set is local and the next is not a parent, then next is local. */
|
||||
nextlocal = local && set->next_is_parent == 0;
|
||||
|
||||
/* Try to find the variable in this variable set. */
|
||||
v = lookup_variable_in_set (name, length, set->set);
|
||||
|
||||
@@ -536,7 +535,7 @@ allocated_variable_append (const struct variable *v)
|
||||
/* Construct the appended variable value. */
|
||||
|
||||
char *obuf = variable_buffer;
|
||||
unsigned int olen = variable_buffer_length;
|
||||
size_t olen = variable_buffer_length;
|
||||
|
||||
variable_buffer = 0;
|
||||
|
||||
@@ -560,7 +559,7 @@ allocated_variable_expand_for_file (const char *line, struct file *file)
|
||||
char *value;
|
||||
|
||||
char *obuf = variable_buffer;
|
||||
unsigned int olen = variable_buffer_length;
|
||||
size_t olen = variable_buffer_length;
|
||||
|
||||
variable_buffer = 0;
|
||||
|
||||
@@ -576,7 +575,7 @@ allocated_variable_expand_for_file (const char *line, struct file *file)
|
||||
safe-keeping. */
|
||||
|
||||
void
|
||||
install_variable_buffer (char **bufp, unsigned int *lenp)
|
||||
install_variable_buffer (char **bufp, size_t *lenp)
|
||||
{
|
||||
*bufp = variable_buffer;
|
||||
*lenp = variable_buffer_length;
|
||||
@@ -589,7 +588,7 @@ install_variable_buffer (char **bufp, unsigned int *lenp)
|
||||
*/
|
||||
|
||||
void
|
||||
restore_variable_buffer (char *buf, unsigned int len)
|
||||
restore_variable_buffer (char *buf, size_t len)
|
||||
{
|
||||
free (variable_buffer);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Target file management for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -57,9 +57,6 @@ file_hash_cmp (const void *x, const void *y)
|
||||
((struct file const *) y)->hname);
|
||||
}
|
||||
|
||||
#ifndef FILE_BUCKETS
|
||||
#define FILE_BUCKETS 1007
|
||||
#endif
|
||||
static struct hash_table files;
|
||||
|
||||
/* Whether or not .SECONDARY with no prerequisites was given. */
|
||||
@@ -75,8 +72,11 @@ lookup_file (const char *name)
|
||||
{
|
||||
struct file *f;
|
||||
struct file file_key;
|
||||
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
|
||||
#ifdef VMS
|
||||
int want_vmsify;
|
||||
#ifndef WANT_CASE_SENSITIVE_TARGETS
|
||||
char *lname;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
assert (*name != '\0');
|
||||
@@ -85,6 +85,7 @@ lookup_file (const char *name)
|
||||
for names read from makefiles. It is here for names passed
|
||||
on the command line. */
|
||||
#ifdef VMS
|
||||
want_vmsify = (strpbrk (name, "]>:^") != NULL);
|
||||
# ifndef WANT_CASE_SENSITIVE_TARGETS
|
||||
if (*name != '.')
|
||||
{
|
||||
@@ -100,6 +101,8 @@ lookup_file (const char *name)
|
||||
|
||||
while (name[0] == '[' && name[1] == ']' && name[2] != '\0')
|
||||
name += 2;
|
||||
while (name[0] == '<' && name[1] == '>' && name[2] != '\0')
|
||||
name += 2;
|
||||
#endif
|
||||
while (name[0] == '.'
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
@@ -120,15 +123,19 @@ lookup_file (const char *name)
|
||||
}
|
||||
|
||||
if (*name == '\0')
|
||||
/* It was all slashes after a dot. */
|
||||
#if defined(VMS)
|
||||
name = "[]";
|
||||
#elif defined(_AMIGA)
|
||||
name = "";
|
||||
{
|
||||
/* It was all slashes after a dot. */
|
||||
#if defined(_AMIGA)
|
||||
name = "";
|
||||
#else
|
||||
name = "./";
|
||||
name = "./";
|
||||
#endif
|
||||
|
||||
#if defined(VMS)
|
||||
/* TODO - This section is probably not needed. */
|
||||
if (want_vmsify)
|
||||
name = "[]";
|
||||
#endif
|
||||
}
|
||||
file_key.hname = name;
|
||||
f = hash_find_item (&files, &file_key);
|
||||
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
|
||||
@@ -261,22 +268,25 @@ rehash_file (struct file *from_file, const char *to_hname)
|
||||
to_file->cmds = from_file->cmds;
|
||||
else if (from_file->cmds != to_file->cmds)
|
||||
{
|
||||
size_t l = strlen (from_file->name);
|
||||
/* We have two sets of commands. We will go with the
|
||||
one given in the rule explicitly mentioning this name,
|
||||
but give a message to let the user know what's going on. */
|
||||
if (to_file->cmds->fileinfo.filenm != 0)
|
||||
error (&from_file->cmds->fileinfo,
|
||||
l + strlen (to_file->cmds->fileinfo.filenm) + INTSTR_LENGTH,
|
||||
_("Recipe was specified for file '%s' at %s:%lu,"),
|
||||
from_file->name, to_file->cmds->fileinfo.filenm,
|
||||
to_file->cmds->fileinfo.lineno);
|
||||
else
|
||||
error (&from_file->cmds->fileinfo,
|
||||
error (&from_file->cmds->fileinfo, l,
|
||||
_("Recipe for file '%s' was found by implicit rule search,"),
|
||||
from_file->name);
|
||||
error (&from_file->cmds->fileinfo,
|
||||
l += strlen (to_hname);
|
||||
error (&from_file->cmds->fileinfo, l,
|
||||
_("but '%s' is now considered the same file as '%s'."),
|
||||
from_file->name, to_hname);
|
||||
error (&from_file->cmds->fileinfo,
|
||||
error (&from_file->cmds->fileinfo, l,
|
||||
_("Recipe for '%s' will be ignored in favor of the one for '%s'."),
|
||||
to_hname, from_file->name);
|
||||
}
|
||||
@@ -297,13 +307,14 @@ rehash_file (struct file *from_file, const char *to_hname)
|
||||
merge_variable_set_lists (&to_file->variables, from_file->variables);
|
||||
|
||||
if (to_file->double_colon && from_file->is_target && !from_file->double_colon)
|
||||
fatal (NILF, _("can't rename single-colon '%s' to double-colon '%s'"),
|
||||
from_file->name, to_hname);
|
||||
OSS (fatal, NILF, _("can't rename single-colon '%s' to double-colon '%s'"),
|
||||
from_file->name, to_hname);
|
||||
if (!to_file->double_colon && from_file->double_colon)
|
||||
{
|
||||
if (to_file->is_target)
|
||||
fatal (NILF, _("can't rename double-colon '%s' to single-colon '%s'"),
|
||||
from_file->name, to_hname);
|
||||
OSS (fatal, NILF,
|
||||
_("can't rename double-colon '%s' to single-colon '%s'"),
|
||||
from_file->name, to_hname);
|
||||
else
|
||||
to_file->double_colon = from_file->double_colon;
|
||||
}
|
||||
@@ -393,12 +404,13 @@ remove_intermediates (int sig)
|
||||
if (!f->dontcare)
|
||||
{
|
||||
if (sig)
|
||||
error (NILF, _("*** Deleting intermediate file '%s'"), f->name);
|
||||
OS (error, NILF,
|
||||
_("*** Deleting intermediate file '%s'"), f->name);
|
||||
else
|
||||
{
|
||||
if (! doneany)
|
||||
DB (DB_BASIC, (_("Removing intermediate files...\n")));
|
||||
if (!silent_flag)
|
||||
if (!run_silent)
|
||||
{
|
||||
if (! doneany)
|
||||
{
|
||||
@@ -480,7 +492,7 @@ enter_prereqs (struct dep *deps, const char *stem)
|
||||
while (dp != 0)
|
||||
{
|
||||
char *percent;
|
||||
int nl = strlen (dp->name) + 1;
|
||||
size_t nl = strlen (dp->name) + 1;
|
||||
char *nm = alloca (nl);
|
||||
memcpy (nm, dp->name, nl);
|
||||
percent = find_percent (nm);
|
||||
@@ -538,15 +550,6 @@ enter_prereqs (struct dep *deps, const char *stem)
|
||||
return deps;
|
||||
}
|
||||
|
||||
/* Set the intermediate flag. */
|
||||
|
||||
static void
|
||||
set_intermediate (const void *item)
|
||||
{
|
||||
struct file *f = (struct file *) item;
|
||||
f->intermediate = 1;
|
||||
}
|
||||
|
||||
/* Expand and parse each dependency line. */
|
||||
static void
|
||||
expand_deps (struct file *f)
|
||||
@@ -632,13 +635,69 @@ expand_deps (struct file *f)
|
||||
}
|
||||
}
|
||||
|
||||
/* Reset the updating flag. */
|
||||
/* Add extra prereqs to the file in question. */
|
||||
|
||||
struct dep *
|
||||
expand_extra_prereqs (const struct variable *extra)
|
||||
{
|
||||
struct dep *prereqs = extra ? split_prereqs (variable_expand (extra->value)) : NULL;
|
||||
|
||||
for (struct dep *d = prereqs; d; d = d->next)
|
||||
{
|
||||
d->file = lookup_file (d->name);
|
||||
if (!d->file)
|
||||
d->file = enter_file (d->name);
|
||||
d->name = NULL;
|
||||
d->ignore_automatic_vars = 1;
|
||||
}
|
||||
|
||||
return prereqs;
|
||||
}
|
||||
|
||||
/* Perform per-file snap operations. */
|
||||
|
||||
static void
|
||||
reset_updating (const void *item)
|
||||
snap_file (const void *item, void *arg)
|
||||
{
|
||||
struct file *f = (struct file *) item;
|
||||
f->updating = 0;
|
||||
struct file *f = (struct file*)item;
|
||||
struct dep *prereqs = NULL;
|
||||
|
||||
/* If we're not doing second expansion then reset updating. */
|
||||
if (!second_expansion)
|
||||
f->updating = 0;
|
||||
|
||||
/* If .SECONDARY is set with no deps, mark all targets as intermediate. */
|
||||
if (all_secondary)
|
||||
f->intermediate = 1;
|
||||
|
||||
/* If .EXTRA_PREREQS is set, add them as ignored by automatic variables. */
|
||||
if (f->variables)
|
||||
prereqs = expand_extra_prereqs (lookup_variable_in_set (STRING_SIZE_TUPLE(".EXTRA_PREREQS"), f->variables->set));
|
||||
|
||||
else if (f->is_target)
|
||||
prereqs = copy_dep_chain (arg);
|
||||
|
||||
if (prereqs)
|
||||
{
|
||||
struct dep *d;
|
||||
for (d = prereqs; d; d = d->next)
|
||||
if (streq (f->name, dep_name (d)))
|
||||
/* Skip circular dependencies. */
|
||||
break;
|
||||
|
||||
if (d)
|
||||
/* We broke early: must have found a circular dependency. */
|
||||
free_dep_chain (prereqs);
|
||||
else if (!f->deps)
|
||||
f->deps = prereqs;
|
||||
else
|
||||
{
|
||||
d = f->deps;
|
||||
while (d->next)
|
||||
d = d->next;
|
||||
d->next = prereqs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* For each dependency of each file, make the 'struct dep' point
|
||||
@@ -688,9 +747,6 @@ snap_deps (void)
|
||||
expand_deps (f);
|
||||
free (file_slot_0);
|
||||
}
|
||||
else
|
||||
/* We're not doing second expansion, so reset updating. */
|
||||
hash_map (&files, reset_updating);
|
||||
|
||||
/* Now manage all the special targets. */
|
||||
|
||||
@@ -732,10 +788,7 @@ snap_deps (void)
|
||||
f2->intermediate = f2->secondary = 1;
|
||||
/* .SECONDARY with no deps listed marks *all* files that way. */
|
||||
else
|
||||
{
|
||||
all_secondary = 1;
|
||||
hash_map (&files, set_intermediate);
|
||||
}
|
||||
all_secondary = 1;
|
||||
|
||||
f = lookup_file (".EXPORT_ALL_VARIABLES");
|
||||
if (f != 0 && f->is_target)
|
||||
@@ -756,7 +809,7 @@ snap_deps (void)
|
||||
if (f != 0 && f->is_target)
|
||||
{
|
||||
if (f->deps == 0)
|
||||
silent_flag = 1;
|
||||
run_silent = 1;
|
||||
else
|
||||
for (d = f->deps; d != 0; d = d->next)
|
||||
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
||||
@@ -767,6 +820,15 @@ snap_deps (void)
|
||||
if (f != 0 && f->is_target)
|
||||
not_parallel = 1;
|
||||
|
||||
{
|
||||
struct dep *prereqs = expand_extra_prereqs (lookup_variable (STRING_SIZE_TUPLE(".EXTRA_PREREQS")));
|
||||
|
||||
/* Perform per-file snap operations. */
|
||||
hash_map_arg(&files, snap_file, prereqs);
|
||||
|
||||
free_dep_chain (prereqs);
|
||||
}
|
||||
|
||||
#ifndef NO_MINUS_C_MINUS_O
|
||||
/* If .POSIX was defined, remove OUTPUT_OPTION to comply. */
|
||||
/* This needs more work: what if the user sets this in the makefile?
|
||||
@@ -776,7 +838,9 @@ snap_deps (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Set the 'command_state' member of FILE and all its 'also_make's. */
|
||||
/* Set the 'command_state' member of FILE and all its 'also_make's.
|
||||
Don't decrease the state of also_make's (e.g., don't downgrade a 'running'
|
||||
also_make to a 'deps_running' also_make). */
|
||||
|
||||
void
|
||||
set_command_state (struct file *file, enum cmd_state state)
|
||||
@@ -786,7 +850,8 @@ set_command_state (struct file *file, enum cmd_state state)
|
||||
file->command_state = state;
|
||||
|
||||
for (d = file->also_make; d != 0; d = d->next)
|
||||
d->file->command_state = state;
|
||||
if (state > d->file->command_state)
|
||||
d->file->command_state = state;
|
||||
}
|
||||
|
||||
/* Convert an external file timestamp to internal form. */
|
||||
@@ -803,10 +868,11 @@ file_timestamp_cons (const char *fname, time_t stamp, long int ns)
|
||||
&& product <= ts && ts <= ORDINARY_MTIME_MAX))
|
||||
{
|
||||
char buf[FILE_TIMESTAMP_PRINT_LEN_BOUND + 1];
|
||||
const char *f = fname ? fname : _("Current time");
|
||||
ts = s <= OLD_MTIME ? ORDINARY_MTIME_MIN : ORDINARY_MTIME_MAX;
|
||||
file_timestamp_sprintf (buf, ts);
|
||||
error (NILF, _("%s: Timestamp out of range; substituting %s"),
|
||||
fname ? fname : _("Current time"), buf);
|
||||
OSS (error, NILF,
|
||||
_("%s: Timestamp out of range; substituting %s"), f, buf);
|
||||
}
|
||||
|
||||
return ts;
|
||||
@@ -1046,9 +1112,10 @@ print_file_data_base (void)
|
||||
/* Verify the integrity of the data base of files. */
|
||||
|
||||
#define VERIFY_CACHED(_p,_n) \
|
||||
do{\
|
||||
if (_p->_n && _p->_n[0] && !strcache_iscached (_p->_n)) \
|
||||
error (NULL, _("%s: Field '%s' not cached: %s"), _p->name, # _n, _p->_n); \
|
||||
do{ \
|
||||
if (_p->_n && _p->_n[0] && !strcache_iscached (_p->_n)) \
|
||||
error (NULL, strlen (_p->name) + CSTRLEN (# _n) + strlen (_p->_n), \
|
||||
_("%s: Field '%s' not cached: %s"), _p->name, # _n, _p->_n); \
|
||||
}while(0)
|
||||
|
||||
static void
|
||||
@@ -1086,8 +1153,8 @@ build_target_list (char *value)
|
||||
|
||||
if (files.ht_fill != last_targ_count)
|
||||
{
|
||||
unsigned long max = EXPANSION_INCREMENT (strlen (value));
|
||||
unsigned long len;
|
||||
size_t max = EXPANSION_INCREMENT (strlen (value));
|
||||
size_t len;
|
||||
char *p;
|
||||
struct file **fp = (struct file **) files.ht_vec;
|
||||
struct file **end = &fp[files.ht_size];
|
||||
@@ -1101,12 +1168,12 @@ build_target_list (char *value)
|
||||
if (!HASH_VACANT (*fp) && (*fp)->is_target)
|
||||
{
|
||||
struct file *f = *fp;
|
||||
int l = strlen (f->name);
|
||||
size_t l = strlen (f->name);
|
||||
|
||||
len += l + 1;
|
||||
if (len > max)
|
||||
{
|
||||
unsigned long off = p - value;
|
||||
size_t off = p - value;
|
||||
|
||||
max += EXPANSION_INCREMENT (l + 1);
|
||||
value = xrealloc (value, max);
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definition of target file data structures for GNU Make.
|
||||
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
@@ -21,6 +21,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "hash.h"
|
||||
|
||||
struct commands;
|
||||
struct dep;
|
||||
struct variable;
|
||||
struct variable_set_list;
|
||||
|
||||
struct file
|
||||
{
|
||||
const char *name;
|
||||
@@ -58,6 +63,8 @@ struct file
|
||||
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
|
||||
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
|
||||
has been performed. */
|
||||
unsigned int considered; /* equal to 'considered' if file has been
|
||||
considered on current scan of goal chain */
|
||||
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
||||
enum update_status /* Status of the last attempt to update. */
|
||||
{
|
||||
@@ -66,7 +73,7 @@ struct file
|
||||
us_question, /* Needs to be updated (-q is is set). */
|
||||
us_failed /* Update failed. */
|
||||
} update_status ENUM_BITFIELD (2);
|
||||
enum cmd_state /* State of the commands. */
|
||||
enum cmd_state /* State of commands. ORDER IS IMPORTANT! */
|
||||
{
|
||||
cs_not_started = 0, /* Not yet started. Must be 0! */
|
||||
cs_deps_running, /* Dep commands running. */
|
||||
@@ -96,20 +103,19 @@ struct file
|
||||
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
||||
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
||||
pattern-specific variables. */
|
||||
unsigned int considered:1; /* equal to 'considered' if file has been
|
||||
considered on current scan of goal chain */
|
||||
unsigned int no_diag:1; /* True if the file failed to update and no
|
||||
diagnostics has been issued (dontcare). */
|
||||
};
|
||||
|
||||
|
||||
extern struct file *suffix_file, *default_file;
|
||||
extern struct file *default_file;
|
||||
|
||||
|
||||
struct file *lookup_file (const char *name);
|
||||
struct file *enter_file (const char *name);
|
||||
struct dep *split_prereqs (char *prereqstr);
|
||||
struct dep *enter_prereqs (struct dep *prereqs, const char *stem);
|
||||
struct dep *expand_extra_prereqs (const struct variable *extra);
|
||||
void remove_intermediates (int sig);
|
||||
void snap_deps (void);
|
||||
void rename_file (struct file *file, const char *name);
|
||||
@@ -117,9 +123,12 @@ void rehash_file (struct file *file, const char *name);
|
||||
void set_command_state (struct file *file, enum cmd_state state);
|
||||
void notice_finished_file (struct file *file);
|
||||
void init_hash_files (void);
|
||||
void verify_file_data_base (void);
|
||||
char *build_target_list (char *old_list);
|
||||
void print_prereqs (const struct dep *deps);
|
||||
void print_file_data_base (void);
|
||||
int try_implicit_rule (struct file *file, unsigned int depth);
|
||||
int stemlen_compare (const void *v1, const void *v2);
|
||||
|
||||
#if FILE_TIMESTAMP_HI_RES
|
||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||
@@ -143,7 +152,7 @@ void print_file_data_base (void);
|
||||
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
||||
|
||||
/* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN"
|
||||
representing a file timestamp. The upper bound is not necessarily 19,
|
||||
representing a file timestamp. The upper bound is not necessarily 29,
|
||||
since the year might be less than -999 or greater than 9999.
|
||||
|
||||
Subtract one for the sign bit if in case file timestamps can be negative;
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user