Skip to content

Commit

Permalink
2009-11-30
Browse files Browse the repository at this point in the history
  • Loading branch information
fidian committed Mar 18, 2019
1 parent 9446c93 commit 53d9f00
Show file tree
Hide file tree
Showing 78 changed files with 1,452 additions and 715 deletions.
127 changes: 70 additions & 57 deletions bin/package
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ all_types='*.*|sun4' # all but sun4 match *.*
case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
0123) USAGE=$'
[-?
@(#)$Id: package (AT&T Research) 2009-10-06 $
@(#)$Id: package (AT&T Research) 2009-11-11 $
]'$USAGE_LICENSE$'
[+NAME?package - source and binary package control]
[+DESCRIPTION?The \bpackage\b command controls source and binary
Expand Down Expand Up @@ -2310,6 +2310,33 @@ note() # message ...
echo $command: "$@" >&2
}

# cc checks
#
# CC: compiler base name name
# cc: full path, empty if not found

checkcc()
{
cc=
if onpath $CC
then cc=$_onpath_
else case $CC in
cc) if onpath gcc
then CC=gcc
cc=$_onpath_
fi
;;
esac
fi
case $cc in
'') case $action in
make|test) note "$CC: not found"; exit 1 ;;
*) note "warning: $CC: not found" ;;
esac
;;
esac
}

# some actions have their own PACKAGEROOT or kick out early

case $action in
Expand Down Expand Up @@ -2368,6 +2395,7 @@ case $x in
SUM=$EXECROOT/bin/sum
TEE=$EXECROOT/bin/tee
INITROOT=$PACKAGEROOT/src/cmd/INIT
checkcc
;;
*) hosttype=
case $KEEP_PACKAGEROOT in
Expand Down Expand Up @@ -2560,46 +2588,40 @@ cat $INITROOT/$i.sh
fi
;;
esac

# check if $CC is a cross compiler

if test -f $INITROOT/hello.c
then case $action in
make|test) warn='' ;;
*) warn='warning: ' ;;
esac
if onpath $CC
then (
cd /tmp || exit 3
cp $INITROOT/hello.c pkg$$.c || exit 3
$CC -o pkg$$.exe pkg$$.c > pkg$$.e 2>&1 || {
if $CC -Dnew=old -o pkg$$.exe pkg$$.c > /dev/null 2>&1
then echo "$command: ${warn}$CC: must be a C compiler (not C++)" >&2
else cat pkg$$.e
echo "$command: ${warn}$CC: failed to compile and link $INITROOT/hello.c -- is it a C compiler?" >&2
path=$PATH
PATH=$INSTALLROOT/bin:$PATH
checkcc
case $cc in
?*) if test -f $INITROOT/hello.c
then
# check if $CC is a cross compiler

(
cd /tmp || exit 3
cp $INITROOT/hello.c pkg$$.c || exit 3
$CC -o pkg$$.exe pkg$$.c > pkg$$.e 2>&1 || {
if $CC -Dnew=old -o pkg$$.exe pkg$$.c > /dev/null 2>&1
then echo "$command: ${warn}$CC: must be a C compiler (not C++)" >&2
else cat pkg$$.e
echo "$command: ${warn}$CC: failed to compile and link $INITROOT/hello.c -- is it a C compiler?" >&2
fi
exit 2
}
if ./pkg$$.exe >/dev/null 2>&1
then code=0
else code=1
fi
exit 2
}
if ./pkg$$.exe >/dev/null 2>&1
then code=0
else code=1
fi
rm -f pkg$$.*
exit $code
rm -f pkg$$.*
exit $code
)
code=$?
else echo "$command: ${warn}$CC: not found" >&2
code=2
fi
case $code in
1) CROSS=1
;;
2) case $warn in
'') exit 1 ;;
case $code in
1) CROSS=1 ;;
esac
;;
esac
fi
fi
;;
esac
PATH=$path
EXECTYPE=$HOSTTYPE
EXECROOT=$INSTALLROOT
case $CROSS in
Expand Down Expand Up @@ -2850,7 +2872,7 @@ cat $INITROOT/$i.sh
1) SHELL=/bin/sh
;;
*) # catch (our own) pipe/socket configuration mismatches
date | $SHELL -c 'read x'
$SHELL -c "date | $SHELL -c 'read x'"
case $? in
0) ;;
*) SHELL=/bin/sh ;;
Expand Down Expand Up @@ -3194,8 +3216,10 @@ checkaout() # cmd ...
done
return 0
}
if onpath $CC
then _PACKAGE_cc=1
case $cc in
'') _PACKAGE_cc=0
;;
*) _PACKAGE_cc=1
test -f $INITROOT/hello.c -a -f $INITROOT/p.c || {
echo "$command: $INITROOT: INIT package source not found" >&2
exit 1
Expand Down Expand Up @@ -3244,15 +3268,15 @@ checkaout() # cmd ...
for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
done
else _PACKAGE_cc=0
fi
;;
esac
;;
esac
case $_PACKAGE_cc in
'') if onpath $CC
then _PACKAGE_cc=1
else _PACKAGE_cc=0
fi
'') case $cc in
'') _PACKAGE_cc=0 ;;
*) _PACKAGE_cc=1 ;;
esac
;;
esac
for i
Expand Down Expand Up @@ -5117,10 +5141,6 @@ make|view)
h="$h $t"
;;
esac
if onpath $CC
then cc=$_onpath_
else cc=$CC
fi
case $CC in
cc) c=cc
b=$INSTALLROOT/bin/$c
Expand Down Expand Up @@ -5160,13 +5180,6 @@ make|view)
;;
esac
done
case $cc in
cc) if onpath gcc
then CC=gcc
cc=$_onpath_
fi
;;
esac
case $intercept in
1) c=ld
b=$INSTALLROOT/bin/$c
Expand Down
4 changes: 4 additions & 0 deletions lib/package/INIT.README
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ All recorded changes follow.

