Skip to content

Instantly share code, notes, and snippets.

@benibela

benibela/makeall.sh

Created Oct 25, 2020
Embed
What would you like to do?
How to install FreePascal
#!/bin/bash
#fpcmake -Tall
if [ -f /usr/lib/fpc/3.0.4/ppcx64 ]; then localpath=/usr/lib/fpc/3.0.4;
else if [ -f /usr/local/lib/fpc/3.0.4/ppcx64 ]; then localpath=/usr/local/lib/fpc/3.0.4;
else if [ -f /usr/lib64/fpc/3.0.4/ppcx64 ]; then localpath=/usr/lib64/fpc/3.0.4;
else if [ -f /usr/local/lib64/fpc/3.0.4/ppcx64 ]; then localpath=/usr/local/lib64/fpc/3.0.4;
else if [ -f /usr/lib/fpc/3.0.0/ppcx64 ]; then localpath=/usr/lib/fpc/3.0.0;
else if [ -f /usr/local/lib/fpc/3.0.0/ppcx64 ]; then localpath=/usr/local/lib/fpc/3.0.0;
else if [ -f /usr/lib64/fpc/3.0.0/ppcx64 ]; then localpath=/usr/lib64/fpc/3.0.0;
else if [ -f /usr/local/lib64/fpc/3.0.0/ppcx64 ]; then localpath=/usr/local/lib64/fpc/3.0.0;
else if [ -f /usr/bin/ppcx64 ] && (/usr/bin/ppcx64 -h|head |grep 3.0); then localpath=/usr/bin;
else echo Failed to find fpc 3; exit;
fi fi fi fi fi fi fi fi fi
localcompiler=$localpath/ppcx64
echo Using local fpc from $localpath
echo export localcompiler=$localpath/ppcx64
if find ./compiler/ -name "*.pas" >/dev/null; then echo;
else
echo Script needs to be started in the source directory of the FreePascal compiler to compile the compiler
exit
fi
set -e
sudo make clean
sudo make install PP=$localcompiler
sudo env "PATH=$PATH" make crossinstall OS_TARGET=android CPU_TARGET=i386 PP=$localcompiler
sudo env "PATH=$PATH" make crossinstall OS_TARGET=android CPU_TARGET=arm PP=$localcompiler
sudo env "PATH=$PATH" make crossinstall OS_TARGET=android CPU_TARGET=aarch64 PP=$localcompiler
sudo env "PATH=$PATH" make crossinstall OS_TARGET=android CPU_TARGET=x86_64 PP=$localcompiler
sudo env "PATH=$PATH" make crossinstall OS_TARGET=linux CPU_TARGET=i386 PP=$localcompiler
sudo env "PATH=$PATH" make crossinstall OS_TARGET=linux CPU_TARGET=arm PP=$localcompiler
#sudo env "PATH=$PATH" make crossinstall OS_TARGET=linux CPU_TARGET=aarch64 PP=$localcompiler
#sudo env "PATH=$PATH" make crossinstall OS_TARGET=linux CPU_TARGET=x86_64 PP=$localcompiler
sudo env "PATH=$PATH" make crossinstall OS_TARGET=win32 CPU_TARGET=i386 PP=$localcompiler
#sudo env "PATH=$PATH" make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 PP=$localcompiler
for ppc in /usr/local/lib/fpc/3.3.1/ppc*; do sudo ln -s $ppc /usr/local/bin/; done
@benibela

This comment has been minimized.

Copy link
Owner Author

@benibela benibela commented Oct 25, 2020

Call the script after svn checkout https://svn.freepascal.org/svn/fpc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment