Peter Memishian wrote:
> 
> [ Resolved issues removed. ]
> 
>  > >  > http://cr.grommit.com/~chin/ksh93-webrev-jun29/jun29-makefiles/
>  > >
>  > > I've completed my review of the Makefiles.  Things are looking good --
>  > > most of my comments are quite minor.  Nice work, Roland :-)
>  > >
>  > > General:
>  > >
>  > >         * Seems like every AST-related Makefile contains:
>  > >
>  > >             # Override this top level flag so the compiler builds in its
>  > >             # native C99 mode.  This has been enabled to support the math
>  > >             # stuff in the AST tools.
>  > >             C99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
>  > >
>  > >             # silence common libast&co. warnings (upstream will handle 
> this
>  > >             # later) ...  ... about |#pragma prototyped| ...
>  > >             CERRWARN += -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED
>  > >
>  > >           It would be really nice if we could centralize these somewhere.
>  > >           (Just a request, not a requirement.)
>  >
>  > I had the same idea... but it would mean we would need an extra
>  > "include" statement and a new file extra for these flags... and that's
>  > IMO an overkill unless more "common" things could be abstracted somehow.
> 
> Well, another common thing would be the shared ksh/libshell "KSHCPPFLAGS".
> Having a usr/src/Makefile.ast that has those three things seems worthwhile
> to me.  Yes, it's one more Makefile -- but I think it will ultimately help
> maintainability and help us centralize the logic that bridges between the
> lands of AST and ON.

