Skip to content

Commit c61749a

Browse files
committed
misc minor cleanups and copy-edits
1 parent 15fd663 commit c61749a

File tree

10 files changed

+20
-23
lines changed

10 files changed

+20
-23
lines changed

bin/package

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
# Escape from a non-POSIX shell
2929
min_posix=/if/this/is/csh/ignore/the/error/message || exec sh $0:q $argv:q
30-
# ('test X -ef Y' is technically non-POSIX, but practically universal)
3130
min_posix='test / -ef / && path=Bad && case $PATH in (Bad) exit 1;; esac && '\
3231
'PWD=Bad && cd -P -- / && case $PWD in (/) ;; (*) exit 1;; esac && '\
3332
'! { ! case x in ( x ) : ${0##*/} || : $( : ) ;; esac; } && '\

bin/shtests

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# Escape from a non-POSIX shell
1111
min_posix=/if/this/is/csh/ignore/the/error/message || exec sh $0:q $argv:q
12-
# ('test X -ef Y' is technically non-POSIX, but practically universal)
1312
min_posix='test / -ef / && path=Bad && case $PATH in (Bad) exit 1;; esac && '\
1413
'PWD=Bad && cd -P -- / && case $PWD in (/) ;; (*) exit 1;; esac && '\
1514
'! { ! case x in ( x ) : ${0##*/} || : $( : ) ;; esac; } && '\

src/cmd/INIT/README-mamake.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# mamake and the MAM language #
22

