1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

Build system: make SHOPT_* editable again; allow indenting Mamfiles

The build system is adapted to make SHOPT_* compile-time options
editable without nmake. We can now easily change ksh's compile-time
options by editing src/cmd/ksh93/SHOPT.sh. The bin/package script
is adapted to turn these into compile flags. This resolves the most
important drawback of not using nmake.

Also, mamake now has support for indented Mam (Make Abstract
Machine) code. Only one type of block (make...done) is supported in
Mamfiles, so they are easy to indent automatically. A script to
(re)do this is included.

Since nmake is not going to be restored (it has too many problems
that no one is interested in fixing), this at least makes mamake
significantly easier to work with.

The Makefiles are deleted. They may still be handy for reference to
understand the Mamfiles, but they haven't actually matched the
Mamfiles for a while -- and you can still look in the git history.

Deleting them requires some adaptations to bin/package and mamake.c
because, even though they do not use those files, they still looked
for them to decide whether to build code in a directory.

Finally, this commit incorporates some #pragmas for clang to
suppress annoying warnings about the coding style used in this
historic code base. (gcc does not complain so much.)

src/cmd/ksh93/SHOPT.sh:
- Added.

bin/package, src/cmd/INIT/package.sh:
- cd into our own directory in case we were run from another dir.
- $makefiles: only look for Mamfiles.
- Add ksh compile-options via KSH_SHOPTFLAGS. Include SHOPT.sh.
- make_recurse(): Do not write a missing Makefile.
- finalize environment: Look for Mamfiles instead of Makefiles.

src/cmd/INIT/mamake.c:
- Tell clang to suppress annoying warnings about coding style.
- Update version string and self-documentation.
- input(): Add support for indented Mam code by skipping initial
  whitespace on each input line.
- files[]: Instead of looking for various of Makefiles to decide
  where to build, only look for Mamfiles.

src/Makefile, src/cmd/INIT/Makefile, src/cmd/Makefile,
src/cmd/builtin/Makefile, src/cmd/ksh93/Makefile, src/lib/Makefile,
src/lib/libast/Makefile, src/lib/libcmd/Makefile,
src/lib/libdll/Makefile, src/lib/libsum/Makefile:
- Removed.

src/Mamfile, src/cmd/INIT/Mamfile, src/cmd/Mamfile,
src/cmd/builtin/Mamfile, src/cmd/ksh93/Mamfile, src/lib/Mamfile,
src/lib/libast/Mamfile, src/lib/libcmd/Mamfile,
src/lib/libdll/Mamfile, src/lib/libsum/Mamfile:
- Indent the code with tabs.
- In ksh93/Mamfile, add ${KSH_SHOPT_FLAGS} to every $CC command.
- In ksh93/Mamfile, add "prev SHOPT.sh" for every *.o file
  so they are rebuilt whenever SHOPT.sh changes.

bin/Mamfile_indent:
- Added, in case someone wants to re-indent a Mamfile.

src/cmd/INIT/proto.c, src/cmd/INIT/ratz.c, src/cmd/INIT/release.c,
src/lib/libast/features/common, src/lib/libast/include/ast.h:
- Tell clang to suppress annoying warnings about coding style that
  it disapproves of (mainly concerning the use of parentheses).

src/cmd/INIT/cc.darwin, src/cmd/INIT/cc.freebsd,
src/cmd/INIT/cc.openbsd:
- Remove now-redundant clang warning suppression flags.

Resolves: https://github.com/ksh93/ksh/issues/60
This commit is contained in:
Martijn Dekker 2021-01-22 23:23:14 +00:00
parent 47468f56c2
commit 6cc2f6a0af
35 changed files with 11768 additions and 12763 deletions

5
NEWS
View file

@ -3,6 +3,11 @@ For full details, see the git log at: https://github.com/ksh93/ksh
Any uppercase BUG_* names are modernish shell bug IDs. Any uppercase BUG_* names are modernish shell bug IDs.
2021-01-22:
- Compile-time shell options can now be edited in src/cmd/ksh93/SHOPT.sh
before building.
2021-01-20: 2021-01-20:
- Fixed: executing a DEBUG trap in a command substitution had side effects - Fixed: executing a DEBUG trap in a command substitution had side effects

View file

@ -46,11 +46,18 @@ Though there are many bugs left to fix, we are confident at this point that
## Build ## Build
After downloading a release or cloning the ksh git repository, cd to the top To build ksh with a custom configuration of features, edit
directory of it and run: [`src/cmd/ksh93/SHOPT.sh`](/ksh93/ksh/blob/master/src/cmd/ksh93/SHOPT.sh).
Then `cd` to the top directory and run:
```sh ```sh
bin/package make bin/package make
``` ```
The compiled binaries are stored in the `arch` directory, in a subdirectory
that corresponds to your architecture. The command `bin/package host type`
outputs the name of this subdirectory.
If you have trouble or want to tune the binaries, you may pass additional If you have trouble or want to tune the binaries, you may pass additional
compiler and linker flags. It is usually best to export these as environment compiler and linker flags. It is usually best to export these as environment
variables *before* running `bin/package` as they could change the name of variables *before* running `bin/package` as they could change the name of
@ -59,7 +66,7 @@ convenient way to keep them consistent between build and test commands.
**Note that this system uses `CCFLAGS` instead of the usual `CFLAGS`.** **Note that this system uses `CCFLAGS` instead of the usual `CFLAGS`.**
An example that makes Solaris Studio cc produce a 64-bit binary: An example that makes Solaris Studio cc produce a 64-bit binary:
```sh ```sh
export CCFLAGS="-xc99 -m64 -O2" LDFLAGS="-m64" export CCFLAGS="-xc99 -m64 -O" LDFLAGS="-m64"
bin/package make bin/package make
``` ```
Alternatively you can append these to the command, and they will only be Alternatively you can append these to the command, and they will only be

33
bin/Mamfile_indent Executable file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env sh
IFS=''; set -fCu # safe mode: no split/glob = no quoting headaches
let() { return $((!($1))); }
# Automatically (re-)indent make...done blocks in a Mamfile.
# Usage: Mamfile_indent <Mamfile >Mamfile.new
#
# Should work on all current POSIX compliant shells.
# By Martijn Dekker <martijn@inlv.org>, 2021. Public domain.
# Spacing per indentation level. Edit to change style.
indent=' ' # one tab
# Remove existing indentation, add new indentation.
indentlvl=0
sed 's/^[[:space:]]*//' \
| while read -r line
do case $line in
'') continue ;;
done*) let "indentlvl -= 1" ;;
esac
spc=
i=0
while let "(i += 1) <= indentlvl"
do spc=$indent$spc
done
printf '%s\n' $spc$line
case $line in
make*) let "indentlvl += 1" ;;
esac
done

View file

@ -31,6 +31,29 @@ Bad*) echo "Cannot be run by zsh in native mode; use a sh symlink to zsh" >&2
exit 1 ;; exit 1 ;;
esac esac
unset CDPATH
case $0 in
-*)
echo "dodgy \$0: $0" >&2
exit 1 ;;
*/package)
mydir=`echo "$0" | sed 's,/package$,,'`
cd "$mydir" || exit
case $PWD in
*/bin) ;;
*) echo "this script must live in bin/" >&2
exit 1 ;;
esac
cd .. || exit
unset mydir ;;
package)
echo "this script must be invoked with a direct path, e.g. bin/package" >&2
exit 1 ;;
*)
echo "this script must be named 'package'" >&2
exit 1 ;;
esac
# shell checks # shell checks
checksh() checksh()
{ {
@ -64,7 +87,7 @@ usr="/home"
lib="" # nee /usr/local/lib /usr/local/shlib lib="" # nee /usr/local/lib /usr/local/shlib
ccs="/usr/kvm /usr/ccs/bin" ccs="/usr/kvm /usr/ccs/bin"
org="gnu GNU" org="gnu GNU"
makefiles="Mamfile Nmakefile nmakefile Makefile makefile" makefiles="Mamfile" # ksh 93u+m no longer uses these: Nmakefile nmakefile Makefile makefile
env="HOSTTYPE NPROC PACKAGEROOT INSTALLROOT PATH" env="HOSTTYPE NPROC PACKAGEROOT INSTALLROOT PATH"
checksum=md5sum checksum=md5sum
checksum_commands="$checksum md5" checksum_commands="$checksum md5"
@ -1405,6 +1428,20 @@ case $ksh_relflags in
assign="${assign:+$assign }KSH_RELFLAGS=\"\$ksh_relflags\"" ;; assign="${assign:+$assign }KSH_RELFLAGS=\"\$ksh_relflags\"" ;;
esac esac
# Add ksh compile-options via KSH_SHOPTFLAGS.
SHOPT()
{
case $1 in
*=?*) ksh_shoptflags="${ksh_shoptflags:+$ksh_shoptflags }-DSHOPT_$1" ;;
esac
}
ksh_shoptflags=
. src/cmd/ksh93/SHOPT.sh # this script calls SHOPT() to set options
case $ksh_shoptflags in
?*) # add the extra flags as an argument to mamake
assign="${assign:+$assign }KSH_SHOPTFLAGS=\"\$ksh_shoptflags\"" ;;
esac
# grab action specific args # grab action specific args
case $action in case $action in
@ -4037,12 +4074,6 @@ make_recurse() # dir
then return then return
fi fi
done done
if test -d $1
then case $exec in
'') echo :MAKE: > $1/Makefile || exit ;;
*) $exec "echo :MAKE: > $1/Makefile" ;;
esac
fi
} }
get() # host path [ file size ] get() # host path [ file size ]
@ -7218,7 +7249,7 @@ update) # download the latest release.version for selected packages
use) # finalize the environment use) # finalize the environment
x=:.. x=:..
for d in `( cd $PACKAGEROOT; ls src/*/Makefile src/*/Nmakefile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u )` for d in `( cd $PACKAGEROOT; ls src/*/Mamfile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u )`
do x=$x:$INSTALLROOT/$d do x=$x:$INSTALLROOT/$d
done done
x=$x:$INSTALLROOT x=$x:$INSTALLROOT

View file

@ -1 +0,0 @@
:MAKE:

View file

@ -1,7 +1,7 @@
info mam static info mam static
note source level :MAKE: equivalent note source level :MAKE: equivalent
make install make install
make all make all
exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS} exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
done all virtual done all virtual
done install virtual done install virtual

View file