:::::::: INIT ::::::::

09-11-30 mktest.sh: change RESET to STATE.RESET to make it global
09-11-14 make.probe: use gcc { -print-multi-directory -print-search-dirs }
09-11-11 package.sh: re-order and combine cc checks
09-10-27 C+probe,make.probe,probe.win32: add CC.SUFFIX.DEBUG
09-10-21 iffe.sh,Makefile: test -e is not in ksh88!
09-10-06 iffe.sh: handle cc -E #error with 0 exit status (sgi)
09-10-06 package.sh: stub in ar intercept checks -- not used yet
Expand Down
12 changes: 8 additions & 4 deletions lib/package/INIT.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="INIT changes">INIT changes</A></H3></FONT></FONT></CENTER>
<PRE>

09-11-30 mktest.sh: change RESET to STATE.RESET to make it global
09-11-14 make.probe: use gcc { -print-multi-directory -print-search-dirs }
09-11-11 package.sh: re-order and combine cc checks
09-10-27 C+probe,make.probe,probe.win32: add CC.SUFFIX.DEBUG
09-10-21 iffe.sh,Makefile: test -e is not in ksh88!
09-10-06 iffe.sh: handle cc -E #error with 0 exit status (sgi)
09-10-06 package.sh: stub in ar intercept checks -- not used yet
Expand Down Expand Up @@ -325,7 +329,7 @@
package.mk: add mamfile=0 to inhibit Mamfile generation
iffe.sh: config name_DECLARED =&gt; HAVE_name_DECL
iffe.sh: fix mac to handle default value
04-04-11 iffe.sh: normalize sed &#0091;\\\\/&#0093; quoting
04-04-11 iffe.sh: normalize sed &#0091;\/&#0093; quoting
04-04-04 package.mk: only checksum generated tarballs
mamprobe.sh: add STDCHMOD
04-04-01 C+probe: set export LANG=C for uniform error messages
Expand Down Expand Up @@ -488,7 +492,7 @@
02-10-18 probe.win32: update for mingw
make.probe: add bash workaround to SHELLMAGIC test
package.sh: work around yet another cygwin hassle
02-10-17 iffe.sh: short circuit id check for *&#0091;-+/\\&#0093;*
02-10-17 iffe.sh: short circuit id check for *&#0091;-+/#0093;*
02-10-08 regress.sh: unset FIGNORE to avoid rm . errors
package.sh: unset FIGNORE to avoid rm . errors
package.sh: $CC must at least compile and executable hello world
Expand Down Expand Up @@ -873,7 +877,7 @@
96-02-29 use: package root must have bin and lib subdir
mm2html: add
C.probe: probe_members += -whole-archive for gcc
iffe: add + fix the blasted `...'...\\...'...`
iffe: add + fix the blasted `...'.....'...`
96-01-31 use: add pkg dir
hostinfo: add tandem
96-01-01 hostinfo: windows_nt|windows&#0091;0-9&#0093;&#0091;0-9&#0093; -&gt; win32
Expand All @@ -899,7 +903,7 @@
<TR>
<TD align=left></TD>
<TD align=center></TD>
<TD align=right>October 21, 2009</TD>
<TD align=right>December 02, 2009</TD>
</TR>
</TABLE>
<P>
Expand Down
2 changes: 1 addition & 1 deletion lib/package/INIT.ver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
INIT 2009-10-21 2009-10-21 1
INIT 2009-11-30 2009-11-30 1
42 changes: 41 additions & 1 deletion lib/package/ast-ksh.README
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,33 @@ All recorded changes follow.

