mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 02:30:41 +01:00
* remove sources
This commit is contained in:
parent
c73d4a0b96
commit
44fcbd99be
@ -15,12 +15,13 @@ VERSION=%version%
|
||||
# in the second parameter.
|
||||
ask ()
|
||||
{
|
||||
askvar=$2
|
||||
eval old=\$$askvar
|
||||
eval echo -n \""$1 [$old] : "\"
|
||||
read $askvar
|
||||
eval test -z \"\$$askvar\" && eval $askvar=\'$old\'
|
||||
askvar=$2
|
||||
eval old=\$$askvar
|
||||
eval echo -n \""$1 [$old] : "\"
|
||||
read $askvar
|
||||
eval test -z \"\$$askvar\" && eval $askvar=\'$old\'
|
||||
}
|
||||
|
||||
# yesno gives 1 on no, 0 on yes $1 gives text to display.
|
||||
yesno ()
|
||||
{
|
||||
@ -45,6 +46,7 @@ unztarfromtar ()
|
||||
{
|
||||
tar -xOf $HERE/$1 $2 | tar --directory $3 -xzf -
|
||||
}
|
||||
|
||||
# Get file list from tar archive ($1) in variable ($2)
|
||||
# optionally filter result through sed ($3)
|
||||
listtarfiles ()
|
||||
@ -57,6 +59,7 @@ listtarfiles ()
|
||||
fi
|
||||
eval $askvar='$list'
|
||||
}
|
||||
|
||||
# Make all the necessary directories to get $1
|
||||
makedirhierarch ()
|
||||
{
|
||||
@ -203,39 +206,6 @@ done
|
||||
echo Done.
|
||||
echo
|
||||
|
||||
# Install the sources. Optional.
|
||||
if yesno "Install sources"; then
|
||||
echo Installing sources in $SRCDIR ...
|
||||
unztarfromtar sources.tar base.source.tar.gz $PREFIX
|
||||
if yesno "Install compiler source"; then
|
||||
unztarfromtar sources.tar compiler.source.tar.gz $PREFIX
|
||||
fi
|
||||
if yesno "Install RTL source"; then
|
||||
unztarfromtar sources.tar rtl.source.tar.gz $PREFIX
|
||||
fi
|
||||
if yesno "Install FCL source"; then
|
||||
unztarfromtar sources.tar fcl.source.tar.gz $PREFIX
|
||||
fi
|
||||
if yesno "Install IDE source"; then
|
||||
unztarfromtar sources.tar ide.source.tar.gz $PREFIX
|
||||
fi
|
||||
if yesno "Install installer source"; then
|
||||
unztarfromtar sources.tar installer.source.tar.gz $PREFIX
|
||||
fi
|
||||
if yesno "Install Packages source"; then
|
||||
listtarfiles sources.tar packages units
|
||||
for f in $packages
|
||||
do
|
||||
p=`echo "$f" | sed -e 's+^.*units-\([^\.]*\)\..*+\1+'`
|
||||
echo "Installing sources for $p"
|
||||
unztarfromtar sources.tar $f $PREFIX
|
||||
done
|
||||
fi
|
||||
rm -f *.source.tar.gz
|
||||
echo Done.
|
||||
fi
|
||||
echo
|
||||
|
||||
# Install the documentation. Optional.
|
||||
if yesno "Install documentation"; then
|
||||
echo Installing documentation in $DOCDIR ...
|
||||
|
||||
@ -10,6 +10,9 @@ set -e
|
||||
# if it is not equal to yes, the documentation is assumed present in a file docs.tar.gz
|
||||
MAKEDOCS=no
|
||||
|
||||
# Set this to "no" if you want don't want to check for libgdb.a
|
||||
CHECKLIBGDB=yes
|
||||
|
||||
unset FPCDIR
|
||||
|
||||
# Goto the toplevel if necessary
|
||||
@ -26,7 +29,6 @@ SOURCECPU=`fpc -iSP | head -n1`
|
||||
SOURCEOS=`fpc -iSO | head -n1`
|
||||
|
||||
# retrieve real OS.
|
||||
HOSTARCH=`uname -p | tr "[:upper:]" "[:lower:]"`
|
||||
HOSTOS=`uname -s | tr "[:upper:]" "[:lower:]"`
|
||||
|
||||
MAKE=make
|
||||
@ -56,6 +58,17 @@ FULLSOURCE=$SOURCECPU-$SOURCEOS
|
||||
echo "FPC Source: $FULLSOURCE"
|
||||
echo "FPC Target: $FULLTARGET"
|
||||
|
||||
# Check for libgdb.a
|
||||
if [ "$CHECKLIBGDB" = "yes" ]; then
|
||||
if [ "$GDBLIBDIR" = "" ]; then
|
||||
GDBLIBDIR=libgdb/$TARGETOS/$TARGETCPU
|
||||
fi
|
||||
if [ ! -e "$GDBLIBDIR/libgdb.a" ]; then
|
||||
echo "Libgdb ($GDBLIBDIR/libgdb.a) not found, aborting"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cross building
|
||||
# - add prefix
|
||||
# - no IDE
|
||||
@ -90,16 +103,6 @@ if [ "$CROSS" = "" ]; then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
${MAKE} sourcezip CPU_TARGET=$TARGETCPU OS_TARGET=$TARGETOS FPC_VERSION=$VERSION
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to make source archive."
|
||||
exit 1
|
||||
fi
|
||||
${MAKE} docsrc CPU_TARGET=$TARGETCPU OS_TARGET=$TARGETOS FPC_VERSION=$VERSION
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to make documentation source archive."
|
||||
exit 1
|
||||
fi
|
||||
${MAKE} demozip CPU_TARGET=$TARGETCPU OS_TARGET=$TARGETOS FPC_VERSION=$VERSION
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to make demo source archive."
|
||||
@ -131,15 +134,6 @@ fi
|
||||
RELFILES="$RELFILES $BINARYTAR"
|
||||
|
||||
if [ "$CROSS" = "" ]; then
|
||||
# sources.tar
|
||||
echo "Creating sources.tar"
|
||||
tar cf sources.tar *.source.tar.gz
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to create sources.tar"
|
||||
exit 1
|
||||
fi
|
||||
RELFILES="$RELFILES sources.tar"
|
||||
|
||||
# demo, docs
|
||||
RELFILES="$RELFILES demo.tar.gz docs.tar.gz"
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user