New Unix configure system

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-08-06 16:18:34 +00:00
parent df9067d85c
commit a1a2adef07
55 changed files with 6002 additions and 185 deletions

View File

@@ -0,0 +1,98 @@
#! /bin/sh
OS=$OSTYPE
if test "x$OS" = x; then
echo "please set the environment variable OSTYPE "
echo "to a value appropriate for your system."
echo "to do so type: setenv OSTYPE `uname` for the csh, tcsh"
echo " export OSTYPE=`uname` for other shells"
exit 1
fi
TMP_CONT=`ls src`
SRC_DIR=src
for each in $TMP_CONT; do
if test -d src/$each ; then
SRC_DIR="$SRC_DIR src/$each"
fi
done
TMP_CONT=`ls samples`
SAMPLES_DIR=
for each in $TMP_CONT; do
if test -d samples/$each ; then
SAMPLES_DIR="$SAMPLES_DIR samples/$each"
fi
done
TMP_CONT=`ls utils`
UTILS_DIR=
for each in $TMP_CONT; do
if test -d utils/$each ; then
UTILS_DIR="$UTILS_DIR utils/$each"
fi
done
TMP_CONT=`ls user`
USER_DIR=
for each in $TMP_CONT; do
if test -d user/$each ; then
USER_DIR="$USER_DIR user/$each"
fi
done
ALL_DIR="$SRC_DIR $SAMPLES_DIR $UTILS_DIR $USER_DIR"
echo Creating for: $OS
# create defaults
if test ! -d install/unix/setup/$OS; then
mkdir install/unix/setup/$OS
fi
SUBSTFILE=install/unix/setup/$OS/substit
# the substit file first
if test -f install/unix/setup/substit ; then
cat install/unix/setup/substit | sed "s/*/@/g" > $SUBSTFILE;
rm -f install/unix/setup/substit
fi
# now the template file
cat install/unix/setup/maketmpl.in | sed -f $SUBSTFILE > install/unix/setup/$OS/maketmpl
# now the config header file
#if test -f setup/wx_setup.h ; then
# cat setup/wx_setup.h > setup/$OS/wx_setup.h;
# rm -f setup/wx_setup.h
#fi
# create lib and bin directory
if test ! -d lib; then
mkdir lib
fi
if test ! -d lib/$OS; then
mkdir lib/$OS
fi
if test ! -d bin; then
mkdir bin
fi
if test ! -d bin/$OS; then
mkdir bin/$OS
fi
# create makefiles
for each in $ALL_DIR; do
DIR=$each/$OS
# create Makefile in directory
if test -r $each/Makefile.in ; then
# create directory
if test ! -d $DIR; then
echo "Creating Directory: $DIR..."
mkdir $DIR
fi
echo "Creating: $DIR/Makefile..."
cat $each/Makefile.in | sed -f $SUBSTFILE > $DIR/Makefile
(cd $DIR; make subdirs > /dev/null;)
fi
done

View File

@@ -0,0 +1,67 @@
#! /bin/sh
#
# Written by Martin Sperl
# (sperl@dsn.ast.univie.ac.at)
#
if test $# -lt 3 ; then
cat <<EOF
Usage: `basename $0` <basedir> <SOURCE-FILES> <DESTINATION-FILS>
copies all files from the source-tar-files to the common
destination-tar-file with basedir as a common base directory.
EOF
exit 0
fi
BaseDir="$1"
shift
Sourcefiles="$1"
while test "$#" != 2 ; do
shift
Sourcefiles="$Sourcefiles $1"
done
shift
Final=$1
Destination=/tmp/join$$.tar
touch $Destination
curdir=`pwd`
mkdir tmp$$
mkdir tmp$$/$BaseDir
#uncompress all files
cd tmp$$/$BaseDir
for each in $Sourcefiles ; do
( \
if test `basename $each gz` != `basename $each` ; then \
gzip -dc ../../$each;\
else \
cat ../../$each;\
fi; \
) | tar xf -
done
cd ..
#now tar everything
tar -cf $Destination *
cd ..
rm -fr tmp$$
# goto old directory
cd $curdir
if test `basename $Final gz` != `basename $Final` ; then
gzip -c $Destination > $Final
else
cat $Destination > $Final
fi
rm -f $Destination

View File