33
MAM (Make Abstract Machine) is a simple rule-based make language
4-
that is implemented in just eight four-letter commands and four attributes,
4+
that is implemented in just ten four-letter commands and four attributes,
55
yet allows unlimited flexibility as it can execute arbitrary shell code.
66
The program implementing MAM, `mamake`,
77
is a portable C90 program written in a single file, `mamake.c`.
@@ -273,8 +273,6 @@ The following *attribute*s are available:
273273
by *target* in a manner equivalent to an empty `make` *target*/`done` block,
274274
with the optional *attribute*s applied to the new rule. A nonexistent
275275
prerequisite is an error unless a `dontcare` attribute is given.
276-
Declaring a dependency on a prerequisite that is currently being made (i.e.:
277-
directly or indirectly within that prerequisite's block) is an error.
278276

279277
### Referencing previously defined rules ###
280278

@@ -284,9 +282,12 @@ If *target* matches a previously defined rule, `prev` adds a dependency on
284282
that rule to the current rule. This is used to make a rule a prerequisite of
285283
multiple `make`...`done` blocks without repeating the rule. It is an error
286284
to specify attributes, because the attributes of the referenced rule are used.
287-
In the legacy mode, attributes are silently ignored.
285+
Declaring a dependency on a prerequisite that is currently being made (i.e.:
286+
directly or indirectly within that prerequisite's block) is an error.
288287

289-
> *Obsolete:* If the strict level is < 4, and if *target* does not match a
288+
> *Obsolete:*
289+
> In the legacy mode, attributes are silently ignored.
290+
> If the strict level is < 4, and if *target* does not match a
290291
> previously defined rule, then the following applies. In the legacy mode,
291292
> `prev` creates an empty dummy rule and ignores the *attribute*s; this is
292293
> for backward compatibility. At strict levels 1 and up, `prev` in this
@@ -314,7 +315,8 @@ to probe the C compiler for flags and features,
314315
or uses that script's stored results if not outdated.
315316
The results are stored as a series of `setv` commands
316317
in a file in the directory `%{INSTALLROOT}/lib/probe/C/mam`,
317-
the file name being a hash of full path to the compiler indicated by `%{CC}`.
318+
the file name being a hash of the full path to the compiler
319+
as indicated by `%{CC}`.
318320
That results file is then read and included in the current Mamfile
319321
as if it followed the `setv CC` command.
320322

src/cmd/INIT/mamake.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* This software is part of the ast package *
44
* Copyright (c) 1990-2013 AT&T Intellectual Property *
5-
* Copyright (c) 2020-2025 Contributors to ksh 93u+m *
5+
* Copyright (c) 2020-2026 Contributors to ksh 93u+m *
66
* and is licensed under the *
77
* Eclipse Public License, Version 2.0 *
88
* *
@@ -43,7 +43,7 @@ static const char usage[] =
4343
"[-author?Martijn Dekker <martijn@inlv.org>]"
4444
"[-author?Contributors to https://github.com/ksh93/ksh]"
4545
"[-copyright?(c) 1994-2013 AT&T Intellectual Property]"
46-
"[-copyright?(c) 2020-2025 Contributors to ksh 93u+m]"
46+
"[-copyright?(c) 2020-2026 Contributors to ksh 93u+m]"
4747
"[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html]"
4848
"[+NAME?mamake - make abstract machine make]"
4949
"[+DESCRIPTION?\bmamake\b reads \amake abstract machine\a target and"
@@ -353,7 +353,7 @@ static void usage(void)
353353
* output error message identification
354354
*/
355355

356-
static void identify(FILE * sp)
356+
static void identify(FILE *sp)
357357
{
358358
if (state.directory)
359359
fprintf(sp, "%s [%s]: ", state.id, state.directory);
@@ -1792,16 +1792,13 @@ static void probe(Rule_t *r, Makestate_t *stp)
17921792
time_t cmd_time, output_time;
17931793
Buf_t *buf;
17941794
struct stat st;
1795-
Rule_t *mamprobe_r;
17961795

17971796
if (!(cc = getval(state.vars, "CC")))
17981797
cc = "cc";
17991798
buf = buffer();
1800-
append(buf, state.installroot), append(buf, "/bin/"), append(buf, "mamprobe");
1799+
append(buf, state.installroot), append(buf, "/bin/mamprobe");
18011800
cmd = duplicate(use(buf));
1802-
/* we may need to wait for mamprobe to be generated */
1803-
if (mamprobe_r = getval(state.rules, cmd))
1804-
reap(mamprobe_r, 0);
1801+
reap(getval(state.rules, cmd), 0); /* we may need to wait for mamprobe to be generated */
18051802
cmd_time = stat(cmd, &st) ? 0 : st.st_mtime;
18061803
if (stat(cmd, &st) < 0)
18071804
error_out("not found", cmd);

src/cmd/INIT/mktest.sh

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# #
33
# This software is part of the ast package #
44
# Copyright (c) 1994-2011 AT&T Intellectual Property #
5-
# Copyright (c) 2020-2024 Contributors to ksh 93u+m #
5+
# Copyright (c) 2020-2026 Contributors to ksh 93u+m #
66
# and is licensed under the #
77
# Eclipse Public License, Version 2.0 #
88
# #

src/cmd/ksh93/include/name.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* This software is part of the ast package *
44
* Copyright (c) 1982-2012 AT&T Intellectual Property *
5-
* Copyright (c) 2020-2025 Contributors to ksh 93u+m *
5+
* Copyright (c) 2020-2026 Contributors to ksh 93u+m *
66
* and is licensed under the *
77
* Eclipse Public License, Version 2.0 *
88
* *

src/cmd/ksh93/sh/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* This software is part of the ast package *
44
* Copyright (c) 1982-2012 AT&T Intellectual Property *
5-
* Copyright (c) 2020-2025 Contributors to ksh 93u+m *
5+
* Copyright (c) 2020-2026 Contributors to ksh 93u+m *
66
* and is licensed under the *
77
* Eclipse Public License, Version 2.0 *
88
* *

src/cmd/ksh93/sh/name.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* This software is part of the ast package *
44
* Copyright (c) 1982-2012 AT&T Intellectual Property *
5-
* Copyright (c) 2020-2025 Contributors to ksh 93u+m *
5+
* Copyright (c) 2020-2026 Contributors to ksh 93u+m *
66
* and is licensed under the *
77
* Eclipse Public License, Version 2.0 *
88
* *

src/cmd/ksh93/sh/subshell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* This software is part of the ast package *
44
* Copyright (c) 1982-2012 AT&T Intellectual Property *
5-
* Copyright (c) 2020-2025 Contributors to ksh 93u+m *
5+
* Copyright (c) 2020-2026 Contributors to ksh 93u+m *
66
* and is licensed under the *
77
* Eclipse Public License, Version 2.0 *
88
* *

src/cmd/ksh93/tests/variables.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# #
33
# This software is part of the ast package #
44
# Copyright (c) 1982-2012 AT&T Intellectual Property #
5-
# Copyright (c) 2020-2025 Contributors to ksh 93u+m #
5+
# Copyright (c) 2020-2026 Contributors to ksh 93u+m #
66
# and is licensed under the #
77
# Eclipse Public License, Version 2.0 #
88
# #
@@ -1709,7 +1709,7 @@ got=$(./issue861.sh 2>&1)
17091709
"(got status $e, $(printf %q "$got"))"
17101710
unset i
17111711
1712-
# ======'"
1712+
# ======
17131713
17141714
# Problem: the global discipline function kept applying to the local variable
17151715
# for certain special variables. This was a design problem with nv_cover() in

0 commit comments

Comments
 (0)