@ -1,346 +0,0 @@
/*
* initialization for all packages
*/
ID = ast
SILENT = /* this component builds silent -- this prevents us from using it while building it */
:PACKAGE: license=$(ID)
LICENSE = since=1994,author=gsf
PACKAGEROOT = $(INSTALLROOT:T=F:P=L*:O=n)
hurl :: hurl.sh LICENSE=since=2003,author=gsf
iffe :: iffe.sh LICENSE=since=1994,author=gsf+kpv
mktest :: mktest.sh LICENSE=since=2005,author=gsf
package :: package.sh
regress :: regress.sh LICENSE=since=1995,author=gsf
rt :: rt.sh LICENSE=since=2005,author=gsf
$(PACKAGEROOT)/bin :INSTALLDIR: execrate ignore mamprobe package silent
crossexec :: crossexec.sh
ditto :: ditto.sh LICENSE=since=2001,author=gsf+ek
execrate :: execrate.sh LICENSE=since=2002,author=gsf
filter :: filter.sh
ignore :: ignore.sh
silent :: silent.sh
$(PACKAGEROOT)/lib/package :INSTALLDIR: package.mk CONVERT.mk
$(LIBDIR)/make :INSTALLDIR: package.mk PROBE.mk TEST.mk WWW.mk \
MSGFUN.mk MSGKEY.mk MAPLIB.mk
:TEST: iffe mamake
cc ld ldd :PACKAGE_INIT: mamake.c proto.c ratz.c release.c
:: RELEASE hosttype.tst p.c hello.c \
ar.ibm.risc \
cc.specialize cc.pentium4 \
ldd.cygwin.i386 \
cc.darwin.i386 cc.darwin.i386-64 cc.darwin ldd.darwin \
cc.hp.ia64 cc.hp.pa cc.hp.pa64 ld.hp.pa ldd.hp.pa \
cc.ibm.risc cc.ibm.risc.gcc ldd.ibm.risc \
cc.linux.ia64-icc cc.linux.i386-icc cc.linux.i386-64-icc \
cc.lynxos.i386 cc.lynxos.ppc ldd.lynxos \
cc.mvs.390 cc.next.i386 cc.next.m68k ldd.mvs.390 \
cc.osf.alpha \
cc.sco.i386 \
cc.sgi.mips2 cc.sgi.mips3 cc.sgi.mips3-o32 cc.sgi.mips4 \
cc.sgi.mips4-n32 ldd.sgi \
cc.unix.mc68k cc.unixware.i386
LICENSE : .DONTCARE
if ! CC.HOSTTYPE
CC.HOSTTYPE := $(_hosttype_|HOSTTYPE)
end
$(BINDIR)/mkdir :INSTALL: mkdir.sh
if test ! -x $(<) -a -x /bin/mkdir
then mkdir -p 2>/dev/null || :
if test -d ./-p
then rmdir ./-p
cp $(*) $(<)
chmod +x $(<)
fi
fi
/*
* ksh93 function search on PATH
* ksh93 builtin command library -lcmd
* ksh93 ld library path search on PATH
*/
$(BINDIR)/.paths :INSTALL: (CC.DIALECT)
if test ! -f $(<) -o -w $(<)
then N='$("\n")'
H=$(CC.HOSTTYPE)
P="$(-mam:??$(.GETCONF LIBPATH:/:/ /G:/,/ : /G:Q)?)"
b= f= h= l= n= p= u= B= L=
set : $P
while :
do while :
do case $1 in
'') break 2 ;;
:) shift; break ;;
esac
shift
done
case $# in
0|1) break ;;
esac
case $L in
?*) L="$L|" ;;
esac
L="$L$2=*"
B=$1
done
if test -f $(<)
then while read x
do case $x in
*\$\(\"*) break # to fix 2012-06-18 edit botch #
;;
'#'?*) case $h in
'') h=$x ;;
esac
;;
$L) l=$x
;;
*BUILTIN_LIB=*) b=$x
;;
*FPATH=*) f=$x
;;
*PLUGIN_LIB=*) p=$x
;;
*) case $u in
?*) u=$u$N ;;
esac
u=$u$x
;;
esac
done < $(<)
fi
ifs=$IFS
m=
case $p in
?*) b=
;;
esac
case $b in
?*) IFS='='
set $b
IFS=$ifs
shift
p="PLUGIN_LIB=$*"
case $b in
[Nn][Oo]*) p=no$p ;;
esac
m=1
;;
esac
case $f in
'') f="FPATH=../fun"
m=1
;;
esac
case $h in
'') h='# use { no NO } prefix to permanently disable #' ;;
esac
case $l in
'') set x x : $P
l=
while :
do while :
do case $# in
0) break ;;
esac
x=$1
shift
case $x in
:) break ;;
esac
done
case $# in
0|1) break
;;
2) l=$2
;;
*) case "$H" in
$3) l=$2; break ;;
esac
;;
esac
done
case $l in
'') if test -x /lib/dld.sl
then l=SHLIB_PATH
elif test -x /usr/lib/dyld
then l=DYLD_LIBRARY_PATH
else case "$H" in
ibm.*|mvs.*)
l=LIBPATH
;;
sgi.mips3)
l=LD_LIBRARYN32_PATH
;;
sgi.mips4)
l=LD_LIBRARYN64_PATH
;;
*) l=LD_LIBRARY_PATH
;;
esac
fi
;;
esac
case $l in
?*) case $B in
'') B=lib ;;
esac
l="$l=../$B"
m=1
;;
esac
;;
esac
case $p in
'') p="PLUGIN_LIB=cmd"
case '$(CC.DIALECT:N=*EXPORT=[AD]LL*)' in
'') p=no$p ;;
esac
m=1
;;
esac
case $m in
1) case $u in
?*) u=$N$u ;;
esac
echo "$h$N$p$N$f$N$l$u" > $(<)
;;
esac
fi
/*
* probe initialization
*/
for T C+probe C+make+probe.lcl C+pp+probe.lcl
if T == "*.lcl"
$(T) : .DONTCARE
end
$(LIBDIR)/probe/$(T:C,+,/,G) :INSTALL: $(T)
end
$(LIBDIR)/probe/C/mam/probe :INSTALL: mprobe
mprobe :: mprobe.sh
$(LIBDIR)/probe/C/make :INSTALLDIR: probe probe.ini
probe.sh : C+probe make.probe
cat $(*) > $(<)
probe :: probe.sh
probe.ini : (CC.HOSTTYPE) probe.win32
t=$(CC.HOSTTYPE)
ifs=$IFS
IFS=.
set x $t
IFS=$ifs
t=$2
set x $(*)
while :
do shift
case $# in
0) break ;;
esac
case $1 in
*probe.$t)
break
esac
done
case $1 in
?*) cmp -s $1 $(<) || cp $1 $(<) ;;
*) : > $(<)
esac
/*
* proto initialization
*/
$(INCLUDEDIR)/$(ID) :INSTALLDIR: prototyped.h
prototyped.h : $(BINDIR)/proto
proto -f /dev/null > h.$(tmp).h
if $(CMP) -s h.$(tmp).h $(<)
then $(RM) -f h.$(tmp).h
else $(MV) h.$(tmp).h $(<)
fi
/*
* check if -ldl is required
* this allows makefiles to use -ldl on all systems
*
* NOTE: this works around the sgi botch:
* (1) irix 5.* made -ldl optional but warned
* (2) irix 6.* has no -ldl
* (3) dynamic progs built on irix 5.* and using -ldl fail
* at runtime on irix 6.* because -ldl is not there
*/
dl :MAPLIB: dl.c
/*
* requiring these is a botch
*/
iconv :MAPLIB: iconv.c
w :MAPLIB: w.c w2.c
/*
* miscellaneous -l* checks
*/
intl :MAPLIB: intl.c
m :MAPLIB: m.c m2.c m3.c m4.c m5.c m6.c
nsl :MAPLIB: nsl.c
/*
* what was sco smoking
* almost all of gethost* are in -lnsl except gethostbyname which
* is in -lsocket which isn't needed to resolve socket() but seems
* to do the -lnsl job
*/
socket :MAPLIB: socket.c nsl.c
/*
* more substance abuse
* gdbm's ndbm "compatibility" doesn't supply <ndbm.h>, instead supplies
* <gdbm/ndbm.h> which provides K&R prototypes *and* it requires -lgdbm
* some <ndbm.h> implementations use -lndbm, others -ldbm, still others -lc
* this is why unix is starting to look like windows
* this map allows makefiles to use -ldbm on all systems
*
* and this just in: sometimes it's <gdbm-ndbm.h> and possibly -lgdbm_compat
*
* at least the -l* buck stops here
*/
dbm db - gdbm_compat - gdbm - ndbm - dbm :MAPLIB: db.c gdbm.c gdbm1.c gdbm2.c

File diff suppressed because it is too large Load diff

View file

@ -43,8 +43,7 @@ init) echo "cc: arguments expected" >&2
;; ;;
cpp) $CC -E "$@" cpp) $CC -E "$@"
;; ;;
cc) $CC -D_ast_int8_t=int64_t -D_lib_memccpy \ cc) $CC -D_ast_int8_t=int64_t -D_lib_memccpy "$@"
-Wno-unused-value -Wno-parentheses -Wno-macro-redefined "$@"
;; ;;
dll) $CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@" dll) $CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@"
;; ;;

View file

@ -6,7 +6,4 @@ case " $* " in
*" -dumpmachine "*) echo $HOSTTYPE; exit ;; *" -dumpmachine "*) echo $HOSTTYPE; exit ;;
esac esac
exec /usr/bin/cc -P \ exec /usr/bin/cc -P "$@"
-Wno-unused-value \
-Wno-parentheses \
"$@"

View file

@ -6,7 +6,4 @@ case " $* " in
*" -dumpmachine "*) echo $HOSTTYPE; exit ;; *" -dumpmachine "*) echo $HOSTTYPE; exit ;;
esac esac
exec /usr/bin/cc -P \ exec /usr/bin/cc -P "$@"
-Wno-unused-value \
-Wno-parentheses \
"$@"

View file

@ -18,6 +18,8 @@
* * * *
***********************************************************************/ ***********************************************************************/
#pragma prototyped #pragma prototyped
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wunused-value"
/* /*
* mamake -- MAM make * mamake -- MAM make
@ -25,7 +27,8 @@
* coded for portability * coded for portability
*/ */
static char id[] = "\n@(#)$Id: mamake (AT&T Research) 2011-08-31 $\0\n"; #define RELEASE_DATE "2021-01-21"
static char id[] = "\n@(#)$Id: mamake (AT&T Research/ksh93) " RELEASE_DATE " $\0\n";
#if _PACKAGE_ast #if _PACKAGE_ast
@ -33,17 +36,15 @@ static char id[] = "\n@(#)$Id: mamake (AT&T Research) 2011-08-31 $\0\n";
#include <error.h> #include <error.h>
static const char usage[] = static const char usage[] =
"[-?\n@(#)$Id: mamake (AT&T Research) 2011-08-31 $\n]" "[-?\n@(#)$Id: mamake (AT&T Research/ksh93) " RELEASE_DATE " $\n]"
USAGE_LICENSE USAGE_LICENSE
"[+NAME?mamake - make abstract machine make]" "[+NAME?mamake - make abstract machine make]"
"[+DESCRIPTION?\bmamake\b reads \amake abstract machine\a target and" "[+DESCRIPTION?\bmamake\b reads \amake abstract machine\a target and"
" prerequisite file descriptions from a mamfile (see \b-f\b) and executes" " prerequisite file descriptions from a mamfile (see \b-f\b) and executes"
" actions to update targets that are older than their prerequisites." " actions to update targets that are older than their prerequisites."
" Mamfiles are generated by the \b--mam\b option of \bnmake\b(1) and" " Mamfiles are portable to environments that only have"
" \bgmake\b(1) and are portable to environments that only have"
" \bsh\b(1) and \bcc\b(1).]" " \bsh\b(1) and \bcc\b(1).]"
"[+?In practice \bmamake\b is used to bootstrap build \bnmake\b(1) and" "[+?Mamfiles are used rather than"
" \bksh\b(1) in new environments. Mamfiles are used rather than"
" old-\bmake\b makefiles because some features are not reliably supported" " old-\bmake\b makefiles because some features are not reliably supported"
" across all \bmake\b variants:]{" " across all \bmake\b variants:]{"
" [+action execution?Multi-line actions are executed as a" " [+action execution?Multi-line actions are executed as a"
@ -1127,7 +1128,10 @@ input(void)
else if (*state.input && *(e = state.input + strlen(state.input) - 1) == '\n') else if (*state.input && *(e = state.input + strlen(state.input) - 1) == '\n')
*e = 0; *e = 0;
state.sp->line++; state.sp->line++;
return state.input; e = state.input;
while (isspace(*e))
e++; /* allow indentation */
return e;
} }
/* /*
@ -1795,10 +1799,13 @@ scan(Dict_item_t* item, void* handle)
static char* files[] = static char* files[] =
{ {
"Nmakefile", "Mamfile"
"nmakefile", /* ksh 93u+m no longer uses these:
"Makefile", * "Nmakefile",
"makefile" * "nmakefile",
* "Makefile",
* "makefile"
*/
}; };
/* /*

View file

@ -30,6 +30,29 @@ Bad*) echo "Cannot be run by zsh in native mode; use a sh symlink to zsh" >&2
exit 1 ;; exit 1 ;;
esac esac
unset CDPATH
case $0 in
-*)
echo "dodgy \$0: $0" >&2
exit 1 ;;
*/package)
mydir=`echo "$0" | sed 's,/package$,,'`
cd "$mydir" || exit
case $PWD in
*/bin) ;;
*) echo "this script must live in bin/" >&2
exit 1 ;;
esac
cd .. || exit
unset mydir ;;
package)
echo "this script must be invoked with a direct path, e.g. bin/package" >&2
exit 1 ;;
*)
echo "this script must be named 'package'" >&2
exit 1 ;;
esac
# shell checks # shell checks
checksh() checksh()
{ {
@ -63,7 +86,7 @@ usr="/home"
lib="" # nee /usr/local/lib /usr/local/shlib lib="" # nee /usr/local/lib /usr/local/shlib
ccs="/usr/kvm /usr/ccs/bin" ccs="/usr/kvm /usr/ccs/bin"
org="gnu GNU" org="gnu GNU"
makefiles="Mamfile Nmakefile nmakefile Makefile makefile" makefiles="Mamfile" # ksh 93u+m no longer uses these: Nmakefile nmakefile Makefile makefile
env="HOSTTYPE NPROC PACKAGEROOT INSTALLROOT PATH" env="HOSTTYPE NPROC PACKAGEROOT INSTALLROOT PATH"
checksum=md5sum checksum=md5sum
checksum_commands="$checksum md5" checksum_commands="$checksum md5"
@ -1404,6 +1427,20 @@ case $ksh_relflags in
assign="${assign:+$assign }KSH_RELFLAGS=\"\$ksh_relflags\"" ;; assign="${assign:+$assign }KSH_RELFLAGS=\"\$ksh_relflags\"" ;;
esac esac
# Add ksh compile-options via KSH_SHOPTFLAGS.
SHOPT()
{
case $1 in
*=?*) ksh_shoptflags="${ksh_shoptflags:+$ksh_shoptflags }-DSHOPT_$1" ;;
esac
}
ksh_shoptflags=
. src/cmd/ksh93/SHOPT.sh # this script calls SHOPT() to set options
case $ksh_shoptflags in
?*) # add the extra flags as an argument to mamake
assign="${assign:+$assign }KSH_SHOPTFLAGS=\"\$ksh_shoptflags\"" ;;
esac
# grab action specific args # grab action specific args
case $action in case $action in
@ -4036,12 +4073,6 @@ make_recurse() # dir
then return then return
fi fi
done done
if test -d $1
then case $exec in
'') echo :MAKE: > $1/Makefile || exit ;;
*) $exec "echo :MAKE: > $1/Makefile" ;;
esac
fi
} }
get() # host path [ file size ] get() # host path [ file size ]
@ -7217,7 +7248,7 @@ update) # download the latest release.version for selected packages
use) # finalize the environment use) # finalize the environment
x=:.. x=:..
for d in `( cd $PACKAGEROOT; ls src/*/Makefile src/*/Nmakefile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u )` for d in `( cd $PACKAGEROOT; ls src/*/Mamfile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u )`
do x=$x:$INSTALLROOT/$d do x=$x:$INSTALLROOT/$d
done done
x=$x:$INSTALLROOT x=$x:$INSTALLROOT