:::::::: ksh93 ::::::::

09-10-16 --- Release ksh93t+ ---
09-11-30 --- Release ksh93t+ ---
09-11-30 A bug in which a trap could be inherited by the first element of
a pipeline when the command had more than 63 arguments that did
not contain any macro expansions has been fixed.
09-11-19 When read from a terminal was called from with a while or foo loop,
and an edit mode was on, a backspace or erase no longer will
overwrite the prompt.
09-11-17 Change .paths parse to handle BUILTIN_LIB=foo BUILTIN_LIB=foo-1.2.
09-11-17 Inside a function, typeset foo.bar will bind foo to global variable
foo if local variable foo does not exist, instead of creating a
local variable.
09-11-17 "read -n1" from the terminal has been fixed to read exactly one character.
09-11-11 Job control now works for subshell commands, (...).
09-11-11 If set -e is on for an interractive shell errors in special builtins
now cause the shell to exit.
09-11-11 A bug in which an interrupt handler processed during the read builtin
when IFS did not contain a new line has been fixed.
09-11-09 A bug in which a variable that has been unset in a subshell and then
exported from that subshell does not show up in the environment
has been fixed.
09-11-02 ``,2'' is now a valid numeric constant for locales with
decimal_point=','.
09-11-02 A bug where "return" in .profile did not restore the shell state
has been fixed.
09-10-31 A bug that corrupted saved exit status when pids wrapped around has
been fixed.
09-10-26 A bug in { LANG LC_ALL LC_category } ordering has been fixed in -last.
09-10-16 A bug where notification to libast that the environment has changed
has been fixed.
09-10-12 A bug in which a function loaded in a subshell could leave side
Expand Down Expand Up @@ -2232,6 +2258,12 @@ All recorded changes follow.

:::::::: libast ::::::::

09-11-21 misc/magic.tab: add gimp XCF
09-11-20 vmalloc/vmtrace.c: add pid to assertion disgnostics
09-11-11 regex.h,regcomp.c: add REG_CLASS_ESCAPE, \ inside [...] literal by default
09-11-03 regex/regcache.c: change to variable length pattern strings
09-10-28 include/error.h: fix ERROR_translate() arg parens
09-10-26 port/lcgen.c,comp/setlocale.c: handle LANG init after LC_* already defined
09-10-05 _sfopen.c: add but ignore 'F' flags for stdio compatibility
09-09-28 fts.h,ftwalk.h,fts.c: promote { namelen pathlen level } to (s)size_t
09-09-28 locales: add AST_LC_LANG for $LANG
Expand Down Expand Up @@ -3813,6 +3845,13 @@ All recorded changes follow.

:::::::: libcmd ::::::::

09-11-30 cat.c,date.c,cksum.c: drop setlocale() call already done by optget()
09-11-30 join.c: handle -t mb
09-11-30 TODO cut.c: handle -d mb
09-11-28 wclib.c: { -w -L } mb independent of -m
09-11-28 paste.c: handle -d mb
09-11-28 uniq.c: handle -s mb
09-11-28 cksum.c: FTS_SEEDOTDIR by default
09-09-09 fds.c: add --unit=fd
09-08-25 tail.c: initialize Tail_t.fifo=0 !!
09-08-15 tail.c: fix fifo logic
Expand Down Expand Up @@ -4116,6 +4155,7 @@ All recorded changes follow.

:::::::: libdll ::::::::

09-11-17 dllscan.c: handle name[-.]version in dlsopen()
09-04-15 dllopen.c: add, use dllopen() internally to wrap dlopen()
08-05-12 dllscan.c: LIBSUFFIX==.dylib => default plugin version match 0.0
06-10-11 dllscan.c: check sfstruse() return values -- doh
Expand Down
Loading

0 comments on commit 53d9f00

Please sign in to comment.