made compiler options TargetOS more general

git-svn-id: trunk@2729 -
This commit is contained in:
mattias 2002-08-18 04:56:59 +00:00
parent a0b3fb6bc0
commit b8ef335fd1

View File

@ -1,9 +1,9 @@
#!/bin/bash
#set -x
set -x
set -e
Usage="Usage: $0 devel|stable"
Usage="Usage: $0 devel|stable [nodocs]"
FPCVersion=$1
@ -18,22 +18,34 @@ if [ "x$FPCVersionOk" = "xno" ]; then
exit -1
fi
shift
WithDOCS=yes
if [ "x$1" = "xnodocs" ]; then
WithDOCS=no
shift
fi
if [ "x$1" != "x" ]; then
echo $Usage
exit -1
fi
# set here the fpc cvs dates for the various versions
if [ "x$FPCVersion" = "xdevel" ]; then
Year=03
Month=06
Day=05
Day=17
LazVersion=1.1
fi
if [ "x$FPCVersion" = "xstable" ]; then
Year=03
Month=06
Day=05
Day=17
LazVersion=1.0.8
fi
Date=20$Year$Month$Day
LazRelease=laz.$Date
SrcTGZ=fpcsrc-$LazVersion-$LazRelease.tgz
@ -64,6 +76,12 @@ cat $SpecFile | \
> $SpecFile.New
# -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \
mv $SpecFile.New $SpecFile
if [ "$WithDOCS" = "no" ]; then
cat $SpecFile | \
sed -e 's/^\(.*\bmake\b.*\bdocs\b\)/#\1/g' \
> $SpecFile.New
mv $SpecFile.New $SpecFile
fi
# change Makefile for new rpmbuild
cd $TmpDir/fpc
@ -77,8 +95,11 @@ cd -
cd $TmpDir/fpc
make rtl
make compiler
make rpm
#make rpm NODOCS=1
if [ "$WithDOCS" = "no" ]; then
make rpm NODOCS=1
else
make rpm
fi
cd -