View file

@ -17,6 +17,9 @@
* Glenn Fowler <gsf@research.att.com> * * Glenn Fowler <gsf@research.att.com> *
* * * *
***********************************************************************/ ***********************************************************************/
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wunused-value"
#pragma clang diagnostic ignored "-Wstring-plus-int"
/* : : generated by proto : : */ /* : : generated by proto : : */

View file

@ -4,6 +4,7 @@
* coded for portability * coded for portability
* _SEAR_* macros for win32 self extracting archives -- see sear(1). * _SEAR_* macros for win32 self extracting archives -- see sear(1).
*/ */
#pragma clang diagnostic ignored "-Wparentheses"
static char id[] = "\n@(#)$Id: ratz (Jean-loup Gailly, Mark Adler, Glenn Fowler) 1.2.3 2010-10-10 $\0\n"; static char id[] = "\n@(#)$Id: ratz (Jean-loup Gailly, Mark Adler, Glenn Fowler) 1.2.3 2010-10-10 $\0\n";

View file

@ -18,6 +18,7 @@
* * * *
***********************************************************************/ ***********************************************************************/
#pragma prototyped #pragma prototyped
#pragma clang diagnostic ignored "-Wparentheses"
/* /*
* release -- list recent release changes * release -- list recent release changes

View file

@ -1 +0,0 @@
:MAKE:

View file

@ -1,7 +1,7 @@
info mam static info mam static
note component level :MAKE: equivalent note component level :MAKE: equivalent
make install make install
make all make all
exec - ${MAMAKE} -r '*' ${MAMAKEARGS} exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
done all virtual done all virtual
done install virtual done install virtual

View file

@ -1,90 +0,0 @@
/*
* standalone versions of -lcmd builtins
*/
:PACKAGE: ast cmd:space
LICENSE = since=1992,author=gsf+dgk
:ALL:
:: cmdlib.h builtin.c
CMD_BUILTIN ==
CMD_DYNAMIC ==
CMD_STANDALONE ==
LINKS = cp: ln mv cksum: md5sum sum
NOBIN = getconf
CAT = $(STDCAT|"cat")
CMP = $(STDCMP|"cmp") 2>/dev/null
CP = $(STDCP|"cp")
LN = $(STDLN|"ln")
RM = $(STDRM|"rm")
BUILTINS :COMMAND: cmdlist.h
$(SED) -e '/^CMDLIST(.*)$/!d' -e 's/CMDLIST(\(.*\))/\1/' $(NOBIN:C,.*,-e '/^&$/d',) $(LINKS:N!=*[:]:C,.*,-e '/^&$/d',) $(*)
.INIT : .builtin
.builtin : .MAKE .VIRTUAL .FORCE
local T I
if T = "$(NOBIN:D=$(BINDIR):B:S:T=F)"
{ $(RM) $(RMFLAGS) $(T) }
end
:ALL: $(BUILTINS)
T = -lcmd
if "$(PACKAGE_OPTIONS:N=optimize-space)" && "$(T:T=F)" == "-lcmd"
T := $(BUILTINS:O=1)
$(T) :: CMD_BUILTIN=1 CMD_DYNAMIC=1 builtin.c -lcmd -ldll
for I $(BUILTINS:O>1)
$(I) :LINK: $(T)
end
for I $(LINKS)
if I != "*:"
$(I) :LINK: $(T)
end
end
else
$(BINDIR) :INSTALLDIR: $(BUILTINS)
$(BUILTINS) : .COMMAND $(&$("%.c":T=SM%)) CMD_BUILTIN=b_$$(<:B) builtin.c $(*$("%.c":T=SM%))
$(CAT) $(*:N=*builtin.c) > $(<).c
$(RM) $(RMFLAGS) $(<)
$(@$("%.c":T=SM%):/.*builtin.c$/$(<).c/)
$(RM) $(RMFLAGS) $(<).c
for I $(LINKS)
if I == "*:"
T := $(I:/.$//)
else
$(I) :LINK: $(T)
end
end
end
":BUILTIN:" : .MAKE .OPERATOR
local T P
for T $(>)
if T == "*=*"
$(P).o : $(T)
elif T == "[-+]l*"
$(P) : $(T)
else
eval
$(T) :: CMD_STANDALONE=b_$(T) $(T).c
end
P := $(T)
end
end
:BUILTIN: dlls LICENSE=since=2002,author=gsf -ldll look mime \
pty LICENSE=since=2001,author=gsf+dgk -lutil \
nl LICENSE=since=2003,author=dgk asa od pr \
strings tr uudecode -luu uuencode -luu what who
dontcare -lutil
:: PROMO.mm RELEASE
:TEST: asa cat chmod chown cksum cmp cp cut date expr fmt head join ln \
look mkdir mkfifo mktemp mv nl od paste rm tail tr uniq uuencode wc

View file

@ -41,56 +41,56 @@ setv YACCFLAGS -d
make ${PACKAGEROOT}/lib/package/ast.lic make ${PACKAGEROOT}/lib/package/ast.lic
done ${PACKAGEROOT}/lib/package/ast.lic done ${PACKAGEROOT}/lib/package/ast.lic
make .INIT make .INIT
make ${PACKAGE_ast_INCLUDE}/cmdlist.h make ${PACKAGE_ast_INCLUDE}/cmdlist.h
make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
done ${PACKAGE_ast_INCLUDE}/cmdlist.h done ${PACKAGE_ast_INCLUDE}/cmdlist.h
exec - sed -e '/^CMDLIST(.*)$/!d' -e 's/CMDLIST(\(.*\))/\1/' -e '/^getconf$/d' -e '/^ln$/d' -e '/^mv$/d' -e '/^md5sum$/d' -e '/^sum$/d' ${PACKAGE_ast_INCLUDE}/cmdlist.h exec - sed -e '/^CMDLIST(.*)$/!d' -e 's/CMDLIST(\(.*\))/\1/' -e '/^getconf$/d' -e '/^ln$/d' -e '/^mv$/d' -e '/^md5sum$/d' -e '/^sum$/d' ${PACKAGE_ast_INCLUDE}/cmdlist.h
bind -lcmd bind -lcmd
done .INIT dontcare virtual done .INIT dontcare virtual
make install make install
make pty make pty
make pty.o make pty.o
make pty.c make pty.c
make FEATURE/pty implicit make FEATURE/pty implicit
meta FEATURE/pty features/%>FEATURE/% features/pty pty meta FEATURE/pty features/%>FEATURE/% features/pty pty
make features/pty make features/pty
done features/pty done features/pty
exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -lm' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libast} ${mam_libcmd} : run features/pty exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -lm' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libast} ${mam_libcmd} : run features/pty
done FEATURE/pty generated done FEATURE/pty generated
make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_time.h done ${PACKAGE_ast_INCLUDE}/ast_time.h
prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
prev ${PACKAGE_ast_INCLUDE}/regex.h implicit prev ${PACKAGE_ast_INCLUDE}/regex.h implicit
make ${PACKAGE_ast_INCLUDE}/proc.h implicit make ${PACKAGE_ast_INCLUDE}/proc.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast.h implicit prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/proc.h done ${PACKAGE_ast_INCLUDE}/proc.h
prev ${PACKAGE_ast_INCLUDE}/error.h implicit prev ${PACKAGE_ast_INCLUDE}/error.h implicit
prev ${PACKAGE_ast_INCLUDE}/cmd.h implicit prev ${PACKAGE_ast_INCLUDE}/cmd.h implicit
done pty.c done pty.c
meta pty.o %.c>%.o pty.c pty meta pty.o %.c>%.o pty.c pty
prev pty.c prev pty.c
setv CMD_STANDALONE -DCMD_STANDALONE="b_pty" setv CMD_STANDALONE -DCMD_STANDALONE="b_pty"
setv LICENSE -DLICENSE="since=2001,author=gsf+dgk" setv LICENSE -DLICENSE="since=2001,author=gsf+dgk"
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""builtin"\" -D_PACKAGE_ast -DCMD_STANDALONE=b_pty -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 2001-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?builtin]"\" -c pty.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""builtin"\" -D_PACKAGE_ast -DCMD_STANDALONE=b_pty -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 2001-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?builtin]"\" -c pty.c
done pty.o generated done pty.o generated
bind -lutil dontcare bind -lutil dontcare
setv CMD_STANDALONE -DCMD_STANDALONE="b_pty" setv CMD_STANDALONE -DCMD_STANDALONE="b_pty"
exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -lm ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o pty pty.o ${mam_libutil} ${mam_libast} ${mam_libcmd} exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -lm ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o pty pty.o ${mam_libutil} ${mam_libast} ${mam_libcmd}
done pty generated done pty generated
make ${INSTALLROOT}/bin make ${INSTALLROOT}/bin
exec - if silent test ! -d ${INSTALLROOT}/bin exec - if silent test ! -d ${INSTALLROOT}/bin
exec - then mkdir -p ${INSTALLROOT}/bin exec - then mkdir -p ${INSTALLROOT}/bin
exec - fi exec - fi
done ${INSTALLROOT}/bin generated done ${INSTALLROOT}/bin generated
make ${INSTALLROOT}/bin/pty make ${INSTALLROOT}/bin/pty
prev pty prev pty
exec - test '' = 'pty' || ${STDCMP} 2>/dev/null -s pty ${INSTALLROOT}/bin/pty || { ${STDMV} ${INSTALLROOT}/bin/pty ${INSTALLROOT}/bin/pty.old 2>/dev/null || true; ${STDCP} pty ${INSTALLROOT}/bin/pty ;} exec - test '' = 'pty' || ${STDCMP} 2>/dev/null -s pty ${INSTALLROOT}/bin/pty || { ${STDMV} ${INSTALLROOT}/bin/pty ${INSTALLROOT}/bin/pty.old 2>/dev/null || true; ${STDCP} pty ${INSTALLROOT}/bin/pty ;}
done ${INSTALLROOT}/bin/pty generated done ${INSTALLROOT}/bin/pty generated
make ${INSTALLROOT}/bin make ${INSTALLROOT}/bin
exec - if silent test ! -d ${INSTALLROOT}/bin exec - if silent test ! -d ${INSTALLROOT}/bin
exec - then mkdir -p ${INSTALLROOT}/bin exec - then mkdir -p ${INSTALLROOT}/bin
exec - fi exec - fi
done ${INSTALLROOT}/bin virtual done ${INSTALLROOT}/bin virtual
done install virtual done install virtual

View file