@@ -0,0 +1,73 @@
SHELL=/bin/sh
OS=$(OSTYPE)
all::
-@if test "x$(OS)" = x; then \
echo "please set the environment variable OSTYPE ";\
echo "to a value appropriate for your system.";\
echo "to do so type: setenv OSTYPE `uname` for the csh, tcsh";\
echo " export OSTYPE=`uname` for other shells";\
else \
if test -f Makefile.in ; then \
if test -f $(OS)/Makefile ; then \
NEEDED=`(cd $(OS); ${MAKE} checkneeds;) | grep "needed to compile" `;\
if test "x$$NEEDED" = x; then \
(cd $(OS); ${MAKE} $@); \
else \
(cd $(OS); ${MAKE} checkneeds); \
fi ; \
else \
echo "Did you configure your system?";\
fi; \
fi; \
fi;
distrib::
@if test ! -d ../../distrib ; then mkdir ../../distrib; fi;
@if test ! -f ../../system.list ; then \
echo "dummy" > ../../system.list;\
fi
@(curr=`pwd`; direc=`basename $$curr`;\
basedir=`dirname $$curr`;\
basedirname=`basename $$basedir`;\
if test ! -d ../../distrib/$$basedirname ; then \
mkdir ../../distrib/$$basedirname;\
fi;\
if test -d doc; then (cd doc; make clean;); fi;\
(cd ..; \
echo creating $$direc.tar from the current directory;\
files="`\
find $$direc -type f \
| fgrep -vf ../system.list \
| grep -v "~" \
| grep -v "#" \
` $(DISTRIBUTE_ADDITIONAL)";\
tar -cf /tmp/$$direc.tar $$files;\
echo compressing $$direc.tar to $$direc.tgz;\
gzip -c /tmp/$$direc.tar > ../distrib/$$basedirname/$$direc.tgz;\
rm /tmp/$$direc.tar;\
)\
)
.DEFAULT:
-@if test "x$(OS)" = x; then \
echo "please set the environment variable OSTYPE ";\
echo "to a value appropriate for your system.";\
echo "to do so type: setenv OSTYPE `uname` for the csh, tcsh";\
echo " export OSTYPE=`uname` for other shells";\
else \
if test -f Makefile.in ; then \
if test -f $(OS)/Makefile ; then \
NEEDED=`(cd $(OS); ${MAKE} checkneeds) | grep "needed to compile" `;\
if test "x$$NEEDED" = x; then \
(cd $(OS); ${MAKE} $@); \
else \
(cd $(OS); ${MAKE} checkneeds); \
fi ; \
else \
echo "Did you configure your system?";\
fi \
fi \
fi

View File

@@ -0,0 +1,19 @@
SHELL=/bin/sh
DIRS=`find . -print | sed "s|\./||g" | grep -v "/" | grep -v "\." `
all:
@for i in $(DIRS) xxx; do \
if test -r $$i/Makefile ; then \
echo "entering directory $$i building $@";\
(cd $$i ; ${MAKE} $@); \
fi; \
done
.DEFAULT:
@for i in $(DIRS) xxx; do \
if test -r $$i/Makefile ; then \
echo "entering directory $$i building $@";\
(cd $$i ; ${MAKE} $@); \
fi; \
done

View File

@@ -0,0 +1,102 @@
SHELL=/bin/sh
FILE_BASE=$(TEX_BASE:.tex=)
BMP_FILES=$(XPM_FILES:.xpm=.bmp)
EPS_FILES=$(XPM_FILES:.xpm=.eps)
GIF_FILES=$(XPM_FILES:.xpm=.gif)
HTML_BUTTONS=back.gif forward.gif contents.gif up.gif
all:: doc
clean::
@ for each in $(DIRS) . ; do \
( cd $$each; \
rm -f *.bmp *.eps *.gif *.aux *.dvi *.log \
*.ps *.toc *~ *.idx *.hlp *.html \
*.rtf *.ref *.xlp *.con *.win *.fts \
*.hpj *.HLP; \
); done
doc:: doc_ps doc_html doc_xlp doc_winhelp doc_rtf
#############################################
doc_ps:: $(FILE_BASE).ps
$(FILE_BASE).ps: $(FILE_BASE).dvi
dvips $(FILE_BASE).dvi -o$@
#############################################
doc_dvi:: $(FILE_BASE).dvi
$(FILE_BASE).dvi: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(EPS_FILES)
latex $(FILE_BASE).tex
latex $(FILE_BASE).tex
#############################################
doc_xlp:: $(FILE_BASE).xlp
$(FILE_BASE).xlp: $(FILE_BASE).tex $(TEX_ADDITIONAL)
../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).xlp -twice -xlp
#############################################
doc_html:: $(FILE_BASE)_contents.html $(FILE_BASE).html
$(FILE_BASE).html:
@ln -s $(FILE_BASE)_contents.html $@
$(FILE_BASE)_contents.html: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(GIF_FILES) $(HTML_BUTTONS)
../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE) -twice -html
#############################################
doc_rtf:: $(FILE_BASE).rtf
$(FILE_BASE).rtf: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(BMP_FILES)
../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).rtf -twice -rtf
#############################################
doc_winhelp:: $(FILE_BASE).win
$(FILE_BASE).win: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(BMP_FILES)
../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).win -twice -winhelp
@echo final conversion still needs to be done by MSWin
#############################################
subst::
@if test "x$(OLD)" = x; then \
echo "OLD not defined!"; exit -1; \
fi
@if test "x$(NEW)" = x; then \
echo "NEW not defined!"; exit -1; \
fi
@for each in $(TEX_BASE) $(TEX_ADITIONAL) ; do \
cat $$each | sed "s/$(OLD)/$(NEW)/g" > /tmp/subst; \
rm $$each; cp /tmp/subst $$each; rm /tmp/subst; \
done
#############################################
.SUFFIXES:
.SUFFIXES: .eps .xpm
.SUFFIXES: .bmp .xpm
.SUFFIXES: .gif .xpm
.xpm.eps :
@$(RM) -f $@
xpmtoppm $< | ppmtogif | giftopnm | pnmtops -rle -center -noturn -scale 0.5 - > $@
.xpm.bmp :
@$(RM) -f $@
xpmtoppm $< | ppmtobmp -windows - > $@
.xpm.gif :
@$(RM) -f $@
xpmtoppm $< | ppmtogif -interlace - > $@

View File

@@ -0,0 +1,3 @@
#! /bin/sh
grep $@
exit 0

View File

@@ -0,0 +1,10 @@
#! /bin/sh
for each in $@ ; do
LINE=`grep " $each " ../$OSTYPE/wx_setup.h | grep "#define" | grep 1`
if test "x$LINE" = x ; then
echo "$each needed to compile";
exit 1;
fi
done