I still feel uneasy about the idea to create one seperate file for the
C99MODE+CERRWARN stuff because it's AFAIK not a "catch all" solution.
Some items in the Makefiles seem to require a specific position (e.g.
before or after "include */Makefile.lib" etc.) and somehow I feel we may
end up with something like usr/src/Makefile.ast_pre_stuff,
usr/src/Makefile.ast_main_stuff and usr/src/Makefile.ast_post_stuff
(just a feeling) ...
... and the KSHCPPFLAGS idea sounds nice but I'd like to wait for
"shcomp" (ksh93's shell script bytecode compiler) to land in the tree
(BTW: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6561901
is still looking for a sponsor... ;-(( ) - AFAIK it needs similar flags
(the main code sits in libshell and "shcomp" is "yet another" frontend)
but I'd like to be sure which flags need to be exactly seperated out and
which not (same applies to "busybox").

[snip]
>  > >         * In theory, you need a FLG here so that when someone brings
>  > >           over usr/src/lib/libc they'll get Makefile.ksh93switch brought
>  > >           over too.  But FLGs are dying soon with the Mercurial switch,
>  > >           so I guess it doesn't matter.
>  >
>  > Uhm... what do you mean with "FLG" ?
> 
> A FLG is a TeamWare thing that causes bringover to grab additional files.
> For instance, if building usr/src/cmd/foo requires source files in
> usr/src/common/bar, then an "inc.flg" file in usr/src/cmd/foo would tell
> bringover to also grab the stuff in usr/src/common/bar so that when
> usr/src/cmd/foo is brought over.  Then, the subsequent `make' in
> usr/src/cmd/doo will "just work".  In general, FLGs are needed whenever
> you reference source files or Makefiles that are not along the path to the
> directory you're building in.  While FLGs will die with the rise of
> Mercurial, the idea of "reaching over" to other "peer" directories is
> still bad practice.

Ok...
... I've moved Makefile.ksh93switch to usr/src/ to avoid the reaching
over" to other "peer" directories...

>  > > lib/libcmd/Makefile.com:
>  > >
>  > >         * 104: "-Isrc/lib/libcmd" seems bizarre; why is this necessary?
>  >
>  > See
>  > http://mail.opensolaris.org/pipermail/busybox-dev/2007-April/000033.html
>  > for the layout of the upstream source files and includes. We basically
>  > use the same include file directory layout to avoid that we have to
>  > touch all consumers and adjust their "#include"-statements. This is one
>  > of the major items why the original "prototype001" failed - we didn't
>  > realise that the AST codebase has several include files with the same
>  > name in different subdirs with slightly different functionality - and
>  > getting the include order wrong may result in a code which compiles but
>  > won't work properly
> 
> I'm not sure I understand this yet.

Ok... lets describe this differently. The "src/lib/libcmd" part in
"-Isrc/lib/libcmd" has nothing to do with the OS/Net source layout, it's
the relative subpath in usr/src/lib/libcmd/$(TRANSMACH)/, e.g.
usr/src/lib/libcmd/$(TRANSMACH)/src/lib/libcmd/ ... and the same applies
to the other AST libraries, for example libast has
usr/src/lib/libast/$(TRANSMACH)/src/lib/libast/. This is how the
upstream directory layout looks like (see
http://mail.opensolaris.org/pipermail/busybox-dev/2007-April/000033.html
, note that the "src/lib/lib(ast|dll|pp|cmd|shell)/"-part cannot be
changed without poking in the AST sources (see below (the comment about
maintaince))).

> How do we choose which set of headers
> with identical names get installed into the proto area?

Uhm... this is slightly tricky to explain because we have to deal with
32bit and 64bit headers which slightly differ....
... the normal AST build puts the machine-generated "public" includes
into a seperate directory called include/ast which we move to
"usr/src/lib/$(NAME_OF_LIBRARY)/$(TRANSMACH)/include/ast/" (e.g. we
built the AST sources each time for 32bit+64bit and i386+SPARC (e.g.
currently four versions)) and the machinery in
usr/src/lib/Makefile.astinclude grabs the
"usr/src/lib/$(NAME_OF_LIBRARY)/$(MACH)/include/ast/" and
"usr/src/lib/$(NAME_OF_LIBRARY)/$(MACH64)/include/ast/" files, merges
these 32bit and 64bit includes (via /usr/bin/diff -D<cppsymbol>) and
stores the results in ${ROOT}/usr/includes/ast/ (e.g. the results work
for both 32bit and 64bit targets)
The "private" machine-generated includes and sources are in
"usr/src/lib/$(NAME_OF_LIBRARY)/$(TRANSMACH)/src/(cmd|lib)/$(NAME_OF_LIBRARY_OR_COMMAND)/"

> Do the functions
> in those headers have identical names and signatures too?

Not always. Some signatures slightly differ based on whether these are
public entry points or calls from within the same library.

> How does the
> program choose which one it ends up linked against?

An external application (e.g. anything outside the current library
directory level) will use the "public" includes from
$(ROOT)/usr/include/ast/

> Finally, what headers
> are actually in the lib/libcmd directory as opposed to lib/libcmd/common?

usr/src/lib/libcmd/common/ contains the machine-independent sources
while usr/src/lib/libcmd/$(TRANSMACH)/ contains (machine-generated)
sources+headers which are platform-specfific (e.g. 32bit vs. 64bit and
i386 vs. SPARC).

This design looks a little bit weired but the idea was to keep the
_maintaince_ requirements at an absolute minimum. Basically we only have
to build the AST/ksh sources four times, one for 32bit/i386, one for
64bit/AMD64, one for 32bit SPARC and one for 64bit SPARC and then grab
the machine-generated sources, move them to the matching places in
OS/Net as described in
http://mail.opensolaris.org/pipermail/busybox-dev/2007-April/000033.html,
update the machine-independent sources and sync the makefiles - and
that's all (without compiling and running the test suites less than
30mins of work).

>  > > lib/libdll/{sparc,sparcv9,amd64,i386}/Makefile:
>  > >
>  > >         * GETRELEASEMINOR seems the hard way around; seems simpler to
>  > >           update Makefile.master to have:
>  > >
>  > >                 RELEASE_MAJOR=5
>  > >                 RELEASE_MINOR=11
>  > >                 RELEASE=$(RELEASE_MAJOR).$(RELEASE_MINOR)
>  > >
>  > >           ... then get rid of GETRELEASEMINOR.  (But if for some reason 
> it
>  > >           needs to be kept, then please move it somewhere more common.)
>  >
>  > AFAIK this was discussed long ago. In theory you're right that such a
>  > thing belongs into Makefile.master ...
>  > ... but I am trying to avoid global changes for this putback. I am
>  > willing to fix this with a seperate putback (together with lots of other
>  > "janitor" stuff I've complained about in
>  > opensolaris-code at opensolaris.org) but please please not with this
>  > putback. Putting a new global flag into Makefile.master affects _all_
>  > Makefiles and I am not happy with having such a thing in the already
>  > large&&complex putback.
> 
> I'm a little surprised you're so scared of touching Makefile.master;
> you've already touched other common Makefiles like Makefile.lib.

Yes, but I can "predict" the results of the changes of my changes to
"Makefile.lib". Adding new variables with VERY generic names (BTW: I
wish "RELEASE" would be renamed to "OSNET_RELEASE") in "Makefile.master"
is IMO a different thing because I don't know whether this may trigger
problems if someone (for example in closed_bins/ or elsewhere) uses the
same variable names (and I don't have the CPU power or disk space to
setup a couple of "playground" trees and run a few tests (remeber my
machines chew two days on OS/Net and the Ultra5 was originally shipped
with 9GB disks... ;-( )).

BTW: See
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/ipf/Makefile.ipf#17
for a precedent (and
http://src.opensolaris.org/source/xref/onnv/onnv-gate/deleted_files/usr/src/cmd/volmgt/test/Makefile#45
for an older one) ... :-)

> I'd
> (much) rather you did the right thing from the start, but as it's a fairly
> minor thing, as long as you file a bug on it and fix it soon after
> putback, I'll go along with it.

My idea was to make the putback as easy and "safe" (where "safe" means:
Avoid touching global Makefiles or global locations if possible and try
to avoid stepping on the toes of other people - that's why
Makefile.astinclude and Makefile.l10nmsg were in usr/src/libast/,
Makefile.ksh93switch in usr/src/cmd/ksh/ and that's why I was wailing
about the "global" demo rules change. I agree it's the right thing to do
but I don't feel "safe" to have a giant patch _AND_ global changes... I
prefer do to things in "small steps" that there is a way to track-down
possible changes at a per-commit level and not do everything in one
large step) as possible and not doing it perfectly right... if I would
try to do it perfectly right I would run around and kill all the "shell
abuse" in the whole tree in one step, add CLOBBERDIRS and CLEANDIRS to
cleanup temporary directories, fix awk vs. nawk usage (AFAIK the tree
only needs one "awk" version, not two (the same applies to "fgrep",
"grep" and "egrep")), merge command execution for targets, replace usage
of "sort | uniq" with "sort -u", fix the message catalog build from
using "ls */*.c" (echo */*.c is IMO enougth, the "ls" call only costs
lots of extra |stat()|&co. calls), merge I/O rediction etc. (well...
somehow it feels that it will take the lifetime of a few engineers to
clean things up... ;-( ) ...

>  > >         * Seems simpler to replace DLLPLATFORMCPPFLAGS with
>  > >           DLLPLATFORM=sun4 (or i386), and then have Makefile.com have
>  > >           "-DHOSTTYPE="sol$(RELEASE_MINOR).$(DLLPLATFORM)" in CPPFLAGS.
>  >
>  > Right... but DLLPLATFORMCPPFLAGS was modelled after a matching upstream
>  > build flag which is per-platform. I know it's currently slightly
>  > "redundant" but DLLPLATFORMCPPFLAGS is intended to contain only
>  > per-platform flags which are set in
>  > usr/src/lib/libdll/$(TRANSMACH)/Makefile ...
>  > ... your choice: Keep the current code or change it...
> 
> I'd like to see DLLPLATFORMCPPFLAGS die once you make the Makefile.master
> changes.

Agreed.

[snip] 
>  > >         * 134-171: Could we keep the CPPFLAGS in cmd/ksh/Makefile.com
>  > >           and here in-sync through includes instead?
>  >
>  > Uhm.. in theory yes... but it would generate "yet another" Makefile
>  > include and IMO the current four/five/six-level hieracy is mind-bending
>  > and sometimes it's already tricky to answer the question "...where does
>  > _that_ weired flag come from..." (somehow I wish there would be
>  > something like a "makefile debugger").
>  > Erm... your choice... keep current code or create seperate Makefile
>  > include (I would prefer to keep the current makefile code, assuming that
>  > people read the comments in the makefiles... :-) ) ...
> 
> Let me know what you think of the usr/src/Makefile.ast suggestion above.

Mhhh... I am more or less undicided about the C99MODE/CERRWARN thing...
and forthe KSHCPPFLAGS it may be nice to wait until we have "shcomp" in
the tree...

>  > >         * 143: -Isrc/cmd/ksh93 seems suspicious; why are header files
>  > >           for the library lurking over in a command directory?
>  >
>  > See above... it's the upstream source file layout.
> 
> Can you be more specific in this case?  What header files is it taking
> from the src/cmd/ksh93 directory?

Private headers for libshell - the directory is the same type as
described for src/lib/libcmd/ above (e.g. the i386-specific private
machine-generated includes+sources are put in
usr/src/lib/libshell/i386/src/cmd/ksh93/, the AMD64-specific private
includes+sources are in usr/src/lib/libshell/amd64/src/cmd/ksh93/ etc.)
- the name "src/cmd/ksh93" has more historical reasons and should IMO
really be "src/lib/libshell/" but we have to stick with the upstream
directory layout of the includes to avoid falling into the trap we hit
with "prototype001" and/or poke all consumers within libshell to adjust
the code for our different paths.

> Assuming that those header files
> contain functions, where do the implementations come from?  (You need to
> ensure the answer is never "the build machine's /lib or /usr/lib".)

The implementation comes from within the libshell codebase. Any public
headers are in usr/src/lib/libshell/$(TRANSMACH)/include/ast/ (and are
processed by Makefile.astinclude and then installed in
$(ROOT)/usr/include/ast/) - those in
usr/src/lib/libshell/$(TRANSMACH)/src/cmd/ksh93/ are private
platform-specific machine-generated headers.

>  > > cmd/Makefile:
>  > >
>  > >         * 31: Why include ksh/Makefile.ksh93switch here?
>  >
>  > Originally it was added for the /sbin/ksh93 machinery which was removed
>  > during PSARC 2006/550... AFAIK April had some ideas to (later) turn-off
>  > putting ksh88 into /usr/bin/ksh when the flag is "on"...
>  > ... April ?
>  >
>  > >           If we really
>  > >           need this, seems like Makefile.ksh93switch needs to move to a
>  > >           more common directory.
>  >
>  > Any suggestions where I should it move to (AFAIK usr/src/, right ?) ?
> 
> Yeah.  But only if April can explain why it's needed :-)

April ?

>  > > cmd/ksh/Makefile:
>  > >
>  > >         * 65-74: I'm confused why this logic is here and at e.g. lines
>  > >           39-46 of cmd/ksh/i386/Makefile.
>  >
>  > This logic is needed to install isaexec links for all variants of ksh
>  > (e.g. restricted shell, profile shell etc.) depending on the setting in
>  > Makefile.ksh93switch and the values of USRKSH_ALIAS_LIST and PROG,
>  > ...
> 
> I think I understand what the logic is for.  What I don't understand is
> why the *same* logic appears to exist in cmd/ksh/Makefile,
> cmd/ksh/i386/Makefile, and cmd/ksh/sparc/Makefile.

The logic in usr/src/cmd/ksh/Makefile is for the isaexec hardlinks while
the logic in usr/src/cmd/ksh/$(TRANSMACH)/ is for the binary and it's
hardlinks itself (and they can't move to Makefile.com since there is a
difference between ROOTPROG32 and ROOTPROG64 (and the detail that the
Makefiles in usr/src/cmd/ do not define TRANSMACH (that's why I added
CMDTRANSMACH))).

The final file layout looks like this (from
http://www.opensolaris.org/os/project/ksh93-integration/downloads/ksh93_integration_20070419_snapshot_i386.lsfiles.txt
with user, group, date and time removed):
-- snip --
-r-xr-xr-x 9120 usr/bin/amd64/ksh93
hr-xr-xr-x    0 usr/bin/amd64/rksh93 link to usr/bin/amd64/ksh93
-r-xr-xr-x 7656 usr/bin/i86/ksh93
hr-xr-xr-x    0 usr/bin/i86/rksh93 link to usr/bin/i86/ksh93
-r-xr-xr-x 7748 usr/bin/ksh93
hr-xr-xr-x    0 usr/bin/rksh93 link to usr/bin/ksh93
-- snip --

[snip]
>  > >         * 132: I think this comment is supposed to explain why we delete
>  > >           ksh and ksh93 even for `clean' (rather than `clobber'), but I'm
>  > >           not quite getting it.
>  >
>  > We delete _both_ targets to make sure that a change in
>  > "ON_BUILD_KSH93_AS_BINKSH" gets handled properly. It's a safeguard to
>  > avoid that anyone works with stale binaries by accident (and there is
>  > the old issue with "io.sh" (which is AFAIK fixed but I didn't had time
>  > to verify that yet... ;-( )).
> 
> But the `clean' target is not supposed to remove the final products of an
> `all'; that's what `clobber' is for.

Ok... I moved "ksh" and "ksh93" to the "CLOBBERFILES" list.

[snip]
>  > >         * 56-61: Since we're well past build 64, can this issue be
>  > >           removed?  (If not, please reformat the comment to be 80-column
>  > >           friendly.)
>  >
>  > Erm... I don't have a build machine > B61 and I can't simply update my
>  > two build machines because I would either loose the abilty to test the
>  > |libc::wordexp()| code or have to update the whole tree to a newer
>  > Nevada build (which would trigger problems for April because she would
>  > have to re-do her whole SCCS tree...).
> 
> But you're well aware of the issue, so the comment is not for you, right?
> Others will be running on newer builds (since B61 is history), so I don't
> see why the comment is needed.

Erm, the comment is needed because the shell code below adds an
exception for the matching test run. I'd like to explain _why_ the
exception is currently there (and AFAIK there is no variable to test for
the Nevada build version (e.g. B[0-9]*)) to make the exception
conditional... ;-(

>  > >         * 113-143: Please reformat to be 80-column friendly.
>  >
>  > OUCH... ;-(
>  > Is this really neccesary ?
> 
> Yes; our Makefile style rules require an 80-column margin.  (There are
> some violators; they are a hazzard.)  If you're concerned about
> readability, could the whole thing be moved out to a standalone script
> which takes some command-line arguments via a Makefile invocation?  As it
> is, it's already pretty hard to read IMHO :-(

Well, there is a comment about rewriting the whole monstrosity in ksh93.
At least all the "egrep" and "grep" things will disappear and the whole
thing will become more compact and easier to maintain. A seperate script
is slightly tricky since it depends on _lots_ of variables in the
Makefiles which would need to be passed as parameters somehow - and the
result won't be much prettier then the current solution... ;-/
... anyway... I've re-arranged the script to fit within the 80-column
margin. The comments have been re-arranged to fit within the 80-column
margin except the URL (otherwise you can't click it in the source
browser) and the output of the "options.sh" test failure...
... is that Ok ?

[snip]
>  > >         * 90: $(TOUCH) instead?
>  >
>  > I am using "touch" to create an "empty" message catalog file for now
>  > when we don't build the AST message catalogs, e.g. if ...
> 
> My question was about why you're not using the $(TOUCH) macro, not about
> why you're using `touch' conceptually.

Uhm... I don't know... maybe because I forgot about the $(TOUCH) macro
when I wrote the code...


I've attached the current patch as
"ksh93_integration_review_meem002.diff.txt".

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
-------------- next part --------------
Index: src/Makefile.ksh93switch
===================================================================
--- src/Makefile.ksh93switch    (revision 694)
+++ src/Makefile.ksh93switch    (working copy)
@@ -26,12 +26,11 @@
 #
 
 # Should we build ksh93 as /bin/ksh ?
-# this can be overridden via
-# $ export ON_BUILD_KSH93_AS_BINKSH=1 # at build time
+# This can be overridden at build time via:
+# $ export ON_BUILD_KSH93_AS_BINKSH=1
 ON_BUILD_KSH93_AS_BINKSH=0
 
 BINKSH_IS_KSH93_1=   $(ON_BUILD_KSH93_AS_BINKSH:0=$(POUND_SIGN))
 BINKSH_ISNOT_KSH93_1=$(ON_BUILD_KSH93_AS_BINKSH:1=$(POUND_SIGN))
 BINKSH_IS_KSH93=     $(BINKSH_IS_KSH93_1:1=)
 BINKSH_ISNOT_KSH93=  $(BINKSH_ISNOT_KSH93_1:0=)
-
Index: src/cmd/ksh/Makefile.ksh93switch
===================================================================
--- src/cmd/ksh/Makefile.ksh93switch    (revision 694)
+++ src/cmd/ksh/Makefile.ksh93switch    (working copy)
@@ -1,37 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident        "%Z%%M% %I%     %E% SMI"
-#
-
-# Should we build ksh93 as /bin/ksh ?
-# this can be overridden via
-# $ export ON_BUILD_KSH93_AS_BINKSH=1 # at build time
-ON_BUILD_KSH93_AS_BINKSH=0
-
-BINKSH_IS_KSH93_1=   $(ON_BUILD_KSH93_AS_BINKSH:0=$(POUND_SIGN))
-BINKSH_ISNOT_KSH93_1=$(ON_BUILD_KSH93_AS_BINKSH:1=$(POUND_SIGN))
-BINKSH_IS_KSH93=     $(BINKSH_IS_KSH93_1:1=)
-BINKSH_ISNOT_KSH93=  $(BINKSH_ISNOT_KSH93_1:0=)
-
Index: src/cmd/ksh/Makefile.testshell
===================================================================
--- src/cmd/ksh/Makefile.testshell      (revision 724)
+++ src/cmd/ksh/Makefile.testshell      (working copy)
@@ -53,17 +53,17 @@
 #          io.sh[81]: picked up file descriptor zero for opening script file
 #   -- snip --
 #
-# - "sun_solaris_getconf.sh" is currently in the whitelist for tests which are 
allowed to fail
-#   per explicit permission by Don Cragun
+# - "sun_solaris_getconf.sh" is currently in the whitelist for tests which are
+#   allowed to fail per explicit permission by Don Cragun
 #   (see 
http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2007-April/002499.html)
-#   because Solaris 11 < B64 returns a wrong value for "SSIZE_MAX" (see bug 
#6548104). Builds
-#   on >= B64 should no longer fail.
+#   because Solaris 11 < B64 returns a wrong value for "SSIZE_MAX" (see
+#   bug #6548104). Builds on >= B64 should no longer fail.
 #
 # - These tests need a working system clock, otherwise they'll bite you.
 #
 # - The test frontend in this Makefile should be rewritten in ksh93
 #   instead of the current /usr/bin/ksh (=ksh88i). This would be far less
-#   compliciated.
+#   complicated.
 #
 # - More locales should be tested here (via ON_KSH_TEST_LOCALES below).
 #   Locales like "ru_RU.KOI8-R","de_DE.UTF-8", "is_IS.ISO8859-1", 
@@ -77,8 +77,10 @@
 #   all important markets based on suggestions by Sun's i18n team.
 #
 
+TESTSRC= $(LIBSHELLSRC)/../tests
+
 # ON_KSH_TEST_LOCALES can be overridden via
-# % export ON_KSH_TEST_LOCALES=<value> before % make install
+# $ export ON_KSH_TEST_LOCALES=<value> # before $ make install #
 ON_KSH_TEST_LOCALES = \
        C \
        en_US en_US.UTF-8 \
@@ -92,53 +94,70 @@
        zh_TW.BIG5 zh_TW.EUC zh_TW.UTF-8
 
 # ON_KSH_TEST_LIST can be overridden via
-# % export ON_KSH_TEST_LIST=<value> before % make install
-ON_KSH_TEST_LIST = $(LIBSHELLSRC)/tests/*.sh
+# $ export ON_KSH_TEST_LIST=<value> # before $ make install #
+ON_KSH_TEST_LIST = $(TESTSRC)/*.sh
 
 # We must wait for other things in this subdir to finish before running
 # the test suite, otherwise we may run into trouble that this activity
-# may disturb the test suite run (resulting in weired "heisenbug"-like
+# may disturb the test suite run (resulting in weird "heisenbug"-like
 # test failures).
 testshell: $(PROG)
        @ \
-       print '# NOTE: Make sure your binaries in ROOT match your kernel!!' ; \
-       (set +e ; export PATH="$(SRC)/cmd/ksh/$(CMDTRANSMACH):/bin:/usr/bin" ; \
-           printf "# which ksh='%s', ksh93='%s'\n" "$$(which ksh)" "$$(which 
ksh93)" ; \
+       print '# NOTE: Make sure your binaries in ROOT match your kernel!' ; \
+       ( \
+           set +o errexit ; \
+           export PATH="$(SRC)/cmd/ksh/$(CMDTRANSMACH):/bin:/usr/bin" ; \
+           printf "# which ksh='%s', ksh93='%s'\n" \
+               "$$(which ksh)" "$$(which ksh93)" ; \
        ) ; \
-       if [ "$$(isalist | fgrep "$(CMDTRANSMACH)")" = "" ] ; then \
-           printf "# ISA=$(CMDTRANSMACH) cannot be executed on this system, 
skipping tests...\n" ; \
+       if [[ "$$(isalist | fgrep "$(CMDTRANSMACH)")" = "" ]] ; then \
+           printf \
+               "# ISA='%s' not available on this system, skipping tests...\n" \
+               "$(CMDTRANSMACH)" ; \
            exit 0 ; \
        fi ; \
        exec 2>&1 ; \
-       (supported_locales="$$(locale -a)" ; \
+       (supported_locales="$$(/usr/bin/locale -a)" ; \
        for test_lang in $(ON_KSH_TEST_LOCALES) ; do \
-           if [ "$$(print "$${supported_locales}" | egrep 
"^$${test_lang}\$$")" = "" ] ; then \
-               print "# Locale $${test_lang} not supported, skipping tests..." 
; \
+           if [[ "$$(print "$${supported_locales}" | \
+                    egrep "^$${test_lang}\$$")" = "" ]] ; then \
+               printf \
+                   "# Locale '%s' not supported, skipping tests...\n" \
+                   "$${test_lang}" ; \
                continue ; \
            fi ; \
            (for test_item in $(ON_KSH_TEST_LIST) ; do \
-                   [ "$${test_item}" = "$(LIBSHELLSRC)/tests/builtins.sh" -o \
-                     "$${test_item}" = "$(LIBSHELLSRC)/tests/options.sh" -o \
-                     "$${test_item}" = 
"$(LIBSHELLSRC)/tests/sun_solaris_getconf.sh" ] && set +e ; \
-                   printf "## Running $(CMDTRANSMACH)/ksh test: LANG='%s' 
script='%s'\n" "$${test_lang}" "$$(basename "$${test_item}")"; \
-                    ( \
-                       test_output="$$( ( \
-                           export \
-                               SHELL="$(SRC)/cmd/ksh/$(CMDTRANSMACH)/ksh" \
-                               LD_LIBRARY_PATH_64="$(ROOT)/usr/lib/$(MACH64)/" 
\
-                               LD_LIBRARY_PATH_32="$(ROOT)/usr/lib/" ; \
-                               
LD_LIBRARY_PATH="$(ROOT)/usr/lib/$(MACH64)/:$(ROOT)/usr/lib/" ; \
-                           "$${SHELL}" "$(LIBSHELLSRC)/tests/shtests" -t \
-                               LD_LIBRARY_PATH_64="$${LD_LIBRARY_PATH_64}" \
-                               LD_LIBRARY_PATH_32="$${LD_LIBRARY_PATH_32}" \
-                               LD_LIBRARY_PATH="$${LD_LIBRARY_PATH}" \
-                               SHELL="$${SHELL}" \
-                               LANG="$${test_lang}" \
-                               LC_ALL="$${test_lang}" \
-                                 "$${test_item}" \
-                       ) 2>&1 | while read ; do printf "#\t%s\n" "$${REPLY}" ; 
done | tee /dev/stderr)" ; \
-                       [ "$$(print "$${test_output}" | egrep 'passed \[ .* 
tests 0 errors \]')" != "" ] || (print "##> test failed" ; exit 1) \
-                    ) ; \
-                   set -e ; \
+               [[ "$${test_item}" = "$(TESTSRC)/builtins.sh" || \
+                  "$${test_item}" = "$(TESTSRC)/options.sh" || \
+                  "$${test_item}" = "$(TESTSRC)/sun_solaris_getconf.sh" ]] && \
+                  set +o errexit ; \
+               printf \
+                   "## Running %s test: LANG='%s' script='%s'\n" \
+                   "$(CMDTRANSMACH)/ksh" \
+                   "$${test_lang}" \
+                   "$$(basename "$${test_item}")"; \
+                ( \
+                   test_output="$$( ( \
+                       export \
+                           SHELL="$(SRC)/cmd/ksh/$(CMDTRANSMACH)/ksh" \
+                           LD_LIBRARY_PATH_64="$(ROOTLIB64)/" \
+                           LD_LIBRARY_PATH_32="$(ROOTLIB)/" ; \
+                           LD_LIBRARY_PATH="$(ROOTLIB64)/:$(ROOTLIB)/" ; \
+                       "$${SHELL}" "$(TESTSRC)/shtests" -t \
+                           LD_LIBRARY_PATH_64="$${LD_LIBRARY_PATH_64}" \
+                           LD_LIBRARY_PATH_32="$${LD_LIBRARY_PATH_32}" \
+                           LD_LIBRARY_PATH="$${LD_LIBRARY_PATH}" \
+                           SHELL="$${SHELL}" \
+                           LANG="$${test_lang}" \
+                           LC_ALL="$${test_lang}" \
+                             "$${test_item}" \
+                   ) 2>&1 | while read ; do \
+                                printf "#\t%s\n" "$${REPLY}" ; \
+                            done | tee /dev/stderr)" ; \
+                   [[ "$$(print "$${test_output}" | \
+                         egrep 'passed \[ .* tests 0 errors \]')" != "" ]] || \
+                             (print "##> test failed" ; exit 1) \
+                ) ; \
+               set -o errexit ; \
            done) ; \
        done)
Index: src/cmd/ksh/sparcv9/Makefile
===================================================================
--- src/cmd/ksh/sparcv9/Makefile        (revision 718)
+++ src/cmd/ksh/sparcv9/Makefile        (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Specify the MACH we currently use to build and test ksh
 CMDTRANSMACH= $(MACH64)
 
@@ -40,7 +38,7 @@
        (print "# Installing 64bit $(PROG) aliases $(USRKSH_ALIAS_LIST)" ; \
        set -o xtrace ; \
        for i in $(USRKSH_ALIAS_LIST) ; do \
-               [ $$i = $(PROG) ] && continue ; \
+               [[ "$$i" = "$(PROG)" ]] && continue ; \
                $(RM) "$(ROOTBIN64)/$$i" ; \
                $(LN) "$(ROOTBIN64)/$(PROG)" "$(ROOTBIN64)/$$i" ; \
        done \
Index: src/cmd/ksh/sparc/Makefile
===================================================================
--- src/cmd/ksh/sparc/Makefile  (revision 718)
+++ src/cmd/ksh/sparc/Makefile  (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Specify the MACH we currently use to build and test ksh
 CMDTRANSMACH= $(MACH)
 
@@ -39,7 +37,7 @@
        (print "# Installing 32bit $(PROG) aliases $(USRKSH_ALIAS_LIST)" ; \
        set -o xtrace ; \
        for i in $(USRKSH_ALIAS_LIST) ; do \
-               [ $$i = $(PROG) ] && continue ; \
+               [[ "$$i" = "$(PROG)" ]] && continue ; \
                $(RM) "$(ROOTBIN32)/$$i" ; \
                $(LN) "$(ROOTBIN32)/$(PROG)" "$(ROOTBIN32)/$$i" ; \
        done \
Index: src/cmd/ksh/i386/Makefile
===================================================================
--- src/cmd/ksh/i386/Makefile   (revision 718)
+++ src/cmd/ksh/i386/Makefile   (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Specify the MACH we currently use to build and test ksh
 CMDTRANSMACH= $(MACH)
 
@@ -39,7 +37,7 @@
        (print "# Installing 32bit $(PROG) aliases $(USRKSH_ALIAS_LIST)" ; \
        set -o xtrace ; \
        for i in $(USRKSH_ALIAS_LIST) ; do \
-               [ $$i = $(PROG) ] && continue ; \
+               [[ "$$i" = "$(PROG)" ]] && continue ; \
                $(RM) "$(ROOTBIN32)/$$i" ; \
                $(LN) "$(ROOTBIN32)/$(PROG)" "$(ROOTBIN32)/$$i" ; \
        done \
Index: src/cmd/ksh/Makefile.com
===================================================================
--- src/cmd/ksh/Makefile.com    (revision 732)
+++ src/cmd/ksh/Makefile.com    (working copy)
@@ -25,8 +25,10 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-include ../Makefile.ksh93switch
+SHELL=/usr/bin/ksh
 
+include ../../../Makefile.ksh93switch
+
 $(BINKSH_IS_KSH93)PROG= ksh
 $(BINKSH_IS_KSH93)USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93 pfksh
 
@@ -34,23 +36,12 @@
 $(BINKSH_ISNOT_KSH93)USRKSH_ALIAS_LIST=ksh93 rksh93
 
 OBJECTS= \
-       sh/pmain.o
+       pmain.o
 
-# We are storing the object files into subdirs, following the
-# object file layout of usr/src/lib/libshell/Makefile.com
-# (this Makefile is basically a cut-down version of that
-# Makefile).
-OBJDIRS =  \
-       sh
-PICSDIRS= $(OBJDIRS)
-mkpicdirs:
-       @mkdir -p $(PICSDIRS)
-       
-LIBSHELLSRC=../../../lib/libshell/common
+LIBSHELLSRC=../../../lib/libshell/common/sh
 
-SRCS=           $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
+SRCS=  $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
 
-
 GROUP= bin
 LDLIBS += -lshell
 
@@ -112,7 +103,7 @@
        $(COMPILE.c) -c -o $@ $<
        $(POST_PROCESS_O)
 
-all:   mkpicdirs .WAIT $(PROG)
+all:   $(PROG)
 
 # We explicitly delete "ksh" and "ksh93" to catch changes in
 # BUILD_KSH93_AS_BINKSH (see Makefile.ksh93switch)
@@ -124,17 +115,20 @@
        $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
        $(POST_PROCESS)
        (set +o errexit ; \
-       [ ! -x ksh93 ] && ln $(PROG) ksh93 ; \
-       [ ! -x ksh   ] && ln $(PROG) ksh   ; \
+       [[ ! -x ksh93 ]] && ln $(PROG) ksh93 ; \
+       [[ ! -x ksh   ]] && ln $(PROG) ksh   ; \
        true \
        )
 
-# We explicitly delete "ksh" and "ksh93" to catch changes in
-# BUILD_KSH93_AS_BINKSH (see Makefile.ksh93switch)
 clean:
        $(RM) $(OBJECTS)
-       $(RM) ksh ksh93
 
+# We explicitly delete "ksh" and "ksh93" to catch changes in
+# BUILD_KSH93_AS_BINKSH (see Makefile.ksh93switch)
+CLOBBERFILES += \
+       ksh \
+       ksh93
+
 #
 # ksh is not lint-clean yet; fake up a target.  (You can use
 # "make lintcheck" to actually run lint; please send all lint fixes
Index: src/cmd/ksh/amd64/Makefile
===================================================================
--- src/cmd/ksh/amd64/Makefile  (revision 718)
+++ src/cmd/ksh/amd64/Makefile  (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Specify the MACH we currently use to build and test ksh
 CMDTRANSMACH= $(MACH64)
 
@@ -40,7 +38,7 @@
        (print "# Installing 64bit $(PROG) aliases $(USRKSH_ALIAS_LIST)" ; \
        set -o xtrace ; \
        for i in $(USRKSH_ALIAS_LIST) ; do \
-               [ $$i = $(PROG) ] && continue ; \
+               [[ "$$i" = "$(PROG)" ]] && continue ; \
                $(RM) "$(ROOTBIN64)/$$i" ; \
                $(LN) "$(ROOTBIN64)/$(PROG)" "$(ROOTBIN64)/$$i" ; \
        done \
Index: src/cmd/ksh/Makefile
===================================================================
--- src/cmd/ksh/Makefile        (revision 718)
+++ src/cmd/ksh/Makefile        (working copy)
@@ -27,7 +27,7 @@
 
 SHELL=/usr/bin/ksh
 
-include Makefile.ksh93switch
+include ../../Makefile.ksh93switch
 
 $(BINKSH_IS_KSH93)PROG= ksh
 $(BINKSH_IS_KSH93)USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93 pfksh
@@ -67,7 +67,7 @@
        $(LN) $(ISAEXEC) $(ROOTPROG)
        @(set -o xtrace ; \
        for i in $(USRKSH_ALIAS_LIST) ; do \
-               [ $$i = $(PROG) ] && continue ; \
+               [[ "$$i" = "$(PROG)" ]] && continue ; \
                $(RM) "$(ROOTBIN)/$$i" ; \
                $(LN) "$(ROOTBIN)/$(PROG)" "$(ROOTBIN)/$$i" ; \
        done \
Index: src/cmd/Makefile
===================================================================
--- src/cmd/Makefile    (revision 715)
+++ src/cmd/Makefile    (working copy)
@@ -27,9 +27,8 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 
 include ../Makefile.master
+include ../Makefile.ksh93switch
 
-include ksh/Makefile.ksh93switch
-
 #
 #      Note that the commands 'agents', 'lp', 'perl', and 'man' are first in
 #      the list, violating alphabetical order.  This is because they are very
Index: src/cmd/nsadmin/Makefile
===================================================================
--- src/cmd/nsadmin/Makefile    (revision 694)
+++ src/cmd/nsadmin/Makefile    (working copy)
@@ -56,4 +56,3 @@
        $(RM) .login
 
 lint:
-
Index: src/cmd/ast/msgcc/Makefile
===================================================================
--- src/cmd/ast/msgcc/Makefile  (revision 718)
+++ src/cmd/ast/msgcc/Makefile  (working copy)
@@ -67,26 +67,14 @@
        ) >msgcc ; \
        chmod a+rx msgcc
 
-# install rules for AST tools/commands
 ROOTCMDDIR=$(ROOT)/usr/ast/bin
 
-# main
 PROG= msgcvt msggen msgget msgcpp msgcc
 
 all: $(PROG)
 
 install: all $(ROOTCMD)
 
-clean:
+clean lint:
 
-lint:
-
-# cleanup
-CLOBBERFILES += \
-       msgcc \
-       msgcvt \
-       msggen \
-       msgget \
-       msgcpp
-
 include ../../Makefile.targ
Index: src/lib/libshell/Makefile.demo
===================================================================
--- src/lib/libshell/Makefile.demo      (revision 720)
+++ src/lib/libshell/Makefile.demo      (working copy)
@@ -71,5 +71,4 @@
                $(ROOTDEMODIRBASE)/fun \
                $(ROOTDEMODIRBASE)/tests
 
-install: \
-       $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
+install: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
Index: src/lib/libshell/sparcv9/Makefile
===================================================================
--- src/lib/libshell/sparcv9/Makefile   (revision 718)
+++ src/lib/libshell/sparcv9/Makefile   (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 include ../../Makefile.lib.64
 
Index: src/lib/libshell/sparc/Makefile
===================================================================
--- src/lib/libshell/sparc/Makefile     (revision 698)
+++ src/lib/libshell/sparc/Makefile     (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 
 install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
Index: src/lib/libshell/i386/Makefile
===================================================================
--- src/lib/libshell/i386/Makefile      (revision 698)
+++ src/lib/libshell/i386/Makefile      (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 
 install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
Index: src/lib/libshell/Makefile.com
===================================================================
--- src/lib/libshell/Makefile.com       (revision 718)
+++ src/lib/libshell/Makefile.com       (working copy)
@@ -25,6 +25,8 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
+SHELL=/usr/bin/ksh
+
 LIBRARY=       libshell.a
 VERS=          .1
 
@@ -119,7 +121,7 @@
 
 LIBS =         $(DYNLIB) $(LINTLIB)
 
-# load dll, socket, nsl and secdb libraries on demand
+# load dll, socket, and secdb libraries on demand
 LDLIBS += \
        -lcmd \
        -z lazyload -ldll -z nolazyload \
@@ -137,7 +139,7 @@
 # case - it MUST come as the last element but future changes in -D options
 # may then cause silent breakage in the AST sources because the last -D
 # option specified overrides previous -D options so we prefer the current
-# way to expliclity list each single flag.
+# way to explicitly list each single flag.
 CPPFLAGS = \
        $(DTEXTDOM) $(DTS_ERRNO) \
        -Isrc/cmd/ksh93 \
Index: src/lib/libshell/amd64/Makefile
===================================================================
--- src/lib/libshell/amd64/Makefile     (revision 718)
+++ src/lib/libshell/amd64/Makefile     (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 include ../../Makefile.lib.64
 
Index: src/lib/libshell/Makefile
===================================================================
--- src/lib/libshell/Makefile   (revision 718)
+++ src/lib/libshell/Makefile   (working copy)
@@ -45,7 +45,6 @@
 
 LIBRARY=       libshell.a
 
-# definitions for install_h target
 HDRS= \
        history.h \
        nval.h \
Index: src/lib/Makefile.astmsg
===================================================================
--- src/lib/Makefile.astmsg     (revision 718)
+++ src/lib/Makefile.astmsg     (working copy)
@@ -26,13 +26,13 @@
 #
 
 #
-# Temporary control building AST l10n catalogs until all build machines
-# have been updated.
+# Temporarily control building AST l10n catalogs until all build
+# machines have been updated.
 #
 
 # Should we build AST l10n catalogs ?
-# this can be overridden via
-# % export ON_BUILD_AST_L10N_CATALOGS=1 # at build time
+# This can be overridden at build time via:
+# $ export ON_BUILD_KSH93_AS_BINKSH=1
 ON_BUILD_AST_L10N_CATALOGS=0
 
 DO_BUILD_AST_CATALOGS_1=       $(ON_BUILD_AST_L10N_CATALOGS:0=$(POUND_SIGN))
@@ -41,7 +41,7 @@
 DONT_BUILD_AST_CATALOGS=       $(DONT_BUILD_AST_CATALOGS_1:0=)
 
 #
-# l10n mesage catalog generation for AST libraries
+# l10n message catalog generation for AST libraries
 #
 
 MSGLIBNAME= $(LIBRARY:.a=)
@@ -57,11 +57,11 @@
 ASTMSGS=  $(OBJECTS:%.o=msgs/%.mso)
 
 # cpp defines needed by msgcc
-i386_ASTMSGCCFLAGS=    -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR -D__i386
-amd64_ASTMSGCCFLAGS=   -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR -D__amd64
-sparc_ASTMSGCCFLAGS=   -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR -D__sparc
-sparcv9_ASTMSGCCFLAGS= -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR 
-D__sparcv9
-ASTMSGCCFLAGS=$($(TARGETMACH)_ASTMSGCCFLAGS)
+i386_ASTMSGCCFLAGS=    -D__i386
+amd64_ASTMSGCCFLAGS=   -D__amd64
+sparc_ASTMSGCCFLAGS=   -D__sparc
+sparcv9_ASTMSGCCFLAGS= -D__sparcv9
+ASTMSGCCFLAGS= -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR 
$($(TARGETMACH)_ASTMSGCCFLAGS)
 
 msgs/%.mso: ../common/%.c
        @mkdir -p "$$(dirname "$@")" ; \
@@ -78,7 +78,7 @@
 
 $(ASTMSGCATALOG): $(MSGLIBNAME).msg
        @$(RM) "$(ASTMSGCATALOG)" ; \
-       cat "$(MSGLIBNAME).msg" | sed 's/^$$translation msgcc .*//' | gencat 
"$@" -
+       sed 's/^$$translation msgcc .*//' <"$(MSGLIBNAME).msg" | gencat "$@" -
 
 # Main catalog target
 $(DO_BUILD_AST_CATALOGS)_msg: $(ASTMSGCATALOG)
@@ -87,7 +87,7 @@
 # package database each time we toggle the switch)
 $(DONT_BUILD_AST_CATALOGS)_msg:
 $(DONT_BUILD_AST_CATALOGS)     $(RM) $(ASTMSGCATALOG) ; \
-       touch $(ASTMSGCATALOG)
+       $(TOUCH) $(ASTMSGCATALOG)
 
 # Add message catalogs to the list of files to "clobber"
 CLOBBERFILES += \
Index: src/lib/libcmd/sparcv9/Makefile
===================================================================
--- src/lib/libcmd/sparcv9/Makefile     (revision 698)
+++ src/lib/libcmd/sparcv9/Makefile     (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 include ../../Makefile.lib.64
 
Index: src/lib/libcmd/sparc/Makefile
===================================================================
--- src/lib/libcmd/sparc/Makefile       (revision 698)
+++ src/lib/libcmd/sparc/Makefile       (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 
 all: $(LIBS)
Index: src/lib/libcmd/i386/Makefile
===================================================================
--- src/lib/libcmd/i386/Makefile        (revision 698)
+++ src/lib/libcmd/i386/Makefile        (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 
 all: $(LIBS)
Index: src/lib/libcmd/Makefile.com
===================================================================
--- src/lib/libcmd/Makefile.com (revision 718)
+++ src/lib/libcmd/Makefile.com (working copy)
@@ -25,6 +25,8 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
+SHELL=/usr/bin/ksh
+
 LIBRARY =      libcmd.a
 VERS =         .1
 OBJECTS =      \
@@ -95,7 +97,7 @@
 # case - it MUST come as the last element but future changes in -D options
 # may then cause silent breakage in the AST sources because the last -D
 # option specified overrides previous -D options so we prefer the current
-# way to expliclity list each single flag.
+# way to explicitly list each single flag.
 # Notes:
 #   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
 CPPFLAGS = \
@@ -128,8 +130,6 @@
 
 .KEEP_STATE:
 
-# libcmd API is completely private and therefore does not need
-# to call "fnamecheck" here
 all: $(LIBS) 
 
 #
Index: src/lib/libcmd/amd64/Makefile
===================================================================
--- src/lib/libcmd/amd64/Makefile       (revision 698)
+++ src/lib/libcmd/amd64/Makefile       (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 include ../../Makefile.lib.64
 
Index: src/lib/libcmd/Makefile
===================================================================
--- src/lib/libcmd/Makefile     (revision 718)
+++ src/lib/libcmd/Makefile     (working copy)
@@ -43,13 +43,10 @@
 
 all clean clobber install lint _msg: $(SUBDIRS)
 
-# definitions for install_h target
 HDRS=  \
        cmd.h \
        cmdext.h
 
-# libast/libcmd headers are partially generated and depend on
-# the architecture (e.g. "i386", "sparc", ...)
 HDRDIR32= $(MACH)/include/ast
 HDRDIR64= $(MACH64)/include/ast
 include ../Makefile.astinclude
Index: src/lib/libc/sparcv9/Makefile
===================================================================
--- src/lib/libc/sparcv9/Makefile       (revision 715)
+++ src/lib/libc/sparcv9/Makefile       (working copy)
@@ -934,7 +934,7 @@
 
 # Conditionally add support for making |wordexp()| check whether
 # /usr/bin/ksh is ksh93 or not
-include ../../../cmd/ksh/Makefile.ksh93switch
+include ../../../Makefile.ksh93switch
 CPPFLAGS += -DWORDEXP_KSH93=$(ON_BUILD_KSH93_AS_BINKSH)
 
 # Inform the run-time linker about libc specialized initialization
Index: src/lib/libc/sparc/Makefile
===================================================================
--- src/lib/libc/sparc/Makefile (revision 715)
+++ src/lib/libc/sparc/Makefile (working copy)
@@ -988,7 +988,7 @@
 
 # Conditionally add support for making |wordexp()| check whether
 # /usr/bin/ksh is ksh93 or not
-include ../../../cmd/ksh/Makefile.ksh93switch
+include ../../../Makefile.ksh93switch
 CPPFLAGS += -DWORDEXP_KSH93=$(ON_BUILD_KSH93_AS_BINKSH)
 
 # Inform the run-time linker about libc specialized initialization
Index: src/lib/libc/i386/Makefile.com
===================================================================
--- src/lib/libc/i386/Makefile.com      (revision 715)
+++ src/lib/libc/i386/Makefile.com      (working copy)
@@ -971,7 +971,7 @@
 
 # Conditionally add support for making |wordexp()| check whether
 # /usr/bin/ksh is ksh93 or not
-include ../../../cmd/ksh/Makefile.ksh93switch
+include ../../../Makefile.ksh93switch
 CPPFLAGS += -DWORDEXP_KSH93=$(ON_BUILD_KSH93_AS_BINKSH)
 
 # Inform the run-time linker about libc specialized initialization
Index: src/lib/libc/amd64/Makefile
===================================================================
--- src/lib/libc/amd64/Makefile (revision 715)
+++ src/lib/libc/amd64/Makefile (working copy)
@@ -924,7 +924,7 @@
 
 # Conditionally add support for making |wordexp()| check whether
 # /usr/bin/ksh is ksh93 or not
-include ../../../cmd/ksh/Makefile.ksh93switch
+include ../../../Makefile.ksh93switch
 CPPFLAGS += -DWORDEXP_KSH93=$(ON_BUILD_KSH93_AS_BINKSH)
 
 # Inform the run-time linker about libc specialized initialization
Index: src/lib/Makefile
===================================================================
--- src/lib/Makefile    (revision 731)
+++ src/lib/Makefile    (working copy)
@@ -512,7 +512,7 @@
 libsasl:       libgss libsocket pkcs11 libmd
 sasl_plugins:  pkcs11 libgss libsocket libsasl
 libsctp:       libsocket
-libshell:      libast libcmd libdll libsocket libnsl libsecdb
+libshell:      libast libcmd libdll libsocket libsecdb
 libsip:                libmd5
 libsocket:     libnsl
 libldap5:      libsasl libsocket libnsl libmd
Index: src/lib/libdll/sparcv9/Makefile
===================================================================
--- src/lib/libdll/sparcv9/Makefile     (revision 718)
+++ src/lib/libdll/sparcv9/Makefile     (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Fetch minor version from RELEASE, e.g. "10" for "5.10", "11" for "5.11" etc.
 GETRELEASEMINOR = /usr/bin/ksh -c 'x=$(RELEASE) ; print 
"$${x$(POUND_SIGN)$(POUND_SIGN)*.}"'
 
Index: src/lib/libdll/sparc/Makefile
===================================================================
--- src/lib/libdll/sparc/Makefile       (revision 698)
+++ src/lib/libdll/sparc/Makefile       (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Fetch minor version from RELEASE, e.g. "10" for "5.10", "11" for "5.11" etc.
 GETRELEASEMINOR = /usr/bin/ksh -c 'x=$(RELEASE) ; print 
"$${x$(POUND_SIGN)$(POUND_SIGN)*.}"'
 
Index: src/lib/libdll/i386/Makefile
===================================================================
--- src/lib/libdll/i386/Makefile        (revision 698)
+++ src/lib/libdll/i386/Makefile        (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Fetch minor version from RELEASE, e.g. "10" for "5.10", "11" for "5.11" etc.
 GETRELEASEMINOR = /usr/bin/ksh -c 'x=$(RELEASE) ; print 
"$${x$(POUND_SIGN)$(POUND_SIGN)*.}"'
 
Index: src/lib/libdll/Makefile.com
===================================================================
--- src/lib/libdll/Makefile.com (revision 718)
+++ src/lib/libdll/Makefile.com (working copy)
@@ -25,6 +25,8 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
+SHELL=/usr/bin/ksh
+
 LIBRARY=       libdll.a
 VERS=          .1
 
@@ -59,7 +61,7 @@
 # case - it MUST come as the last element but future changes in -D options
 # may then cause silent breakage in the AST sources because the last -D
 # option specified overrides previous -D options so we prefer the current
-# way to expliclity list each single flag.
+# way to explicitly list each single flag.
 # Notes:
 #   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
 CPPFLAGS = \
Index: src/lib/libdll/amd64/Makefile
===================================================================
--- src/lib/libdll/amd64/Makefile       (revision 718)
+++ src/lib/libdll/amd64/Makefile       (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Fetch minor version from RELEASE, e.g. "10" for "5.10", "11" for "5.11" etc.
 GETRELEASEMINOR = /usr/bin/ksh -c 'x=$(RELEASE) ; print 
"$${x$(POUND_SIGN)$(POUND_SIGN)*.}"'
 
Index: src/lib/libdll/Makefile
===================================================================
--- src/lib/libdll/Makefile     (revision 718)
+++ src/lib/libdll/Makefile     (working copy)
@@ -45,7 +45,6 @@
 
 LIBRARY=       libdll.a
 
-# definitions for install_h target
 HDRS= \
        dlldefs.h
 
Index: src/lib/libast/sparcv9/Makefile
===================================================================
--- src/lib/libast/sparcv9/Makefile     (revision 718)
+++ src/lib/libast/sparcv9/Makefile     (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Fetch minor version from RELEASE, e.g. "10" for "5.10", "11" for "5.11" etc.
 GETRELEASEMINOR = /usr/bin/ksh -c 'x=$(RELEASE) ; print 
"$${x$(POUND_SIGN)$(POUND_SIGN)*.}"'
 
Index: src/lib/libast/sparc/Makefile
===================================================================
--- src/lib/libast/sparc/Makefile       (revision 718)
+++ src/lib/libast/sparc/Makefile       (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Fetch minor version from RELEASE, e.g. "10" for "5.10", "11" for "5.11" etc.
 GETRELEASEMINOR = /usr/bin/ksh -c 'x=$(RELEASE) ; print 
"$${x$(POUND_SIGN)$(POUND_SIGN)*.}"'
 
Index: src/lib/libast/i386/Makefile
===================================================================
--- src/lib/libast/i386/Makefile        (revision 718)
+++ src/lib/libast/i386/Makefile        (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Fetch minor version from RELEASE, e.g. "10" for "5.10", "11" for "5.11" etc.
 GETRELEASEMINOR = /usr/bin/ksh -c 'x=$(RELEASE) ; print 
"$${x$(POUND_SIGN)$(POUND_SIGN)*.}"'
 
Index: src/lib/libast/Makefile.com
===================================================================
--- src/lib/libast/Makefile.com (revision 718)
+++ src/lib/libast/Makefile.com (working copy)
@@ -25,6 +25,8 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
+SHELL=/usr/bin/ksh
+
 LIBRARY=       libast.a
 VERS=          .1
 
Index: src/lib/libast/amd64/Makefile
===================================================================
--- src/lib/libast/amd64/Makefile       (revision 718)
+++ src/lib/libast/amd64/Makefile       (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 # Fetch minor version from RELEASE, e.g. "10" for "5.10", "11" for "5.11" etc.
 GETRELEASEMINOR = /usr/bin/ksh -c 'x=$(RELEASE) ; print 
"$${x$(POUND_SIGN)$(POUND_SIGN)*.}"'
 
Index: src/lib/libast/Makefile
===================================================================
--- src/lib/libast/Makefile     (revision 718)
+++ src/lib/libast/Makefile     (working copy)
@@ -45,7 +45,6 @@
 
 LIBRARY=       libast.a
 
-# definitions for install_h target
 HDRS=  \
        align.h \
        ast_botch.h \
Index: src/lib/libpp/sparc/Makefile
===================================================================
--- src/lib/libpp/sparc/Makefile        (revision 698)
+++ src/lib/libpp/sparc/Makefile        (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 
 install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
Index: src/lib/libpp/i386/Makefile
===================================================================
--- src/lib/libpp/i386/Makefile (revision 698)
+++ src/lib/libpp/i386/Makefile (working copy)
@@ -25,8 +25,6 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
-SHELL=/usr/bin/ksh
-
 include ../Makefile.com
 
 install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
Index: src/lib/libpp/Makefile.com
===================================================================
--- src/lib/libpp/Makefile.com  (revision 718)
+++ src/lib/libpp/Makefile.com  (working copy)
@@ -25,6 +25,8 @@
 # ident        "%Z%%M% %I%     %E% SMI"
 #
 
+SHELL=/usr/bin/ksh
+
 LIBRARY=       libpp.a
 VERS=          .1
 
@@ -77,7 +79,7 @@
 # case - it MUST come as the last element but future changes in -D options
 # may then cause silent breakage in the AST sources because the last -D
 # option specified overrides previous -D options so we prefer the current
-# way to expliclity list each single flag.
+# way to explicitly list each single flag.
 CPPFLAGS = \
        $(DTEXTDOM) $(DTS_ERRNO) \
        -I. \
@@ -97,7 +99,7 @@
        -xstrconst
 
 # silence common libast&co. warning about |#pragma prototyped|
-# (upstream is working on getting everything execept the
+# (upstream is working on getting everything except the
 # E_UNRECOGNIZED_PRAGMA_IGNORED stuff fixed)
 CERRWARN += -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED
 pics/ppcall.o          := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
Index: src/lib/libpp/Makefile
===================================================================
--- src/lib/libpp/Makefile      (revision 718)
+++ src/lib/libpp/Makefile      (working copy)
@@ -45,7 +45,6 @@
 
 LIBRARY=       libpp.a
 
-# definitions for install_h target
 HDRS= \
        pp.h \
        ppkey.h

Reply via email to