@ -1,232 +0,0 @@
/*
* ksh makefile
*
* NOTE: since ksh 93u+m does not use/include nmake for various reasons,
* any changes here are ineffective and this is for reference only. Edit
* Mamfile instead (though it might still be good to update this too).
*/
SH := $(PWD:B:/[0-9]*$//:N=ksh*:-ksh) /* name of the shell program */
VERSION = 1.1
LICENSE = since=1982,author=dgk
CATALOG = libshell
ERROR_CONTEXT_T == Error_context_t /* workaround until switch from errorpush()/errorpop() => errorctx() */
RELEASE := $(SH:/.*sh//)
SHCOMP := shcomp$(RELEASE)
/*
* set these variables to 1 to enable, 0 to disable, null to probe
* override SHOPT_foo=1 can be placed one per line in the build dir Makeargs
*/
SHOPT_2DMATCH == 1 /* two dimensional .sh.match for ${var//pat/str} */
SHOPT_ACCT == /* accounting */
SHOPT_ACCTFILE == /* per user accounting info */
SHOPT_AUDIT == 1 /* enable auditing per SHOPT_AUDITFILE */
SHOPT_AUDITFILE == "/etc/ksh_audit" /* auditing file */
SHOPT_BGX == 1 /* one SIGCHLD trap per completed job */
SHOPT_BRACEPAT == 1 /* C-shell {...,...} expansions (, required) */
SHOPT_CMDLIB_HDR == /* -lcmd builtin list (<cmdlist.h>) */
SHOPT_CMDLIB_DIR == /* SHOPT_CMDLIB_HDR directory prefix (default "/opt/ast/bin") */
SHOPT_CRNL == /* accept <cr><nl> for <nl> */
SHOPT_DYNAMIC == 1 /* dynamic loading for builtins */
SHOPT_ECHOPRINT == /* make echo equivalent to print */
SHOPT_EDPREDICT == 1 /* predictive editing */
SHOPT_ESH == 1 /* emacs/gmacs edit mode */
SHOPT_FILESCAN == 1 /* fast file scan */
SHOPT_FIXEDARRAY == 1 /* fixed dimension indexed array */
SHOPT_HISTEXPAND == 1 /* csh-style history file expansions */
SHOPT_KIA == 1 /* shell information database generation */
SHOPT_MULTIBYTE == 1 /* multibyte character handling */
SHOPT_NAMESPACE == 1 /* allow namespaces */
SHOPT_OLDTERMIO == /* support both TCGETA and TCGETS */
SHOPT_OPTIMIZE == 1 /* optimize loop invariants */
SHOPT_PFSH == 0 /* solaris exec_attr(4) profile execution */
SHOPT_P_SUID == /* real uid's that require -p for set[ug]id */
SHOPT_RAWONLY == 1 /* make viraw the only vi mode */
SHOPT_REGRESS == /* enable __regress__ builtin and instrumented intercepts for testing */
SHOPT_REMOTE == /* enable --rc if running as a remote shell */
SHOPT_SEVENBIT == /* strip the eighth bit from characters */
SHOPT_SPAWN == /* use spawnveg for fork/exec */
SHOPT_STATS == 1 /* add .sh.stats variable */
SHOPT_SUID_EXEC == 1 /* allow (safe) suid/sgid shell scripts */
SHOPT_SYSRC == /* attempt . /etc/ksh.kshrc if interactive */
SHOPT_TIMEOUT == /* number of seconds for shell timeout */
SHOPT_TYPEDEF == 1 /* enable typeset type definitions */
SHOPT_VSH == 1 /* vi edit mode */
if CC.HOSTTYPE == "linux.alpha"
/* workaround for "BUG IN DYNAMIC LINKER ld.so" */
:PACKAGE: - m:static:noinclude /*noCC.EXPORT.DYNAMIC*/
end
if CC.HOSTTYPE == "*.s390-64"
CC.DLL = $(CC.DLLBIG)
end
if SHOPT_DYNAMIC && ( "$(CC.DIALECT:N=EXPORT=DLL)" || "$(PACKAGE_OPTIONS:N=optimize-space)" )
if "$(PACKAGE_OPTIONS:N=optimize-space)" && ! SHOPT_CMDLIB_HDR
SHOPT_CMDLIB_HDR == <cmdlist.h>
end
CCFLAGS += $$(CC.DLL) $$(CC.SUFFIX.DEBUG:+$$(CC.DEBUG))
LIBS_req = -lshell$(RELEASE)
else
if VARIANT
SHOPT_DYNAMIC = 1
else
libtype = :static
end
if SHOPT_DYNAMIC
CCLDFLAGS += $$(CC.EXPORT.DYNAMIC)
end
LIBS_req = +lshell$(RELEASE)
end
:PACKAGE: ast$(libtype):20100309 --clobber=!($(SH))
.SOURCE : edit sh bltins data tests fun
.SOURCE.h : include
/* documentation files */
DOCFILES = sh.memo builtins.mm README RELEASE TYPES PROMO.mm COMPATIBILITY \
DESIGN OBSOLETE RELEASE93 RELEASE88
KSHELL == 1 /* this is ksh */
SH_CMDLIB_DIR == /* SHOPT_CMDLIB_DIR dir prefix */
SH_DICT == /* message catalog */
DEBUG == /* debugging purposes only */
if CC.HOSTTYPE == "win32*"
SHOPT_CRNL == 1 /* <cr><nl> is equivalent to <nl> */
end
/* use the following libraries only if they exist */
LIBS_opt := +ljobs +li
if CC.HOSTTYPE == "sol([89]|[1-9][0-9]).*"
LDFLAGS += $(CC.LD.LAZY) $(CC.LD.NORECORD)
end
if "$(-mam:N=static*)"
LIBS_opt += -lsocket -lnsl
elif CC.HOSTTYPE == "sol?([789]|[1-9][0-9]).*"
LIBS_opt += +lsocket -lnsl
elif CC.HOSTTYPE != "sgi.mips*"
LIBS_opt += +lsocket +lnsl
end
if CC.HOSTTYPE == "linux.sparc*"
/* the linux.sparc linker still has some problems */
LIBS_opt += -ldll
end
LIBS_opt += -lsecdb
if CC.HOSTTYPE == "sol.*"
LIBS_opt += -lw
end
$(LIBS_opt) : .DONTCARE
LDLIBRARIES = $(LIBS_opt)
FILES_opt = /* optional file list enabled by vars above */
if SHOPT_ESH
FILES_opt += emacs.c
end
if SHOPT_VSH
FILES_opt += vi.c
end
if SHOPT_HISTEXPAND
FILES_opt += hexpand.c
end
if SHOPT_DYNAMIC
FILES_opt += -ldll
end
if SHOPT_X
LDFLAGS += -u _XtAppInitialize -L/usr/add-on/X11/lib
end
:ALL: $(SH) $(SHCOMP) $(SHOPT_SUID_EXEC:+suid_exec)
$(SH) :: sh.1 pmain.c $(LIBS_req)
DATAFILES = limits.c msg.c strdata.c testops.c keywords.c options.c \
signals.c aliases.c builtins.c variables.c lexstates.c
shell$(RELEASE) $(VERSION) id=shell :LIBRARY: shell.3 nval.3 alarm.c cd_pwd.c cflow.c deparse.c \
enum.c getopts.c hist.c misc.c print.c read.c sleep.c trap.c test.c \
typeset.c ulimit.c umask.c whence.c main.c nvdisc.c nvtype.c \
arith.c args.c array.c completion.c defs.c edit.c expand.c regress.c \
fault.c fcin.c history.c init.c io.c jobs.c lex.c macro.c name.c \
nvtree.c parse.c path.c string.c streval.c subshell.c tdump.c timers.c \
trestore.c waitevent.c xec.c $(DATAFILES) $(FILES_opt) \
-lcmd -last -lm
"sol*.i386*" :NOOPTIMIZE: main.c
"win32*" :NOOPTIMIZE: strdata.c trestore.c
if CC.HOSTTYPE == "win32*"
:DLL: $(CC.DEBUG)
else
:DLL: $(CC.OPTIMIZE)
end
:READONLY: $(DATAFILES)
$(INCLUDEDIR) :INSTALLPROTO: nval.h shell.h history.h
LIBCMD = $(.LIB.NAME. cmd:T=F)
if SHOPT_SUID_EXEC && ! "$(RELEASE)"
suid_exec :: CC.DLL= suid_exec.c +last
end
$(SHCOMP) :: CC.DLL= SH_DICT='"libshell"' shcomp.c $(LIBS_req)
$(FUNDIR) :INSTALLDIR: mode=+x dirs popd pushd
shcomp.o : _BLD_DLL= $(CC.HOSTTYPE:N=cygwin.*:??_BLD_shell=?)
:: math.tab syscall.s mamexec mamstate.c $(DOCFILES) \
hexpand.c mkservice.c \
shopen.mk shopen.c
:: shtests \
alias.sh append.sh arith.sh arrays.sh arrays2.sh \
attributes.sh basic.sh bracket.sh builtins.sh case.sh \
comvar.sh comvario.sh coprocess.sh cubetype.sh enum.sh exit.sh \
expand.sh functions.sh glob.sh grep.sh heredoc.sh io.sh \
leaks.sh locale.sh math.sh nameref.sh namespace.sh options.sh \
path.sh pointtype.sh pty.sh quoting.sh quoting2.sh readcsv.sh \
recttype.sh restricted.sh return.sh select.sh shtests \
sigchld.sh signal.sh statics.sh subshell.sh substring.sh \
tilde.sh timetype.sh treemove.sh types.sh variables.sh \
vartree1.sh vartree2.sh
:: ksh-regress.rt ksh-regress.tst
if "$(PWD:B:N=cc-*)"
test : .NULL
else
test : test.ksh
test.ksh : $(BINDIR)/$(SH) $(SH) shtests
$(SILENT) $(CMP) $(CMPFLAGS) $(*:O=1) $(*:O=2) 2>/dev/null ||
echo "make install to run the tests on the latest $(SH)" >&2
cd $(*:O=3:P=L!:D)
SHELL=$(*:O=1:P=A) $(*:O=1:P=A) $(*:O=3:B) $(SHTESTSFLAGS)
test.% : %.sh $(BINDIR)/$(SH) $(SH) shtests
$(SILENT) $(CMP) $(CMPFLAGS) $(*:O=2) $(*:O=3) 2>/dev/null ||
echo "make install to run the tests on the latest $(SH)" >&2
cd $(*:O=4:P=L!:D)
SHELL=$(*:O=2:P=A) $(*:O=2:P=A) $(*:O=4:B) $(SHTESTSFLAGS) $(*:O=1:P=A)
if RELEASE
.INSTALL : .CLEAR $(*.INSTALL:N=*$(RELEASE)*([!/]))
end
end

File diff suppressed because it is too large Load diff

40
src/cmd/ksh93/SHOPT.sh Normal file
View file

@ -0,0 +1,40 @@
#
# Compile-time SHOPT_* options for ksh93.
# 1 to enable, 0 to disable, empty value to probe.
#
SHOPT 2DMATCH=1 # two dimensional ${.sh.match} for ${var//pat/str}
SHOPT ACCT= # accounting
SHOPT ACCTFILE= # per-user accounting info
SHOPT AUDIT=1 # enable auditing per SHOPT_AUDITFILE
SHOPT AUDITFILE='\"/etc/ksh_audit\"' # auditing file
SHOPT BGX=1 # one SIGCHLD trap per completed job
SHOPT BRACEPAT=1 # C-shell {...,...} expansions (, required)
SHOPT CMDLIB_HDR= # '<cmdlist.h>' # custom -lcmd list for path-bound builtins
SHOPT CMDLIB_DIR= # '\"/opt/ast/bin\"' # virtual directory prefix for path-bound builtins
SHOPT CRNL= # accept MS Windows newlines (<cr><nl>) for <nl>
SHOPT DYNAMIC=1 # dynamic loading for builtins
SHOPT ECHOPRINT= # make echo equivalent to print
SHOPT EDPREDICT=1 # predictive editing
SHOPT ESH=1 # emacs/gmacs edit mode
SHOPT FILESCAN=1 # fast file scan
SHOPT FIXEDARRAY=1 # fixed dimension indexed array
SHOPT HISTEXPAND=1 # csh-style history file expansions
SHOPT KIA=1 # shell information database generation
SHOPT MULTIBYTE=1 # multibyte character handling
SHOPT NAMESPACE=1 # allow namespaces
SHOPT OLDTERMIO= # support both TCGETA and TCGETS
SHOPT OPTIMIZE=1 # optimize loop invariants
SHOPT PFSH=0 # solaris exec_attr(4) profile execution (obsolete)
SHOPT P_SUID= # real uid's that require -p for set[ug]id
SHOPT RAWONLY=1 # make viraw the only vi mode
SHOPT REGRESS= # enable __regress__ builtin and instrumented intercepts for testing
SHOPT REMOTE= # enable --rc if running as a remote shell
SHOPT SEVENBIT= # strip the eighth bit from characters
SHOPT SPAWN= # use spawnveg for fork/exec
SHOPT STATS=1 # add .sh.stats variable
SHOPT SUID_EXEC=1 # allow (safe) suid/sgid shell scripts
SHOPT SYSRC= # attempt . /etc/ksh.kshrc if interactive
SHOPT TIMEOUT= # number of seconds for shell timeout
SHOPT TYPEDEF=1 # enable typeset type definitions
SHOPT VSH=1 # vi edit mode

View file

@ -1 +0,0 @@
:MAKE:

View file

@ -1,7 +1,7 @@
info mam static info mam static
note component level :MAKE: equivalent note component level :MAKE: equivalent
make install make install
make all make all
exec - ${MAMAKE} -r '*' ${MAMAKEARGS} exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
done all virtual done all virtual
done install virtual done install virtual

View file

@ -1,434 +0,0 @@
/*
* ast library
*/
:PACKAGE: ast
LICENSE = since=1985,author=gsf+dgk+kpv
ID = ast
HOSTTYPE == "$(CC.HOSTTYPE)"
CCFLAGS = $(CC.SUFFIX.DEBUG:+$(CC.DEBUG)) $(CC.OPTIMIZE) $(CC.DLL)
IFFEFLAGS = -v -X ast -X std
.SOURCE : aso cdt comp dir disc hash man misc obsolete path port preroot \
regex sfio stdio string tm uwin vec vmalloc
.SOURCE.h : include comp std cdt vmalloc
CP = $(STDCP|"cp")
PARANOID ==
CONF_LIBPREFIX == "$(CC.PREFIX.DYNAMIC|CC.PREFIX.SHARED)"
CONF_LIBSUFFIX == "$(CC.SUFFIX.DYNAMIC|CC.SUFFIX.SHARED)"
DEBUG ==
__OBSOLETE__ == $("6 months ago":@F=%(%Y0101)T)
HEADERSRC = ast.h ast_dir.h ast_getopt.h ast_std.h \
ast_namval.h ast_windows.h \
ccode.h cdt.h cdtlib.h cmdarg.h debug.h dt.h error.h find.h ftw.h \
ftwalk.h fts.h getopt.h glob.h hash.h hashkey.h hashpart.h \
ip6.h lc.h ls.h magic.h mc.h mime.h mnt.h modecanon.h modex.h \
namval.h option.h proc.h re_comp.h recfmt.h regex.h regexp.h \
sfio.h sfio_s.h sfio_t.h sfdisc.h shcmd.h \
stack.h stak.h stk.h swap.h tar.h times.h tm.h tok.h \
usage.h vdb.h vecargs.h vmalloc.h wait.h wordexp.h \
bytesex.h endian.h fnmatch.h magicid.h fnv.h aso.h \
$(HEADERSTD)
HEADERGEN = align.h preroot.h sig.h tmx.h tv.h \
$(ID)_api.h $(ID)_botch.h $(ID)_ccode.h $(ID)_fcntl.h $(ID)_float.h \
$(ID)_fs.h $(ID)_lib.h $(ID)_map.h $(ID)_mmap.h $(ID)_mode.h $(ID)_ndbm.h \
$(ID)_param.h $(ID)_sys.h $(ID)_time.h $(ID)_time.h $(ID)_tty.h \
$(ID)_vfork.h $(ID)_wait.h $(ID)_limits.h $(ID)_standards.h $(ID)_sizeof.h \
$(HEADERSTD:/^/$(ID)_/)
HEADEREXP = $(ID)_common.h
HEADEROPT = fmtmsg.h libgen.h syslog.h
HEADERSTD = dirent.h iconv.h nl_types.h stdio.h wchar.h wctype.h
$(ID) 5.4 :LIBRARY: README RELEASE \
LIBAST.3 aso.3 ast.3 astsa.3 cdt.3 chr.3 compat.3 error.3 \
find.3 fmt.3 fmtls.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \
int.3 ip6.3 magic.3 mem.3 mime.3 modecanon.3 optget.3 path.3 \
preroot.3 proc.3 re.3 regex.3 setenviron.3 sfdisc.3 sfio.3 \
sig.3 spawnveg.3 stak.3 stk.3 strcopy.3 strdup.3 strelapsed.3 \
strerror.3 stresc.3 streval.3 strgid.3 strmatch.3 stropt.3 \
strperm.3 strsignal.3 strsort.3 strtape.3 strton.3 struid.3 \
swap.3 tab.3 tm.3 tmx.3 tok.3 touch.3 tv.3 vecargs.3 vmalloc.3 \
$(HEADERSRC) \
state.c transition.c \
dirlib.h opendir.c readdir.c rewinddir.c seekdir.c telldir.c \
getcwd.c fastfind.c \
hashlib.h hashalloc.c hashdump.c hashfree.c hashlast.c \
hashlook.c hashscan.c hashsize.c hashview.c hashwalk.c \
memhash.c memsum.c strhash.c strkey.c strsum.c \
stracmp.c strnacmp.c \
ccmap.c ccmapid.c ccnative.c \
chresc.c chrtoi.c streval.c strexpr.c strmatch.c strcopy.c \
modelib.h modei.c modex.c strmode.c \
strlcat.c strlcpy.c strlook.c strncopy.c strsearch.c strpsearch.c \
stresc.c stropt.c strtape.c strpcmp.c strnpcmp.c strvcmp.c strnvcmp.c \
tok.c tokline.c tokscan.c \
pathaccess.c pathcat.c pathcanon.c pathcheck.c pathpath.c \
pathexists.c pathfind.c pathkey.c pathprobe.c pathrepl.c \
pathnative.c pathposix.c pathtemp.c pathtmp.c pathstat.c \
pathgetlink.c pathsetlink.c pathbin.c pathshell.c pathcd.c \
pathprog.c \
ftwalk.c ftwflags.c fts.c \
astintercept.c conformance.c getenv.c setenviron.c \
optget.c optjoin.c optesc.c optctx.c strsort.c struniq.c \
magic.c mime.c mimetype.c signal.c sigflag.c systrace.c \
error.c errorf.c errormsg.c errorx.c \
localeconv.c setlocale.c translate.c \
catopen.c iconv.c lc.c lctab.c mc.c \
base64.c recfmt.c recstr.c reclen.c fmtrec.c \
fmtbase.c fmtbuf.c fmtclock.c fmtdev.c fmtelapsed.c fmterror.c \
fmtesc.c fmtfmt.c fmtfs.c fmtident.c fmtint.c fmtip4.c fmtip6.c fmtls.c \
fmtmatch.c fmtmode.c fmtnum.c fmtperm.c fmtre.c fmttime.c fmtuid.c \
fmtgid.c fmtsignal.c fmtscale.c fmttmx.c fmttv.c fmtversion.c \
strelapsed.c strperm.c struid.c strgid.c \
strtoip4.c strtoip6.c stack.c stk.c \
swapget.c swapmem.c swapop.c swapput.c \
sigdata.c sigcrit.c sigunblock.c \
proclib.h procopen.c procclose.c procrun.c procfree.c \
tmdate.c tmequiv.c tmfix.c tmfmt.c tmform.c tmgoff.c tminit.c \
tmleap.c tmlex.c tmlocale.c tmmake.c tmpoff.c tmscan.c \
tmsleep.c tmtime.c tmtype.c tmweek.c tmword.c tmzone.c \
tmxdate.c tmxduration.c tmxfmt.c tmxgettime.c tmxleap.c tmxmake.c \
tmxscan.c tmxsettime.c tmxsleep.c tmxtime.c tmxtouch.c \
tvcmp.c tvgettime.c tvsettime.c tvsleep.c tvtouch.c \
cmdarg.c vecargs.c vecfile.c vecfree.c vecload.c vecstring.c \
univlib.h univdata.c touch.c mnt.c debug.c \
memccpy.c memchr.c memcmp.c memcpy.c memdup.c memmove.c memset.c \
mkdir.c mkfifo.c mknod.c rmdir.c remove.c rename.c link.c unlink.c \
strdup.c strchr.c strrchr.c strstr.c \
strtod.c strtold.c \
strtol.c strtoll.c strtoul.c strtoull.c strton.c strtonll.c \
strntod.c strntold.c strnton.c strntonll.c \
strntol.c strntoll.c strntoul.c strntoull.c \
strcasecmp.c strncasecmp.c strerror.c \
mktemp.c tmpnam.c fsync.c \
execlp.c execve.c execvp.c execvpe.c spawnveg.c \
vfork.c killpg.c \
hsearch.c tsearch.c \
getlogin.c putenv.c setenv.c unsetenv.c \
lstat.c statvfs.c \
eaccess.c gross.c gross_sgi.h omitted.c \
fakelink.h readlink.c symlink.c \
getpgrp.c setpgid.c setsid.c waitpid.c \
creat64.c fcntl.c open.c \
atexit.c getdents.c getwd.c dup2.c errno.c \
getpreroot.c ispreroot.c realopen.c setpreroot.c \
getgroups.c mount.c system.c iblocks.c \
modedata.c tmdata.c \
memfatal.c sfkeyprintf.c \
sfdcdio.c sfdcdos.c sfdcfilter.c sfdcseekable.c \
sfdcslow.c sfdcsubstr.c sfdctee.c sfdcunion.c \
sfdcmore.c sfdcprefix.c \
wc.c wc2utf8.c \
/* standards */ \
basename.c closelog.c dirname.c fmtmsglib.c fnmatch.c ftw.c \
getdate.c getsubopt.c glob.c nftw.c openlog.c re_comp.c \
resolvepath.c realpath.c regcmp.c regexp.c setlogmask.c strftime.c \
strptime.c swab.c syslog.c sysloglib.h tempnam.c \
wordexp.c mktime.c \
/* regex */ \
reglib.h regalloc.c regclass.c regcoll.c regcomp.c regcache.c \
regdecomp.c regerror.c regexec.c regfatal.c reginit.c regnexec.c \
regsubcomp.c regsubexec.c regsub.c regrecord.c regrexec.c regstat.c \
/* cdt */ \
dthdr.h dtclose.c dtdisc.c dthash.c dtlist.c dtmethod.c \
dtopen.c dtstrhash.c dttree.c dtview.c dtwalk.c \
dtnew.c dtcomp.c \
/* sfio */ \
sfhdr.h sfdchdr.h \
sfclose.c sfclrlock.c sfdisc.c sfdlen.c sfexcept.c \
sfgetl.c sfgetu.c sfcvt.c sfecvt.c sffcvt.c \
sfextern.c sffilbuf.c sfflsbuf.c sfprints.c sfgetd.c \
sfgetr.c sfllen.c sfmode.c sfmove.c sfnew.c \
sfpkrd.c sfnotify.c sfnputc.c sfopen.c sfpeek.c sfpoll.c \
sfpool.c sfpopen.c sfprintf.c sfputd.c sfputl.c sfputr.c \
sfputu.c sfrd.c sfread.c sfreserve.c sfscanf.c sfseek.c sfset.c \
sfsetbuf.c sfsetfd.c sfsize.c sfsk.c sfstack.c sfstrtod.c sfsync.c \
sfswap.c sftable.c sftell.c sftmp.c sfungetc.c sfvprintf.c \
sfvscanf.c sfwr.c sfwrite.c sfpurge.c sfraise.c sfwalk.c \
sfgetm.c sfmutex.c sfputm.c sfresize.c \
_sfclrerr.c _sfeof.c _sferror.c _sffileno.c \
_sfopen.c _sfstacked.c _sfvalue.c \
_sfgetc.c _sfgetl.c _sfgetl2.c _sfgetu.c _sfgetu2.c \
_sfdlen.c _sfllen.c _sfslen.c _sfulen.c \
_sfputc.c _sfputd.c _sfputl.c _sfputm.c _sfputu.c \
/* stdio */ \
clearerr.c fclose.c fdopen.c feof.c ferror.c fflush.c \
fgetc.c fgetpos.c fgets.c fileno.c fopen.c fprintf.c \
fpurge.c fputc.c fputs.c fread.c freopen.c fscanf.c \
fseek.c fseeko.c fsetpos.c ftell.c ftello.c fwrite.c \
flockfile.c ftrylockfile.c funlockfile.c \
getc.c getchar.c getw.c pclose.c popen.c printf.c \
putc.c putchar.c puts.c putw.c rewind.c scanf.c \
setbuf.c setbuffer.c setlinebuf.c setvbuf.c \
snprintf.c sprintf.c sscanf.c \
asprintf.c vasprintf.c \
stdio/tmpfile.c ungetc.c vfprintf.c vfscanf.c vprintf.c \
vscanf.c vsnprintf.c vsprintf.c vsscanf.c \
_doprnt.c _doscan.c _filbuf.c _flsbuf.c _stdfun.c \
_stdopen.c _stdprintf.c _stdscanf.c _stdsprnt.c \
_stdvbuf.c _stdvsnprnt.c _stdvsprnt.c _stdvsscn.c \
/* wchar stdio */ \
fgetwc.c fwprintf.c putwchar.c vfwscanf.c wprintf.c \
fgetws.c fwscanf.c swprintf.c vswprintf.c wscanf.c \
fputwc.c getwc.c swscanf.c vswscanf.c \
fputws.c getwchar.c ungetwc.c vwprintf.c \
fwide.c putwc.c vfwprintf.c vwscanf.c \
/* stdio extensions */ \
stdio_c99.c fcloseall.c fmemopen.c getdelim.c getline.c \
/* math */ \
frexp.c frexpl.c \
/* ast */ \
astcopy.c astconf.c astdynamic.c astlicense.c astquery.c astwinsize.c \
conftab.c \
$(CC.LD.STATIC) aststatic.c getopt.c getoptl.c $(CC.LD.DYNAMIC) \
/* aso */ \
aso.c asolock.c asometh.c asorelax.c aso-sem.c aso-fcntl.c \
/* vmalloc */ \
vmalloc.h vmhdr.h vmbest.c vmclear.c vmclose.c vmdcheap.c vmdebug.c \
vmdisc.c vmexit.c vmlast.c vmopen.c vmpool.c vmprivate.c vmprofile.c \
vmregion.c vmsegment.c vmset.c vmstat.c vmstrdup.c vmtrace.c vmwalk.c \
vmmopen.c malloc.c vmgetmem.c \
/* uwin */ \
mathimpl.h rlib.h \
a64l.c acosh.c asinh.c atanh.c cbrt.c crypt.c erf.c \
err.c exp.c exp__E.c expm1.c gamma.c getpass.c lgamma.c log.c log1p.c \
log__L.c rand48.c random.c rcmd.c rint.c support.c \
/* obsolete */ \
sfstrtmp.c spawn.c \
-liconv -lw /* these should be pulled in by -lc */
/*
* man is stdio.h problematic
* the std/stdio.h => ast_stdio.h runaround should
* get to a steady state
*
* also, -D_BLD_ast must be explicit for the uwin bootstrap
*/
.MAKEINIT : .AST.INIT
.AST.INIT : .MAKE
CCFLAGS += -D_BLD_ast
parameter (_BLD_ast)
virtual ast/stdio.h
:NOPROTECT: sfprintf.c sfvprintf.c sfscanf.c sfvscanf.c
:NOOPTIMIZE: spawnveg.c
"ibm.risc" :NOOPTIMIZE: regcomp.c
"linux.i386-64*":NOOPTIMIZE: sfset.c
"sol?.*" :NOOPTIMIZE: sfrd.c sfvprintf.c tmxfmt.c
"win32*" :NOOPTIMIZE: fastfind.c mc.c
"win32*-64*" :NOOPTIMIZE: sfvprintf.c
/*
* NOTE: sun4 runtime link botches ro data so advertised sig_info is rw
*/
:READONLY: conftab.c lctab.c modedata.c /*sftable.c*/ \
/*sigdata.c*/ tmdata.c univdata.c
:: atmain.C \
stdgets.c stdprintf.c stdscanf.c stdvbuf.c stdsprnt.c \
stdvsprnt.c stdvsnprnt.c stdvsscn.c stdopen.c \
astsa
if "$(PWD:B)" != "cc-*"
$(INCLUDEDIR) :INSTALLPROTO: $(HEADEREXP) $(HEADERSRC) $(HEADERGEN)
:INSTALLDIR: conf
conf :: conf.sh
conflim.h conftab.h conftab.c :JOINT: conf conf.tab
$(*:O=1:P=A) $(IFFEFLAGS:V:N=-v) $(*:O>1) $(CC) $(CCFLAGS:VP:N!=-D_BLD_*|$\(*\)) /* 2007-07-01: $(CCFLAGS:VPX:N!=-D_BLD_*) */
$(HEADERGEN) :COPY: FEATURE/$$(<:B:/$(ID)_//)
ast_namval.h :COPY: namval.h
lcgen : lcgen.c
$(CC.NATIVE|CC) $(CCLDFLAGS) $(CCFLAGS) $(LDFLAGS) -o $(<) $(*)
lc.h lctab.c :JOINT: lcgen lc.tab
$(*:O=1:C,^[^/],./&,) $(tmp).1 $(tmp).2 < $(*:O=2) # :P=E: in 2006
$(PROTO) -p $(PROTOFLAGS) $(tmp).1 $(PROTOINSTALL) > $(tmp).3
$(RM) -f $(tmp).1
if $(CMP) -s $(tmp).3 $(<:O=1)
then $(RM) $(tmp).3
else $(MV) $(tmp).3 $(<:O=1)
fi
if $(CMP) -s $(tmp).2 $(<:O=2)
then $(RM) $(tmp).2
else $(MV) $(tmp).2 $(<:O=2)
fi
$(LIBDIR)/file/magic :INSTALL: magic.tab
:INSTALL: $(HEADEROPT:D=$(INCLUDEDIR):B:S)
$(HEADEROPT:D=$(INCLUDEDIR):B:S) : $$(<:B:S) ast_lib.h
case $(CC.HOSTTYPE) in
win32.*)$(PROTO) -p $(PROTOFLAGS) $(*:O=1) $(PROTOINSTALL) > 1.$(tmp).x
if $(CMP) -s $(<) 1.$(tmp).x
then $(RM) -f 1.$(tmp).x
else $(MV) 1.$(tmp).x $(<)
fi
;;
*) $(SILENT) $(GREP) -l 'define[ ][ ]*_[hl][di][rb]_$(<:B)' $(*:O>1) > /dev/null || {
$(PROTO) -p $(PROTOFLAGS) $(*:O=1) $(PROTOINSTALL) > 1.$(tmp).x
if $(CMP) -s $(<) 1.$(tmp).x
then $(RM) -f 1.$(tmp).x
else $(MV) 1.$(tmp).x $(<)
fi
}
;;
esac
/*
* FEATURE/common for iffe probes, <ast_common.h> for ast source
* *but* <ast_common.h> may get pulled in by intercepted headers
* so both must be built very early
*/
$(ID)_common.h : .SCAN.IGNORE FEATURE/common
$(SED) '/define _def_map_ast/d' < $(*) > 1.$(tmp).x
if $(CMP) -s $(<) 1.$(tmp).x
then $(RM) -f 1.$(tmp).x
else $(MV) 1.$(tmp).x $(<)
fi
FEATURE/common : .SCAN.IGNORE
/*
* more stdio.h complications ...
* prepare for compilation by generating these headers first;
* this helps mam by catching headers that might be indirectly
* included on other systems
*/
.check.hdr : .IGNORE .VIRTUAL \
FEATURE/standards - FEATURE/lib - FEATURE/common - \
FEATURE/param - FEATURE/aso - \
ast_map.h - ast_limits.h - ast_stdio.h ast_nl_types.h - \
ast_wchar.h ast_wctype.h
: clean up obsolete headers :
$(RM) -rf $(HEADERSTD) ast_hdr.h ast_types.h ast_unistd.h iffeio.h \
$(INCLUDEDIR)/limits.h $(INCLUDEDIR)/unistd.h \
$(PACKAGEROOT)/src/lib/libast/std/limits.h
ast.req : .check.hdr .check.lib
else
ast.req : .check.lib
end
/*
* some systems move -lc routines to -lm
* see astmath.c for details
*/
.check.lib : .AFTER astmath.exe FEATURE/aso
$(SED) -e '/^#define _REQ_/!d' -e 's/#define _REQ_\([a-z0-9_]*\).*/ -l\1/' $(*:N=FEATURE/*) >> $(<<)
if test -f astmath.exe
then touch $(<<)
else echo ' -lm' >> $(<<)
fi
astmath.exe : .DONTCARE astmath.c
X=1
for N in 1 2 3 4 5 6 8
do if $(CC) $(CCLDFLAGS) -DN=$N -DIS $(CCFLAGS) $(LDFLAGS) -o $(*:N=*.c:B:S=.exe) $(*) 2>/dev/null
then : implicit math function N=$N :
elif $(CC) $(CCLDFLAGS) -DN=$N -DIS $(CCFLAGS) $(LDFLAGS) -o $(*:N=*.c:B:S=.exe) $(*) -lm 2>/dev/null
then : math function N=$N requires -lm :
X=0
break
fi
done
case $X in
0) $(RM) -f $(*:N=*.c:B:S=.exe) ;;
*) touch $(*:N=*.c:B:S=.exe) ;;
esac
$(RM) -f $(*:N=*.c:B:S=$(CC.SUFFIX.OBJECT))
/*
* atmain.C is the only C++ and only for a few systems
*/
atmain.o : atmain.C
ignore $(CC) -c $(CCFLAGS) $(*)
if test ! -f $(<)
then $(CP) $(*) $(*:B:S=.cpp)
ignore $(CC) -c $(CCFLAGS) $(*:B:S=.cpp)
if test ! -f $(<)
then $(CP) $(*) $(*:B:S=.c)
$(CC) -c $(CCFLAGS) $(*:B:S=.c)
fi
fi
/* astsa is a standalone subset of ast for embedded applications */
PAXFILTER = ;*.[ch];$(PROTO) $(PROTOFLAGS) -c "" -p
ast_sa.h : .DONTCARE
astsa.tgz : $$("astsa/astsa.manifest":T=F:T=I:/[[:space:]][[:space:]]*/ /G:C,^,astsa/,)
$(PAX) $(PAXFLAGS) -wf $(<) -x $(<:/.*\.//) -s ',.*/,,' -A $(PAXFILTER:@Q) $(*)
/* libmini.a is a bootstrap dll for uwin cc -D_BLD_ast that exports part of ast */
MINI = mini
:: $(MINI).sym
if CC.HOSTTYPE == "win32*"
DLL = $(ID)$(VERSION:/[^0-9]//G)
$(MINI) : $(MINI)$$(CC.SUFFIX.SHARED)
$(MINI)$$(CC.SUFFIX.SHARED) : $(MINI).sym $(ID)
$(RM) -rf $(MINI).tmp
mkdir $(MINI).tmp
{
echo LIBRARY $(DLL:F=%(upper)s)
echo
echo SECTIONS
echo .data READ WRITE
echo
echo EXPORTS
cat $(*:N=*.sym)
} > $(MINI).tmp/$(DLL)$(CC.SUFFIX.LD:O=1)
cd $(MINI).tmp
$(LD) $(CCFLAGS:N=-[gG]*) $(CC.SHARED) -o $(DLL) $(DLL)$(CC.SUFFIX.LD:O=1) $(*$(ID).so/$(DLL)$(CC.SUFFIX.DYNAMIC):C,^[^-],../&,)
cd ..
$(MV) $(MINI).tmp/$(DLL)$(CC.SUFFIX.SHARED) $(<)
$(RM) -rf $(MINI).tmp
end
:MSGKEY: misc/magic.tab
$(SED) \
-e '/^#/d' \
-e '/[^ ]* *[^ ]* *[^ ]* *./!d' \
-e 's,^[^ ]* *[^ ]* *[^ ]* *\(.[^ ]*\).*$,\1,' \
-e 's,[\\"],\\&,g' \
-e 's,.*,"&",' \
$(*)

File diff suppressed because it is too large Load diff

View file

@ -24,6 +24,10 @@ tst ptr_void note{ standard C void* ok }end compile{
}end }end
cat{ cat{
#pragma clang diagnostic ignored "-Wmacro-redefined"
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wunused-value"
/* disable non-standard linux/gnu inlines */ /* disable non-standard linux/gnu inlines */
#ifdef __GNUC__ #ifdef __GNUC__
# undef __OPTIMIZE_SIZE__ # undef __OPTIMIZE_SIZE__

View file

@ -20,6 +20,10 @@
* * * *
***********************************************************************/ ***********************************************************************/
#pragma prototyped #pragma prototyped
#pragma clang diagnostic ignored "-Wmacro-redefined"
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wunused-value"
/* /*
* Advanced Software Technology Library * Advanced Software Technology Library
* AT&T Research * AT&T Research

View file

@ -1,90 +0,0 @@
/*
* command library -- commands small enough to be builtins
*/
:PACKAGE: ast
LICENSE = since=1992,author=gsf+dgk
CCFLAGS = $(CC.SUFFIX.DEBUG:+$(CC.DEBUG)) $(CC.OPTIMIZE) $(CC.DLL)
/* 2009-04-15 ld.so experiment -- may become a default for all plugins */
CC.DLL.ORIGIN = $(CC.LD.ORIGIN:C,/.*,,)
LDFLAGS = $(CC.DLL.ORIGIN)
CP = $(STDCP|"cp")
CHMOD = $(STDCHMOD|"chmod")
HOSTTYPE == "$(CC.HOSTTYPE)"
cmd 1.2 :LIBRARY: RELEASE cmdinit.c \
cmd.h rev.h wc.h \
basename.c cat.c chgrp.c chmod.c chown.c cksum.c cmp.c \
comm.c cp.c cut.c dirname.c date.c expr.c fds.c fmt.c fold.c \
getconf.c head.c id.c join.c ln.c logname.c md5sum.c mkdir.c \
mkfifo.c mktemp.c mv.c paste.c pathchk.c pids.c rev.c rm.c \
rmdir.c stty.c sum.c sync.c tail.c tee.c tty.c uname.c uniq.c \
vmstate.c wc.c revlib.c wclib.c sumlib.o \
fts_fix.c lib.c \
-lfsg -lmd -lutil
sumlib.o : +lsum
$(AR) x $(*:O=1) $(<)
$(INCLUDEDIR) :INSTALLPROTO: cmd.h cmdext.h cmdlist.h
"win32*" :NOOPTIMIZE: id.c
src = $(*$(*$(*cmd)):N=*.c:T=F)
cmdext.h : (src) $$(-mam:+$$(src))
{
cat <<!
$("#")pragma prototyped
$("/")*
$(" ")* -lcmd extern function prototypes
$(" ")*/
$("#")include <shcmd.h>
!
$(SED) \
-e '/^b_[a-z_][a-z_0-9]*(/!d' \
-e 's/^b_//' \
-e 's/(.*//' \
-e 's/.*/extern int b_&(int, char**, Shbltin_t*);/' \
$($(~:O=1)) |
$(SORT) -u
} > 1.$(tmp).h
if $(CMP) $(CMPFLAGS) 1.$(tmp).h $(<)
then $(RM) $(RMFLAGS) 1.$(tmp).h
else $(MV) 1.$(tmp).h $(<)
fi
cmdlist.h : (src) $$(-mam:+$$(src))
{
cat <<!
$("#")pragma prototyped
$("/")*
$(" ")* -lcmd function list -- define your own CMDLIST()
$(" ")*/
!
$(SED) \
-e '/^b_[a-z_][a-z_0-9]*(/!d' \
-e 's/^b_//' \
-e 's/(.*//' \
-e 's/.*/CMDLIST(&)/' \
$($(~):T=F) |
$(SORT) -u
} > 1.$(tmp).h
if $(CMP) $(CMPFLAGS) 1.$(tmp).h $(<)
then $(RM) $(RMFLAGS) 1.$(tmp).h
else $(MV) 1.$(tmp).h $(<)
fi
if CC.HOSTTYPE == "sun4"
pathsetlink == symlink /* ld.so workaround */
end
ignore dlldefs.h /* prevents bootstrap double build */

File diff suppressed because it is too large Load diff

View file

@ -1,17 +0,0 @@
:PACKAGE: ast
LICENSE = since=1997,author=gsf
CCFLAGS = $(CC.OPTIMIZE) $(CC.DLL)
dll 1.0 :LIBRARY: dlfcn.c dllopen.c dllfind.c dllplug.c dll_lib.c \
dllnext.c dlllook.c dllscan.c dllcheck.c dllerror.c \
-ldl -ldld
win32.i386-64 :NOOPTIMIZE: dllscan.c
$(INCLUDEDIR) :INSTALLPROTO: dlldefs.h
dlldefs.h :COPY: FEATURE/dll
:: RELEASE

View file

@ -38,286 +38,286 @@ setv YACCFLAGS -d
make ${PACKAGEROOT}/lib/package/ast.lic make ${PACKAGEROOT}/lib/package/ast.lic
done ${PACKAGEROOT}/lib/package/ast.lic done ${PACKAGEROOT}/lib/package/ast.lic
make install make install
make dll make dll
make libdll.a archive make libdll.a archive
make dll.req make dll.req
exec - set - exec - set -
exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -c 1.${COTEMP}.c && exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -c 1.${COTEMP}.c &&
exec - x=`${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` && exec - x=`${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
exec - { exec - {
exec - case "" in exec - case "" in
exec - *?) echo " " ;; exec - *?) echo " " ;;
exec - esac exec - esac
exec - for i in dll dl dld ast exec - for i in dll dl dld ast
exec - do case $i in exec - do case $i in
exec - "dll"|dll) exec - "dll"|dll)
exec - ;; exec - ;;
exec - *) if test -f ${INSTALLROOT}/lib/lib/$i exec - *) if test -f ${INSTALLROOT}/lib/lib/$i
exec - then y=`cat ${INSTALLROOT}/lib/lib/$i` exec - then y=`cat ${INSTALLROOT}/lib/lib/$i`
exec - case $y in exec - case $y in
exec - *-?*) echo "" $y ;; exec - *-?*) echo "" $y ;;
exec - esac exec - esac
exec - continue exec - continue
exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a
exec - then case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in exec - then case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
exec - *$x*) continue ;; exec - *$x*) continue ;;
exec - esac exec - esac
exec - ;; exec - ;;
exec - esac exec - esac
exec - fi exec - fi
exec - ;; exec - ;;
exec - esac exec - esac
exec - echo " -l$i" exec - echo " -l$i"
exec - done exec - done
exec - } > dll.req exec - } > dll.req
exec - rm -f 1.${COTEMP}.* exec - rm -f 1.${COTEMP}.*
done dll.req generated done dll.req generated
make dlfcn.o make dlfcn.o
make dlfcn.c make dlfcn.c
make dll.h implicit make dll.h implicit
done dll.h dontcare virtual done dll.h dontcare virtual
make xcoff.h implicit make xcoff.h implicit
done xcoff.h dontcare virtual done xcoff.h dontcare virtual
make dl.h implicit make dl.h implicit
done dl.h dontcare virtual done dl.h dontcare virtual
make ${PACKAGE_ast_INCLUDE}/error.h implicit make ${PACKAGE_ast_INCLUDE}/error.h implicit
make ${PACKAGE_ast_INCLUDE}/option.h implicit make ${PACKAGE_ast_INCLUDE}/option.h implicit
make ${PACKAGE_ast_INCLUDE}/ast.h implicit make ${PACKAGE_ast_INCLUDE}/ast.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare
make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare
make ${PACKAGE_ast_INCLUDE}/endian.h implicit make ${PACKAGE_ast_INCLUDE}/endian.h implicit
make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare
done ${PACKAGE_ast_INCLUDE}/endian.h dontcare done ${PACKAGE_ast_INCLUDE}/endian.h dontcare
done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare
make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
make ${PACKAGE_ast_INCLUDE}/regex.h implicit make ${PACKAGE_ast_INCLUDE}/regex.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
make ${PACKAGE_ast_INCLUDE}/wctype.h implicit make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
make ${PACKAGE_ast_INCLUDE}/wchar.h implicit make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare
done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare
done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare
make ${PACKAGE_ast_INCLUDE}/stdio.h implicit make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare
done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare
prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
done ${PACKAGE_ast_INCLUDE}/regex.h dontcare done ${PACKAGE_ast_INCLUDE}/regex.h dontcare
make ${PACKAGE_ast_INCLUDE}/getopt.h implicit make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare
make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare
make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare
done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare
make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare
done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare
make ${PACKAGE_ast_INCLUDE}/sfio.h implicit make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/ast.h dontcare done ${PACKAGE_ast_INCLUDE}/ast.h dontcare
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/option.h dontcare done ${PACKAGE_ast_INCLUDE}/option.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast.h implicit prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/error.h done ${PACKAGE_ast_INCLUDE}/error.h
make dlldefs.h implicit make dlldefs.h implicit
make FEATURE/dll make FEATURE/dll
meta FEATURE/dll features/%>FEATURE/% features/dll dll meta FEATURE/dll features/%>FEATURE/% features/dll dll
make features/dll make features/dll
done features/dll done features/dll
bind -ldl dontcare bind -ldl dontcare
bind -last bind -last
exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -lm' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdl} ${mam_libast} : run features/dll exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -lm' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdl} ${mam_libast} : run features/dll
done FEATURE/dll generated done FEATURE/dll generated
exec - cmp 2>/dev/null -s FEATURE/dll dlldefs.h || { rm -f dlldefs.h; silent test -d . || mkdir .; cp FEATURE/dll dlldefs.h; } exec - cmp 2>/dev/null -s FEATURE/dll dlldefs.h || { rm -f dlldefs.h; silent test -d . || mkdir .; cp FEATURE/dll dlldefs.h; }
done dlldefs.h generated done dlldefs.h generated
prev ${PACKAGE_ast_INCLUDE}/ast.h implicit prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
done dlfcn.c done dlfcn.c
meta dlfcn.o %.c>%.o dlfcn.c dlfcn meta dlfcn.o %.c>%.o dlfcn.c dlfcn
prev dlfcn.c prev dlfcn.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dlfcn.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dlfcn.c
done dlfcn.o generated done dlfcn.o generated
make dllopen.o make dllopen.o
make dllopen.c make dllopen.c
make dlllib.h implicit make dlllib.h implicit
prev ${PACKAGE_ast_INCLUDE}/error.h implicit prev ${PACKAGE_ast_INCLUDE}/error.h implicit
prev dlldefs.h implicit prev dlldefs.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast.h implicit prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
done dlllib.h done dlllib.h
done dllopen.c done dllopen.c
meta dllopen.o %.c>%.o dllopen.c dllopen meta dllopen.o %.c>%.o dllopen.c dllopen
prev dllopen.c prev dllopen.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllopen.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllopen.c
done dllopen.o generated done dllopen.o generated
make dllfind.o make dllfind.o
make dllfind.c make dllfind.c
prev ${PACKAGE_ast_INCLUDE}/error.h implicit prev ${PACKAGE_ast_INCLUDE}/error.h implicit
prev dlldefs.h implicit prev dlldefs.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast.h implicit prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
done dllfind.c done dllfind.c
meta dllfind.o %.c>%.o dllfind.c dllfind meta dllfind.o %.c>%.o dllfind.c dllfind
prev dllfind.c prev dllfind.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllfind.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllfind.c
done dllfind.o generated done dllfind.o generated
make dllplug.o make dllplug.o
make dllplug.c make dllplug.c
prev dlllib.h implicit prev dlllib.h implicit
done dllplug.c done dllplug.c
meta dllplug.o %.c>%.o dllplug.c dllplug meta dllplug.o %.c>%.o dllplug.c dllplug
prev dllplug.c prev dllplug.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllplug.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllplug.c
done dllplug.o generated done dllplug.o generated
make dll_lib.o make dll_lib.o
make dll_lib.c make dll_lib.c
prev dlllib.h implicit prev dlllib.h implicit
done dll_lib.c done dll_lib.c
meta dll_lib.o %.c>%.o dll_lib.c dll_lib meta dll_lib.o %.c>%.o dll_lib.c dll_lib
prev dll_lib.c prev dll_lib.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dll_lib.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dll_lib.c
done dll_lib.o generated done dll_lib.o generated
make dllnext.o make dllnext.o
make dllnext.c make dllnext.c
make rld_interface.h implicit make rld_interface.h implicit
done rld_interface.h dontcare virtual done rld_interface.h dontcare virtual
prev dlldefs.h implicit prev dlldefs.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast.h implicit prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
done dllnext.c done dllnext.c
meta dllnext.o %.c>%.o dllnext.c dllnext meta dllnext.o %.c>%.o dllnext.c dllnext
prev dllnext.c prev dllnext.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dllnext.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dllnext.c
done dllnext.o generated done dllnext.o generated
make dlllook.o make dlllook.o
make dlllook.c make dlllook.c
prev dlldefs.h implicit prev dlldefs.h implicit
prev ${PACKAGE_ast_INCLUDE}/error.h implicit prev ${PACKAGE_ast_INCLUDE}/error.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast.h implicit prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
done dlllook.c done dlllook.c
meta dlllook.o %.c>%.o dlllook.c dlllook meta dlllook.o %.c>%.o dlllook.c dlllook
prev dlllook.c prev dlllook.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dlllook.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dlllook.c
done dlllook.o generated done dlllook.o generated
make dllscan.o make dllscan.o
make dllscan.c make dllscan.c
prev dlldefs.h implicit prev dlldefs.h implicit
prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
make ${PACKAGE_ast_INCLUDE}/fts.h implicit make ${PACKAGE_ast_INCLUDE}/fts.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit make ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_mode.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_mode.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/fts.h done ${PACKAGE_ast_INCLUDE}/fts.h
prev ${PACKAGE_ast_INCLUDE}/error.h implicit prev ${PACKAGE_ast_INCLUDE}/error.h implicit
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
make ${PACKAGE_ast_INCLUDE}/cdt.h implicit make ${PACKAGE_ast_INCLUDE}/cdt.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
done ${PACKAGE_ast_INCLUDE}/cdt.h done ${PACKAGE_ast_INCLUDE}/cdt.h
prev ${PACKAGE_ast_INCLUDE}/ast.h implicit prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
done dllscan.c done dllscan.c
meta dllscan.o %.c>%.o dllscan.c dllscan meta dllscan.o %.c>%.o dllscan.c dllscan
prev dllscan.c prev dllscan.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dllscan.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dllscan.c
done dllscan.o generated done dllscan.o generated
make dllcheck.o make dllcheck.o
make dllcheck.c make dllcheck.c
prev dlllib.h implicit prev dlllib.h implicit
done dllcheck.c done dllcheck.c
meta dllcheck.o %.c>%.o dllcheck.c dllcheck meta dllcheck.o %.c>%.o dllcheck.c dllcheck
prev dllcheck.c prev dllcheck.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllcheck.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllcheck.c
done dllcheck.o generated done dllcheck.o generated
make dllerror.o make dllerror.o
make dllerror.c make dllerror.c
prev dlllib.h implicit prev dlllib.h implicit
done dllerror.c done dllerror.c
meta dllerror.o %.c>%.o dllerror.c dllerror meta dllerror.o %.c>%.o dllerror.c dllerror
prev dllerror.c prev dllerror.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllerror.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllerror.c
done dllerror.o generated done dllerror.o generated
exec - ${AR} rc libdll.a dlfcn.o dllopen.o dllfind.o dllplug.o dll_lib.o dllnext.o dlllook.o dllscan.o dllcheck.o dllerror.o exec - ${AR} rc libdll.a dlfcn.o dllopen.o dllfind.o dllplug.o dll_lib.o dllnext.o dlllook.o dllscan.o dllcheck.o dllerror.o
exec - (ranlib libdll.a) >/dev/null 2>&1 || true exec - (ranlib libdll.a) >/dev/null 2>&1 || true
done libdll.a generated done libdll.a generated
done dll virtual done dll virtual
prev libdll.a archive prev libdll.a archive
make ${INSTALLROOT}/lib make ${INSTALLROOT}/lib
exec - if silent test ! -d ${INSTALLROOT}/lib exec - if silent test ! -d ${INSTALLROOT}/lib
exec - then mkdir -p ${INSTALLROOT}/lib exec - then mkdir -p ${INSTALLROOT}/lib
exec - fi exec - fi
done ${INSTALLROOT}/lib generated done ${INSTALLROOT}/lib generated
make ${INSTALLROOT}/lib/libdll.a archive make ${INSTALLROOT}/lib/libdll.a archive
prev ${INSTALLROOT}/lib prev ${INSTALLROOT}/lib
prev libdll.a archive prev libdll.a archive
exec - test '' = 'libdll.a' || ${STDCMP} 2>/dev/null -s libdll.a ${INSTALLROOT}/lib/libdll.a || { ${STDMV} ${INSTALLROOT}/lib/libdll.a ${INSTALLROOT}/lib/libdll.a.old 2>/dev/null || true; ${STDCP} libdll.a ${INSTALLROOT}/lib/libdll.a ;} exec - test '' = 'libdll.a' || ${STDCMP} 2>/dev/null -s libdll.a ${INSTALLROOT}/lib/libdll.a || { ${STDMV} ${INSTALLROOT}/lib/libdll.a ${INSTALLROOT}/lib/libdll.a.old 2>/dev/null || true; ${STDCP} libdll.a ${INSTALLROOT}/lib/libdll.a ;}
exec - (ranlib ${INSTALLROOT}/lib/libdll.a) >/dev/null 2>&1 || true exec - (ranlib ${INSTALLROOT}/lib/libdll.a) >/dev/null 2>&1 || true
done ${INSTALLROOT}/lib/libdll.a generated done ${INSTALLROOT}/lib/libdll.a generated
make ${INSTALLROOT}/lib/lib make ${INSTALLROOT}/lib/lib
exec - if silent test ! -d ${INSTALLROOT}/lib/lib exec - if silent test ! -d ${INSTALLROOT}/lib/lib
exec - then mkdir -p ${INSTALLROOT}/lib/lib exec - then mkdir -p ${INSTALLROOT}/lib/lib
exec - fi exec - fi
done ${INSTALLROOT}/lib/lib generated done ${INSTALLROOT}/lib/lib generated
make ${INSTALLROOT}/lib/lib/dll make ${INSTALLROOT}/lib/lib/dll
prev ${INSTALLROOT}/lib/lib prev ${INSTALLROOT}/lib/lib
prev dll.req prev dll.req
exec - test '' = 'dll.req' || ${STDCMP} 2>/dev/null -s dll.req ${INSTALLROOT}/lib/lib/dll || { ${STDMV} ${INSTALLROOT}/lib/lib/dll ${INSTALLROOT}/lib/lib/dll.old 2>/dev/null || true; ${STDCP} dll.req ${INSTALLROOT}/lib/lib/dll ;} exec - test '' = 'dll.req' || ${STDCMP} 2>/dev/null -s dll.req ${INSTALLROOT}/lib/lib/dll || { ${STDMV} ${INSTALLROOT}/lib/lib/dll ${INSTALLROOT}/lib/lib/dll.old 2>/dev/null || true; ${STDCP} dll.req ${INSTALLROOT}/lib/lib/dll ;}
done ${INSTALLROOT}/lib/lib/dll generated done ${INSTALLROOT}/lib/lib/dll generated
make ${PACKAGE_ast_INCLUDE} make ${PACKAGE_ast_INCLUDE}
exec - if silent test ! -d ${PACKAGE_ast_INCLUDE} exec - if silent test ! -d ${PACKAGE_ast_INCLUDE}
exec - then mkdir -p ${PACKAGE_ast_INCLUDE} exec - then mkdir -p ${PACKAGE_ast_INCLUDE}
exec - fi exec - fi
done ${PACKAGE_ast_INCLUDE} generated done ${PACKAGE_ast_INCLUDE} generated
make ${PACKAGE_ast_INCLUDE}/dlldefs.h make ${PACKAGE_ast_INCLUDE}/dlldefs.h
prev ${PACKAGE_ast_INCLUDE} prev ${PACKAGE_ast_INCLUDE}
prev dlldefs.h prev dlldefs.h
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1997,author=gsf' dlldefs.h > 1.${COTEMP}.x exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1997,author=gsf' dlldefs.h > 1.${COTEMP}.x
exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/dlldefs.h 1.${COTEMP}.x exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/dlldefs.h 1.${COTEMP}.x
exec - then rm -f 1.${COTEMP}.x exec - then rm -f 1.${COTEMP}.x
exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/dlldefs.h exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/dlldefs.h
exec - fi exec - fi
done ${PACKAGE_ast_INCLUDE}/dlldefs.h generated done ${PACKAGE_ast_INCLUDE}/dlldefs.h generated
done install virtual done install virtual
make test make test
done test dontcare virtual done test dontcare virtual

View file

@ -1,11 +0,0 @@
:PACKAGE: ast
LICENSE = since=1996,author=gsf
CCFLAGS = $(CC.OPTIMIZE) $(CC.PIC)
sum 1.0 :LIBRARY: sum.h sumlib.c -lmd
$(INCLUDEDIR) :INSTALLPROTO: sum.h
:: RELEASE

View file

@ -38,211 +38,211 @@ setv YACCFLAGS -d
make ${PACKAGEROOT}/lib/package/ast.lic make ${PACKAGEROOT}/lib/package/ast.lic
done ${PACKAGEROOT}/lib/package/ast.lic done ${PACKAGEROOT}/lib/package/ast.lic
make install make install
make sum make sum
make libsum.a archive make libsum.a archive
make sum.req make sum.req
exec - set - exec - set -
exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -c 1.${COTEMP}.c && exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -c 1.${COTEMP}.c &&
exec - x=`${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` && exec - x=`${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
exec - { exec - {
exec - case "" in exec - case "" in
exec - *?) echo " " ;; exec - *?) echo " " ;;
exec - esac exec - esac
exec - for i in sum md ast exec - for i in sum md ast
exec - do case $i in exec - do case $i in
exec - "sum"|sum) exec - "sum"|sum)
exec - ;; exec - ;;
exec - *) if test -f ${INSTALLROOT}/lib/lib/$i exec - *) if test -f ${INSTALLROOT}/lib/lib/$i
exec - then y=`cat ${INSTALLROOT}/lib/lib/$i` exec - then y=`cat ${INSTALLROOT}/lib/lib/$i`
exec - case $y in exec - case $y in
exec - *-?*) echo "" $y ;; exec - *-?*) echo "" $y ;;
exec - esac exec - esac
exec - continue exec - continue
exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a
exec - then case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in exec - then case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
exec - *$x*) continue ;; exec - *$x*) continue ;;
exec - esac exec - esac
exec - ;; exec - ;;
exec - esac exec - esac
exec - fi exec - fi
exec - ;; exec - ;;
exec - esac exec - esac
exec - echo " -l$i" exec - echo " -l$i"
exec - done exec - done
exec - } > sum.req exec - } > sum.req
exec - rm -f 1.${COTEMP}.* exec - rm -f 1.${COTEMP}.*
done sum.req generated done sum.req generated
make sumlib.o make sumlib.o
make sumlib.c make sumlib.c
make sum-sha2.c implicit make sum-sha2.c implicit
make ${PACKAGE_ast_INCLUDE}/endian.h implicit make ${PACKAGE_ast_INCLUDE}/endian.h implicit
make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare
done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare
done ${PACKAGE_ast_INCLUDE}/endian.h dontcare done ${PACKAGE_ast_INCLUDE}/endian.h dontcare
done sum-sha2.c dontcare done sum-sha2.c dontcare
make sum-sha1.c implicit make sum-sha1.c implicit
done sum-sha1.c dontcare done sum-sha1.c dontcare
make sum-md5.c implicit make sum-md5.c implicit
done sum-md5.c dontcare done sum-md5.c dontcare
make sum-lmd.c implicit make sum-lmd.c implicit
make sha2.h implicit make sha2.h implicit
done sha2.h dontcare virtual done sha2.h dontcare virtual
make sha1.h implicit make sha1.h implicit
done sha1.h dontcare virtual done sha1.h dontcare virtual
make md5.h implicit make md5.h implicit
done md5.h dontcare virtual done md5.h dontcare virtual
make md4.h implicit make md4.h implicit
done md4.h dontcare virtual done md4.h dontcare virtual
done sum-lmd.c dontcare done sum-lmd.c dontcare
make sum-prng.c implicit make sum-prng.c implicit
make ${PACKAGE_ast_INCLUDE}/fnv.h implicit make ${PACKAGE_ast_INCLUDE}/fnv.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
done ${PACKAGE_ast_INCLUDE}/fnv.h done ${PACKAGE_ast_INCLUDE}/fnv.h
done sum-prng.c done sum-prng.c
make sum-crc.c implicit make sum-crc.c implicit
done sum-crc.c done sum-crc.c
make sum-bsd.c implicit make sum-bsd.c implicit
done sum-bsd.c done sum-bsd.c
make sum-ast4.c implicit make sum-ast4.c implicit
done sum-ast4.c done sum-ast4.c
make sum-att.c implicit make sum-att.c implicit
done sum-att.c done sum-att.c
make FEATURE/sum implicit make FEATURE/sum implicit
meta FEATURE/sum features/%>FEATURE/% features/sum sum meta FEATURE/sum features/%>FEATURE/% features/sum sum
make features/sum make features/sum
done features/sum done features/sum
bind -last bind -last
exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libast} : run features/sum exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libast} : run features/sum
done FEATURE/sum generated done FEATURE/sum generated
make ${PACKAGE_ast_INCLUDE}/hashpart.h implicit make ${PACKAGE_ast_INCLUDE}/hashpart.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/hashpart.h done ${PACKAGE_ast_INCLUDE}/hashpart.h
make ${PACKAGE_ast_INCLUDE}/swap.h implicit make ${PACKAGE_ast_INCLUDE}/swap.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/swap.h done ${PACKAGE_ast_INCLUDE}/swap.h
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
make sum.h implicit make sum.h implicit
make ${PACKAGE_ast_INCLUDE}/ast.h implicit make ${PACKAGE_ast_INCLUDE}/ast.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare
make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
make ${PACKAGE_ast_INCLUDE}/regex.h implicit make ${PACKAGE_ast_INCLUDE}/regex.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
make ${PACKAGE_ast_INCLUDE}/wctype.h implicit make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
make ${PACKAGE_ast_INCLUDE}/wchar.h implicit make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare
done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare
done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare
make ${PACKAGE_ast_INCLUDE}/stdio.h implicit make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare
done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare
prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/regex.h dontcare done ${PACKAGE_ast_INCLUDE}/regex.h dontcare
make ${PACKAGE_ast_INCLUDE}/getopt.h implicit make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare
make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare
make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare
done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare
make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare
done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare
make ${PACKAGE_ast_INCLUDE}/sfio.h implicit make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/ast.h dontcare done ${PACKAGE_ast_INCLUDE}/ast.h dontcare
done sum.h done sum.h
done sumlib.c done sumlib.c
meta sumlib.o %.c>%.o sumlib.c sumlib meta sumlib.o %.c>%.o sumlib.c sumlib
prev sumlib.c prev sumlib.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c sumlib.c exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c sumlib.c
done sumlib.o generated done sumlib.o generated
exec - ${AR} rc libsum.a sumlib.o exec - ${AR} rc libsum.a sumlib.o
exec - (ranlib libsum.a) >/dev/null 2>&1 || true exec - (ranlib libsum.a) >/dev/null 2>&1 || true
done libsum.a generated done libsum.a generated
done sum virtual done sum virtual
prev libsum.a archive prev libsum.a archive
make ${INSTALLROOT}/lib make ${INSTALLROOT}/lib
exec - if silent test ! -d ${INSTALLROOT}/lib exec - if silent test ! -d ${INSTALLROOT}/lib
exec - then mkdir -p ${INSTALLROOT}/lib exec - then mkdir -p ${INSTALLROOT}/lib
exec - fi exec - fi
done ${INSTALLROOT}/lib generated done ${INSTALLROOT}/lib generated
make ${INSTALLROOT}/lib/libsum.a archive make ${INSTALLROOT}/lib/libsum.a archive
prev ${INSTALLROOT}/lib prev ${INSTALLROOT}/lib
prev libsum.a archive prev libsum.a archive
exec - test '' = 'libsum.a' || ${STDCMP} 2>/dev/null -s libsum.a ${INSTALLROOT}/lib/libsum.a || { ${STDMV} ${INSTALLROOT}/lib/libsum.a ${INSTALLROOT}/lib/libsum.a.old 2>/dev/null || true; ${STDCP} libsum.a ${INSTALLROOT}/lib/libsum.a ;} exec - test '' = 'libsum.a' || ${STDCMP} 2>/dev/null -s libsum.a ${INSTALLROOT}/lib/libsum.a || { ${STDMV} ${INSTALLROOT}/lib/libsum.a ${INSTALLROOT}/lib/libsum.a.old 2>/dev/null || true; ${STDCP} libsum.a ${INSTALLROOT}/lib/libsum.a ;}
exec - (ranlib ${INSTALLROOT}/lib/libsum.a) >/dev/null 2>&1 || true exec - (ranlib ${INSTALLROOT}/lib/libsum.a) >/dev/null 2>&1 || true
done ${INSTALLROOT}/lib/libsum.a generated done ${INSTALLROOT}/lib/libsum.a generated
make ${INSTALLROOT}/lib/lib make ${INSTALLROOT}/lib/lib
exec - if silent test ! -d ${INSTALLROOT}/lib/lib exec - if silent test ! -d ${INSTALLROOT}/lib/lib
exec - then mkdir -p ${INSTALLROOT}/lib/lib exec - then mkdir -p ${INSTALLROOT}/lib/lib
exec - fi exec - fi
done ${INSTALLROOT}/lib/lib generated done ${INSTALLROOT}/lib/lib generated
make ${INSTALLROOT}/lib/lib/sum make ${INSTALLROOT}/lib/lib/sum
prev ${INSTALLROOT}/lib/lib prev ${INSTALLROOT}/lib/lib
prev sum.req prev sum.req
exec - test '' = 'sum.req' || ${STDCMP} 2>/dev/null -s sum.req ${INSTALLROOT}/lib/lib/sum || { ${STDMV} ${INSTALLROOT}/lib/lib/sum ${INSTALLROOT}/lib/lib/sum.old 2>/dev/null || true; ${STDCP} sum.req ${INSTALLROOT}/lib/lib/sum ;} exec - test '' = 'sum.req' || ${STDCMP} 2>/dev/null -s sum.req ${INSTALLROOT}/lib/lib/sum || { ${STDMV} ${INSTALLROOT}/lib/lib/sum ${INSTALLROOT}/lib/lib/sum.old 2>/dev/null || true; ${STDCP} sum.req ${INSTALLROOT}/lib/lib/sum ;}
done ${INSTALLROOT}/lib/lib/sum generated done ${INSTALLROOT}/lib/lib/sum generated
make ${PACKAGE_ast_INCLUDE} make ${PACKAGE_ast_INCLUDE}
exec - if silent test ! -d ${PACKAGE_ast_INCLUDE} exec - if silent test ! -d ${PACKAGE_ast_INCLUDE}
exec - then mkdir -p ${PACKAGE_ast_INCLUDE} exec - then mkdir -p ${PACKAGE_ast_INCLUDE}
exec - fi exec - fi
done ${PACKAGE_ast_INCLUDE} generated done ${PACKAGE_ast_INCLUDE} generated
make ${PACKAGE_ast_INCLUDE}/sum.h make ${PACKAGE_ast_INCLUDE}/sum.h
prev ${PACKAGE_ast_INCLUDE} prev ${PACKAGE_ast_INCLUDE}
prev sum.h prev sum.h
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1996,author=gsf' sum.h > 1.${COTEMP}.x exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1996,author=gsf' sum.h > 1.${COTEMP}.x
exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/sum.h 1.${COTEMP}.x exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/sum.h 1.${COTEMP}.x
exec - then rm -f 1.${COTEMP}.x exec - then rm -f 1.${COTEMP}.x
exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/sum.h exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/sum.h
exec - fi exec - fi
done ${PACKAGE_ast_INCLUDE}/sum.h generated done ${PACKAGE_ast_INCLUDE}/sum.h generated
done install virtual done install virtual
make test make test
done test dontcare virtual done test dontcare virtual