snog.
+++ snog
#!/bin/sh
#========
#=============================================================================#
# Snog is Not Overwhelmingly GNUlike (!) #
# ordinary bash script to eliminate useless debugging of #
# xmkmf, imake, cpp, makedepend, make, & other buildtime gnonsense #
# sources bashsyntax control files to acquire project-specific parms #
# executes various preprocessors, compilers, assemblers, linkers & #
# other routines in a controllable, transparent, & maintainable fashion. #
#==============================================================================
snoghead() {
date +%G%b%d%a.%P%H:%M:%S
uname -srm
}
echo ooo
echo Snog ...
snoghead
SNOG=$0
if [ -d /libexec ]
then
DYNLINK=/libexec/ld-elf.so.1
DYNLOAD=${HOME}/lib
else
UCI=/opt/gnudev
if [ ! -d ${UCI} ]
then
iwmenu gnudev --norun
$(zkp)/sh/gnudev
fi
DYNLINK=/lib/ld-linux.so.2
DYNLOAD=/usr/local/lib
SYS_LIBS="-ldl"
LOC_LIBS="-lX11 -lXext -lXt -lXaw -lXmu -lXpm -lXdmcp -lSM -lICE"
fi
MAPDEST=MAPsnog
snoginit() {
case $1 in
help ) runhelp $2 ; exit 0 ;;
info ) runinfo ; exit 0 ;;
esac
LNKD=ELFlinked
SF=./Snogfile
[ ! -f ${SF} ] && echo "No Snogfile found. proceeding anyway." || source ${SF}
DEFS="-Dtrcm "${DEFS}
INCLUDES="-I. -I/tmp/include"
for i in $(ls)
do
[ -d ${i} ] && INCLUDES="${INCLUDES} "-I${i}
done
for i in c cc cxx
do
[ ":${SRCS}:" == "::" ] && SRCS="$(ls *.${i} 2>/dev/null)"
done
if [ ":${OBJS}:" == "::" ]
then
for i in ${SRCS}
do
OBJS="${OBJS} "${i%%.c*}.o
done
fi
[ -z $1 ] && TARG=${SNOGACT:=gcc} || TARG=$1
echo =[${TARG}]=
#/**/# =============== #/**/#
#/**/# welcome to SNOG #/**/#
#/**/# =============== #/**/#
GNUDIR=/KNOPPIX/usr/lib/gcc-lib/i486-linux/3.3.4
SNOGDIRS="
-L${GNUDIR}
-L/usr/lib
-L/usr/X11R6/lib
-L/usr/local/lib
-L/opt/cobol-it/lib
-L${HOME}/lib"
}
# -L/lib
# -L/opt/gnudev/usr/lib
# -L/ramdisk/tmp/libc.a
snogmain() {
snoginit $@
shift
case ${TARG} in
tccr ) runtcc $@ -run ;;
tccc ) runtcc $@ -c; ls -al ${OBJS} ;;
tcc ) runtcc $@ -o ${LNKD}; runq ;;
cpp ) runcpp $@ ;;
gcc ) rungcc $@ -c; ls -al ${OBJS}; ldbell; runq ;;
gccr ) rungcc $@ -c; ls -al ${OBJS}; ldbell; runq; ${LNKD} ;;
gccc ) rungcc $@ -c; ls -al ${OBJS} ;;
stat ) rungcc $@ -c; ls -al ${OBJS}; runlds; runq ;;
tool ) rungcc $@ ${SNOGDIRS} ${PROJDIRS} ${PROJLIBS} -o ${LNKD}; runq ;;
cxx ) runcxx $@ -c; ls -al ${OBJS}; runldx; runq ;;
cxxt ) runcxx $@ ${SNOGDIRS} ${PROJDIRS} ${PROJLIBS} -o ${LNKD}; runq ;;
cobc ) runcob $@; runq ;;
cobx ) runcob $@ -x; runq ;;
link ) ldbell $@; runq ;;
links ) runlds $@; runq ;;
linkx ) runldx $@; runq ;;
shar ) runsrt $@; runout ${SOFL} ;;
shag ) runsrg $@; runq ;;
map ) runq; exec ue -v ${MAPDEST};;
mapc ) runq; cat ${MAPDEST} ;;
clean ) runclean ;;
* ) echo "snog: no target ${TARG}. stop." ;;
esac
}
# SNOG has a very robust & serviceable default behaviour.
# when invoked without parms in a given project directory it:
# * prepares a complete list of C sources & corresponding objects
# * passes all subdirs to the compiler as -I parameters
# * runs the gcc toolchain thru the assembly of all sources
# * runs the linker explicitly with an accurate list of -L dirs
# * is prepared to conditionally link common libs without specification.
# although debugging autoconf & Imakefile scripts is a laudable exercise
# SNOG can in many cases immediately produce smaller, properly linked
# executables from a wide range of projects with a single command.
runcpp() {
for i in $(ls -1 *.h)
do
EX="cpp -C -dID
\
$@ ${i}"
echo ${EX}; ${EX} >${i%.h}.i
done
}
rungcc() {
for i in ${SRCS}
do
EX="gcc -O2 ${DEFS} ${INCLUDES}
\
$@ ${i}"
echo ${EX}; ${EX}
done
}
runtcc() {
for i in ${SRCS}
do
EX="tcc -Wall ${DEFS} ${INCLUDES}
\
${SNOGDIRS}
${PROJDIRS}
${PROJLIBS}
\
$@ ${i}"
echo ${EX}; ${EX}
done
}
runcxx() {
for i in ${SRCS}
do
EX="g++ -Wall -save-temps -O2 ${INCLUDES}
\
$@ ${i}"
echo ${EX}; ${EX}
done
}
runcob() {
source /opt/cobol-it/bin/cobol-it-setup.sh
EX="cobc ${SRCC} -Wall -v -save-temps ${INCLUDES}
-Wl -Map=${MAPDEST}.lnk
-lc -ldl $@"
${EX}
}
runldx() {
CTORB=${GNUDIR}/crtbegin.o
CTORE=${GNUDIR}/crtend.o
ldbell
}
ldbell() {
# SNOGLINK="${GNUDIR}/collect2 --eh-frame-hdr -m elf_i386"
SNOGLINK="ld"
EX="${SNOGLINK}
-dynamic-linker ${DYNLINK}
$@ ${LDFLAGS} -Map=${MAPDEST}.lnk
\
${SNOGDIRS}
${PROJDIRS}
\
/usr/lib/crt1.o
/usr/lib/crti.o
${CTORB}
\
${OBJS}
\
${PROJLIBS}
\
-lc -lgcc
--as-needed
${SYS_LIBS} -lgcc_s -lm -lncurses -lstdc++
${LOC_LIBS}
--no-as-needed
\
${CTORE}
/usr/lib/crtn.o
-o ${LNKD}"
echo '/**/#'
echo ${EX}; ${EX}
}
runlds() {
# SNOGLINK="${GNUDIR}/collect2 --eh-frame-hdr -m elf_i386"
SNOGLINK="ld -s -t --no-whole-archive"
EX="${SNOGLINK}
$@ ${LDFLAGS}
\
${SNOGDIRS}
${PROJDIRS}
\
/usr/lib/crt1.o
/usr/lib/crti.o
\
${OBJS}
\
${PROJLIBS}
\
-Bstatic
-lc
-Bdynamic
-lgcc
\
/usr/lib/crtn.o
-o ${LNKD}"
echo '/**/#'
echo ${EX}; ${EX}
}
runsrt() {
EX="tcc -Wall -c -fPIC ${INCLUDES} $@
${SRCS}"
echo ${EX}
${EX}
EX="ld -shared -soname ${SONM} -o ${SOFL}
${OBJS}
-lc"
echo ${EX}; ${EX}
}
runsrg() {
PRIM=null
if [ ! -f null.c ]
then
if [ -z $1 ]
then
echo please specify one program linked outside of the so
exit 0
fi
PRIM=$1
fi
echo generating position-independent code ...
for i in ${SRCS}
do
EX="gcc -c -O2 -fpic ${DEFS} ${INCLUDES}
\
${i}"
echo ${EX}; ${EX}
done
echo linking shared object ...
rm -rf ${PRIM}.o
EX="gcc -shared -Wl,-s,-soname,${SONM} -o ${SOFL}
$(ls -1 *.o)
-lc"
echo ${EX}; ${EX}
runout ${SOFL}
echo installing shared object ...
rm -rf ${DYNLOAD}/${SOFL}
cp -p ${SOFL} ${DYNLOAD}
[ -f /usr/bin/sudo ] && sudo ldconfig
ln -sf ${DYNLOAD}/${SOFL} ${DYNLOAD}/${SONM}
ln -sf ${DYNLOAD}/${SOFL} ${DYNLOAD}/${SOFL%%.*}.so
echo LD_LIBRARY_PATH is: ${LD_LIBRARY_PATH}
echo compiling ${PRIM}.c ...
SRCS=${PRIM}.c
OBJS=${PRIM}.o
# rungcc -o ${LNKD}
rungcc -c; ls -al ${PRIM}.o; ldbell
}
runq() {
echo ooo >${MAPDEST}
runinfo >>${MAPDEST}
echo >>${MAPDEST}
snoghead >>${MAPDEST}
if [ -f ${MAPDEST}.lnk ]
then
echo >>${MAPDEST}
cat ${MAPDEST}.lnk >>${MAPDEST}
rm -f ${MAPDEST}.lnk
fi
echo >>${MAPDEST}
echo ooo >>${MAPDEST}
readelf -a ${LNKD} >>${MAPDEST}
runout ${LNKD}
echo >>${MAPDEST}
# echo -n ooo >>${MAPDEST}
# objdump -S ${LNKD} >>${MAPDEST}
}
runout() {
ldd $1
file $1
ls -al $1
}
runclean() {
rm -f *.i *.ii *.s *.so *.o *.c.* *~ *.*~ ${LNKD} ${SOFL}
ls -al "${MAPDEST}"*
}
runhelp() {
if [ -z $1 ]
then
tcc -v
echo -n "GNU gcc " ; gcc -dumpversion
strip -V | grep "strip"
readelf -v | grep "readelf"
objdump -v | grep "objdump"
ld -v
ldd --version | grep "ldd"
type cobc &>/dev/null && cobc -V | grep "cobc"
echo :
runinfo
echo 'type "snog help [ pgmname ]" for further help'
else
case $1 in
tcc ) tcc ;;
gcc ) gcc --help ;;
strip ) strip ;;
readelf ) readelf ;;
objdump ) objdump ;;
ld ) ld --help ;;
ldd ) ldd --help ;;
cobc ) cobc --help ;;
snog ) cat ${SNOG} ;;
* ) echo "snog: you are helpless. stop." ;;
esac
fi
}
runinfo() {
echo 'Snog v1.02.024: Snog is Not Overwhelmingly GNUlike'
echo '(c) 2009 Screaming CuckooBroad Associates'
}
snogmain $@
exit 0
+++ My Makefile
# Makefile generated by imake - do not edit!
# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $
# ----------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and
# $XConsortium: Imake.tmpl /main/243 1996/11/13 14:42:56 lehors $
#
all::
.SUFFIXES: .i
# === Imake.cf ===
#//KJOB01 JOB (Q17,700G,,502),'Screaming CuckooBroad Associates',
# CLASS='A',TIME=(10,00),LINES=5150,
# REGION=4096K,TYPRUN=HOLD,MSGCLASS=A,
# USER=kevipow,PASSWORD=*******
#//KSTEP01 EXEC PGM=GMAKE,PARM='XCONSORTIUM'
#//@
#//@.+....1....+....2....+....3....+....4....+....5....+....6....+....7..
#//@ YOU PEOPLE HAVE N0 CLUE HOW TO COMPILE & LINK A PROGRAM.
#//@=====================================================================
#//@
#//GNUDATA SYSIN DD *
CONFIGDIR = /usr/X11R6/lib/X11/config
# -----------------------------------------------------------------------
# site-specific configuration parameters that need to come before
# the platform-specific parameters - edit site.def to change
# $Xtrcm: /usr/X11R6/lib/X11/config/site.def 1.01.2.3 2009.04.14 CircleOmega Exp $
# ----------------------------------------------------------------------
# platform-specific configuration parameters - edit MacroFile to change
# XC0MM - macro - macro - macro - macro - macro - macro - macro - macro -
# #ifndef Posix
# #define Posix 0
# #endif
#-" .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
#-"X .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX o",
#-"XX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oo",
#-"XXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo",
#-"XXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo",
#-"XXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo",
#-"XXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooo",
#-"XXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooo",
#-"XXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooo",
#-"XXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooX",
#-"XXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooX",
#-"XXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXX",
#-"XXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXX",
#-"XXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXX",
#-"XXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXX",
#-"XXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXX",
#-"XXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXX",
#-"XXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXX",
#-"XXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXXXXX",
#-"XXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXXXXXX",
#-"XXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXX",
#-"XXXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXX ooooooXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXX ooooooXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXX ooooooXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXX ooooooXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXX oooooooXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX .......XXX ooooooXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XX ooooooXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......X ooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ...... oooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .... oooooooXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo ooooooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo ooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo ooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo ooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo oooo...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo o.......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooo .......XXXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooo .......XXXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooo .......XXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooX .......XXXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooXX .......XXXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXX .......XXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooooXXXXX ......XXXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooooXXXXXXX .......XXXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXX .......XXXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXX .......XXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXX ......XXXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXXX oooooooooXXXXXXXXXXXXXX .......XXXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXX",
#-"XXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXX",
#-"XXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXX",
#-"XXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXX",
#-"XXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXX",
#-"XXXXXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXX",
#-"XXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .......XXXXX",
#-"XXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXX",
#-"XXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXX",
#-"XXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXX",
#-"XXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .......XX",
#-"XXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XX",
#-"XXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......X",
#-"XXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......",
#-"XXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......",
#-"XXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .....",
#-"XXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ....",
#-"XXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ...",
#-"XXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ...",
#-"XXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ..",
#-"XX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .",
#-"X oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ."};
# *****************************************************************************
# * *
# * DO NOT MODIFY BELOW THIS LINE *
# * *
# *****************************************************************************
# operating system: Linux 2.4.31 i686 [ELF] (2.4.31)
# libc: (6.0.7)
# binutils: (2.15)
# just for the record heres a l1nux.cf from MIT
#define Posix 1
#define HaveTermIO 1
#define HaveDefErrno 1
#define HaveSelectMacros 1
#define HaveAnsiIncludes 1
#define HasVFork 1
#define HasPutenv 1
#define HasVoidSignalReturn 1
#define HasSaberC 0
#define StripInstalledPrograms 1
#define HaveGcc 1
#define HaveLibNcurses 1
#define HaveMotif 0
#CursesIncludes = -I/usr/include/ncurses
#X11Includes = -I/usr/X11/include
#X11LdPath = -L/usr/X11/lib
# XC0MM # ----------------------------------------------------------------------
# \**\# # Imake.rules: 1990.05.04
# XC0MM # ----------------------------------------------------------------------
# XC0MM #define ComplexProgramTarget(program)
# \**\# PROGRAM = program
# \**\# program: $(OBJS) $(DEPLIBS)
# \**\# RemoveTargetProgram($@)
# \**\# $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS)
# XC0MM # ----------------------------------------------------------------------
# \**\# # Imake.rules: 1996.12.05
# XC0MM # ----------------------------------------------------------------------
# XC0MM #define ComplexProgramTarget(program)
# \**\# PROGRAM = program
# \**\# ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter)
# XC0MM #define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib)
# \**\# ProgramTargetName(program): $(objs) $(deplib)
# \**\# RemoveTargetProgram($@)
# \**\# LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib)
# XC0MM #define LinkRule(program,options,objects,libraries)
# \**\# $(CCLINK) -o program options objects libraries $(EXTRA_LOAD_FLAGS)
# XC0MM #define gmake(-p)
# \**\# .c.o: $(COMPILE.c) $(OUTPUT_OPTION) $<
# \**\# COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
# \**\# OUTPUT_OPTION = -o $@
# XC0MM # ----------------------------------------------------------------------
# \**\# # & thatz it! Letz go!
# XC0MM # ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# site-specific configuration parameters that go after
# the platform-specific parameters - edit site.def to change
# $Xtrcm: /usr/X11R6/lib/X11/config/site.def 1.01.2.3 2009.04.14 CircleOmega Exp $
# ---------------------------------------------------------------------
# Imake rules for building libraries, programs, scripts, and data files
# rules: $XConsortium: Imake.rules /main/217 1996/12/05 09:48:26 kaleb $
PATHSEP = /
SHELL = /bin/sh
TOP = .
CURRENT_DIR = .
IMAKE = imake
DEPEND = makedepend
MKDIRHIER = mkdirhier
EXPORTLISTGEN =
CONFIGSRC = $(TOP)/config
IMAKESRC = $(CONFIGSRC)/imake
DEPENDSRC = $(CONFIGSRC)/makedepend
INCROOT = /usr/include
USRLIBDIR = /usr/lib
SHLIBDIR = /usr/lib
LINTLIBDIR = $(USRLIBDIR)/lint
MANPATH = /usr/man
MANSOURCEPATH = $(MANPATH)/man
MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
FILEMANDIR = $(MANSOURCEPATH)$(FILEMANSUFFIX)
AR = ar clq
BOOTSTRAPCFLAGS =
CC = cc
AS = as
COMPRESS = compress
GZIP = gzip
CPP = /lib/cpp $(STD_CPP_DEFINES)
PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
INSTALL = install
INSTALLFLAGS = -c
LD = ld
LEX = lex
LEXLIB = -ll
YACC = yacc
CCYACC = yacc
LINT = lint
LINTLIBFLAG = -C
LINTOPTS = -axz
LN = ln -s
MAKE = make
MV = mv
CP = cp
RANLIB = ranlib
RANLIBINSTFLAGS =
RM = rm -f
MANSUFFIX = n
LIBMANSUFFIX = 3
FILEMANSUFFIX = 5
TROFF = psroff
NROFF = nroff
MSMACROS = -ms
MANMACROS = -man
TBL = tbl
EQN = eqn
NEQN = neqn
COL = col
DVIPS = dvips
LATEX = latex
STD_INCLUDES =
STD_CPP_DEFINES = -Dtrcm $(PROJECT_DEFINES)
STD_DEFINES = -Dtrcm $(PROJECT_DEFINES)
EXTRA_LOAD_FLAGS =
EXTRA_LDOPTIONS =
EXTRA_LIBRARIES =
TAGS = ctags
PROTO_DEFINES =
INSTPGMFLAGS =
INSTBINFLAGS = -m 0755
INSTUIDFLAGS = -m 4711
INSTLIBFLAGS = -m 0644
INSTINCFLAGS = -m 0444
INSTMANFLAGS = -m 0444
INSTDATFLAGS = -m 0444
INSTKMEMFLAGS = -m 4711
CDEBUGFLAGS = -O
CCOPTIONS =
ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
LDPRELIB =
LDPOSTLIB =
LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
CCLINK = $(CC)
CXXLINK = $(CXX)
LDSTRIPFLAGS = -x
LDCOMBINEFLAGS = -X -r
DEPENDFLAGS =
MACROFILE = MacroFile
RM_CMD = $(RM)
IMAKE_DEFINES =
IRULESRC = $(CONFIGDIR)
IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
# XC0MM - rules - rules - rules - rules - rules - rules - rules - rules -
CC = cc
# CCOPTIONS = -v
CFLAGS_SITE = -Wall -save-temps -O2
CALLCOMPILER = $(CC) $(CFLAGS_SITE) $(CFMAKE) $(CFLAGS)
INCLUDES_GNUDEV = -I/opt/gnudev/usr/include
ELFMOD = ELFlinked
LINKDIRS_LINUX24 = -L/lib -L/usr/lib # -L/opt/gnudev/usr/lib
LINKDIRS_XWINDOW = -L/usr/X11R6/lib # -L/opt/gnudev/usr/X11R6/lib
ALL_LINKDIRS = $(LINKDIRS_LINUX24) $(LINKDIRS_XWINDOW)
ALL_LIBRARIES = $(LDLIBS) $(LOCAL_LIBRARIES)
GCCLIB = /KNOPPIX/usr/bin/../lib/gcc-lib
I486334 = i486-linu\x/3.3.4
# XC0MM # ----------------------------------------------------------------------
# \**\# # right about here youd include X11.rules & X11.tmpl
# XC0MM # ----------------------------------------------------------------------
TOP = /usr/X11R6/include
# it is genuinely unclear how they have gotten away with this so long
# this usage compatible with 1990 / 1996 / 2006 revisions of Imake.tmpl
# BTW: 2006 ComplexProgramTarget not backward compatible (manpage &c.)
USRLIBDIR = /usr/X11R6/lib
LDPRELIB = -L$(USRLIBDIR)
# LOCAL_LDFLAGS= -L$(USRLIBDIR)
# CCOPTIONS = -L$(USRLIBDIR)
# LDPRELIBS = -L$(USRLIBDIR)
# "dep" is somehow legacy static; X in this context is "extension"
# it has something to do with what are called Athena Widgets
DEPXONLYLIB = $(USRLIBDIR)/libX11.a
DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB)
DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
XONLYLIB = -lX11
EXTENSIONLIB = -lXext
FSLIB = -lFS
ICELIB = -lICE
SMLIB = -lSM
XAUTHLIB = -lXau
XAWLIB = -lXaw
XILIB = -lXi
XMULIB = -lXmu
XPLIB = -lXp
XPMLIB = -lXpm
XSSLIB = -lXss
XTOOLONLYLIB = -lXt
XTESTLIB = -lXtst
XXF86MISCLIB = -lXxf86misc
OLDXLIB = -loldX
XKBFILELIB = -lxkbfile
XKBUILIB = -lxkbui
XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB)
XLIB = $(EXTENSIONLIB) $(XONLYLIB)
# XC0MM - template - template - template - template - template - template -
TARGECHO = '(*)'
# =================================================( functions )==
kinfo ::
@echo $(TARGECHO) exectarget [$@]:
:
@echo ooo
@date +%G%b%d%a.%P%H:%M:%S
@uname -srm
:
@make -v
@whereis imake
:
# template EOF : still more spurious garbage before the Imakefile:
CONFIGDIR = ConfigDir
USRLIBDIRPATH =
LDPRELIBS = -L$(USRLIBDIR)
LDPOSTLIBS =
TOP_INCLUDES =
PROJECT_DEFINES =
# ----------------------------------------------------------------------
# start of Imakefile
# Screaming CuckooBroad Associates
# Imakefile for project: qdate
PROG = qdate
SRCS = $(PROG).c
OBJS = $(SRCS:.c=.o)
# LDFLAGS = -L/usr/local/lib
# SYS_LIBRARIES = -lm
# LOCAL_LIBRARIES = -lX11
TARGET_ARCH = -v
all:: iprep $(PROG)
iprep:
@rm -rf $(PROG)
$(PROG):
@echo ooo
$(CC) $(SRCS) -c
$(CC) $(OBJS) -s -o $(PROG)
@ldd $(PROG)
@file $(PROG)
@ls -al $(PROG)
$(PROG)
# end of project Imakefile
# ----------------------------------------------------------------------
# common rules for all Makefiles - do not edit
.c.i:
$(RM) $@
$(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@
emptyrule::
clean::
$(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
Makefile::
-@if [ -f Makefile ]; then set -x; \
$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
else exit 0; fi
$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
tags::
$(TAGS) -w *.[ch]
$(TAGS) -xw *.[ch] > TAGS
man_keywords::
# ----------------------------------------------------------------------
# empty rules for directories that do not have SUBDIRS - do not edit
install::
@echo "install in $(CURRENT_DIR) done"
install.man::
@echo "install.man in $(CURRENT_DIR) done"
install.linkkit::
@echo "install.linkkit in $(CURRENT_DIR) done"
Makefiles::
includes::
depend::
# ----------------------------------------------------------------------
# dependencies generated by makedepend
+++ gnudev
#!/bin/sh
#========
echo ...
echo GNU C development environment setup for DSL
# this script initialises a UCI version of the GNU development tools
# v2.15, derived from a modified Debian distro found on the DSL site.
# the idea is to slim down the 20M tarball & isolate it into a UCI
# which is less prone to cause memory crashes & can even be dismounted.
# rather than copying huge amounts of data into the runtime system
# an admittedly intricate assortment of hooks (below) merely needs
# to be established. nothing more epitomises the Linux reluctance to
# separate logical from physical entities than the operation of the
# xmkmf & the "gtk-config" script. libraries whose directories can be
# added to concatenation chains on other systems are hardcoded into
# executables via "rpath". even when logical references are established
# by symlinks the ill effects of the malfunctioning toolchain often
# arent evident until runtime.
# the work you see is totally GPLed & you have a responsibility
# to propagate your rights & those of others. you know where the
# originals can be acquired & where to find the v2 license. enjoy (!).
UCI=/opt/gnudev
[ -d ${UCI} ] || exit 1
# function to populate /usr/lib & /usr/X11R6/lib from UCI (see below)
# generates *all* *.so (linktime) symlinks then syncs libs & sonames with
# the distro. libs are symlinked; symlinks (lib*-1.2.so.* family &c.) are
# copied (result is only 4 / 3 broken links in lib / X11R6/lib respectively).
# binutils runtimes & newer c++ lib specifically ignored. note: the DSL UCI
# mount mydsl-load runs /etc/init.d/mountci which runs ldconfig; this also
# creates missing soname (runtime) symlinks for libs in dirs in ld.so.conf
buildlib() {
cd /usr/$1
for LIB in $(ls -1r lib*.so*)
do
SYM=${LIB%%.so*}.so
[ -e ${SYM} ] || sudo ln -sf ${LIB} ${SYM}
done
cd ${UCI}/usr/$1
for LIB in $(ls -1)
do
case "${LIB}" in
"libbfd-2.15.so" | \
"libopcodes-2.15.so" | \
"libstdc++.so.5.0.7" ) :
;;
* )
TRG=/usr/$1/${LIB}
if [ ! -e ${TRG} ]
then
if [ -L ${UCI}${TRG} ]
then
sudo cp -pP ${UCI}${TRG} ${TRG}
else
sudo ln -sf ${UCI}${TRG} ${TRG}
fi
fi
;;
esac
done
return 0
}
# fix the cpp symlink in /lib (only resource not below /usr)
sudo ln -sf ${UCI}/usr/bin/cpp-3.3 /lib/cpp
USRDIR=include # ---------------------------------------------------
cd ${UCI}/usr/${USRDIR}
# /usr/include is a hallowed place, nearly but not quite empty at boottime.
# maintaining its separtion from /opt/gnudev/usr/include can be done two ways.
# the oldschool way is symlinking all the headers then the subdirs as needed.
# this is the most innately flexible & most closely mirrors the physical merge.
# xmkmf (imake > gcc / cpp / cc1 > as > collect2 / ld) needs sys / gnu / bits;
# asm / linux are the venerable kernel source dirs; c++ is its own trip.
# gtk-config is hardwired to point here physically & makefiles often use it
# for HDR in $(ls -1 *.h)
# do
# sudo ln -sf ${UCI}/usr/${USRDIR}/${HDR} /usr/${USRDIR}/${HDR}
# done
# for SUB in sys gnu bits c++ asm linux gtk-1.2 glib-1.2
# do
# sudo ln -sfn ${UCI}/usr/${USRDIR}/${SUB} /usr/${USRDIR}/${SUB}
# done
# the 2nd (tidier) way is symlinking gnudev from the empty /usr/local/include.
# this is another hallowed place & often saves the -I parm. this also somewhat
# shortens the litany of specific /usr/include symlinks necessary for resources
# which wont be found if theyre here
sudo rm -rf /usr/local/${USRDIR}
sudo ln -sfn ${UCI}/usr/${USRDIR} /usr/local/${USRDIR}
for SUB in c++ gtk-1.2 glib-1.2
do
sudo ln -sfn ${UCI}/usr/${USRDIR}/${SUB} /usr/${USRDIR}/${SUB}
done
USRDIR=bin # -------------------------------------------------------
cd ${UCI}/usr/${USRDIR}
# only 3 DSL-delivered symlinks in /usr/local/bin: firefox; sqlite; ted
for BIN in $(ls -1)
do
sudo ln -sf ${UCI}/usr/${USRDIR}/${BIN} /usr/local/${USRDIR}/${BIN}
done
# gcc & ld stop working unless physically in /usr/bin
# -P = dont dereference (so gcc itself comes over as a symlink)
for BIN in gcc gcc-3.3 ld
do
sudo rm -rf /usr/local/${USRDIR}/${BIN}
sudo cp -pP ${BIN} /usr/${USRDIR}
done
USRDIR=lib # -------------------------------------------------------
cd ${UCI}/usr/${USRDIR}
# Compiler "library" structure also cannot be a symlink
# (-P appears unnecessary here; havent checked why)
sudo rm -rf /usr/${USRDIR}/gcc-lib
sudo cp -prP gcc-lib /usr/${USRDIR}
# rest of the /usr/lib subdirs
# glib is part of the GIMP complex; gconv & pkgconfig are pretty minor
# ldscripts are underused (--verbose shows theyre often internal to ld)
for SUB in gconv glib ldscripts pkgconfig
do
sudo ln -sfn ${UCI}/usr/${USRDIR}/${SUB} /usr/${USRDIR}/${SUB}
done
# /opt/gnudev/usr/lib files are linktime static libs & symlinks with only
# 4 exceptions: libstdc++.so.5.0.7, the bfd & opcode runtimes for binutils,
# & the pthread ld script (similar to /usr/lib/libc.so). if necessary for
# builds gcc1-with-libs.dsl can be installed, otherwise the archives &
# libtool scripts can stay on the UCI, linked by referencing it in makefiles
# (the 2 runtimes are cached from /etc/ld.so.conf & c++ is a separate issue).
# the symlinks point directly to /lib or implicitly to /usr/lib & a number
# of the latter are broken anyway.
# cd /usr/lib
# these are the weird exceptions mostly with versions *before* the .so.
# sudo ln -sf libdb3.so.3.0.2 libdb.so
# sudo ln -sf libgdk-1.2.so.0.9.1 libgdk.so
# sudo ln -sf libungif.so.4 libgif.so
# sudo ln -sf libglib-1.2.so.0.0.10 libglib.so
# sudo ln -sf libgmodule-1.2.so.0.0.10 libgmodule.so
# sudo ln -sf libgthread-1.2.so.0.0.10 libgthread.so
# sudo ln -sf libgtk-1.2.so.0.9.1 libgtk.so
# this is the broken stuff
# libXrender.so
# libglib-2.0.so.0.600.4 ?
# libhistory.so
# libt1x.so
# libtiffxx.so
buildlib ${USRDIR}
# BTW check out http://lists.debian.org/debian-devel/2004/05/msg01115.html
# DSL is shipped with the spurious /usr/lib/libncurses.so.5 symlink pointing
# [sic] *backwards* to libtermcap.so.2; shall I read the source? when
# ldconfig runs with libncurses.so present on the readonly UCI it throws up
# trying to write to /opt/gnudev/usr/lib. waaaa. call the waaaaambulance:
# ldconfig: Can't link /opt/gnudev/usr/lib/libncurses.so.5 to libtermcap.so
USRDIR=share #--------------------------------------------------------
cd ${UCI}/usr/${USRDIR}/zoneinfo
# this is just the timezone stuff
if [ ! -f /usr/${USRDIR}/zoneinfo/UTC ]
then
for DAT in $(ls -1)
do
TRG=/usr/${USRDIR}/zoneinfo/${DAT}
[ -e ${TRG} ] && sudo mv ${TRG} ${TRG}.dsl
[ -d ${DAT} ] && SYMPARM=-sfn || SYMPARM=-sf
sudo ln ${SYMPARM} ${UCI}/usr/${USRDIR}/zoneinfo/${DAT} ${TRG}
done
fi
# ac in aclocal is for autoconf: glib / gtk / pkg
sudo ln -sfn ${UCI}/usr/${USRDIR}/aclocal /usr/${USRDIR}/aclocal
USRDIR=sbin #---------------------------------------------------------
cd ${UCI}/usr/${USRDIR}
sudo ln -sf ${UCI}/usr/sbin/tzconfig /usr/local/bin/tzconfig
USRDIR=X11R6 # -------------------------------------------------------
cd ${UCI}/usr/${USRDIR}
# /usr/X11R6/include is actually empty on DSL distro
sudo rm -rf /usr/${USRDIR}/include
sudo ln -sfn ${UCI}/usr/${USRDIR}/include /usr/${USRDIR}/include
# no /usr/local/X11R6 at all; X11 is completely under /usr
# still far cleaner than /usr/lib; we bring along libXrender.la
buildlib ${USRDIR}/lib
USRDIR=X11R6/lib/X11/config #-----------------------------------------
UCI=/opt/trcmutil
# IVER=Imake1990
IVER=Imake1996
# IVER=Imake2006
cd ${UCI}/usr/${USRDIR}/${IVER}
# establish the X11 runtime config for /usr/X11R6/bin/xmkmf
X11CFG=/opt/X11/config
if [ ! -d ${X11CFG} ]
then
mkdir -p ${X11CFG}
for IMK in $(ls -1)
do
ln -sf ${UCI}/usr/${USRDIR}/${IVER}/${IMK} ${X11CFG}/${IMK}
done
cp -p $(zkp)/.config/x11/* ${X11CFG}
fi
sudo ln -sfn ${X11CFG} /usr/${USRDIR}
# dump the glibc2 / libc6 screen : Welcome to GNU/Linux (!)
[ -f /lib/libc.so.6 ] && /lib/libc.so.6
exit 0
GPL
© 2009 TRCM TranceRave Capital Management
part of the CircleOmega organisation