[fpc-pascal] Option in Makefile to clean installed compiled units
fr0st.brutal at gmail.com
Tue Oct 9 10:11:40 CEST 2018
when building FPC from sources, I couldn't find a command to cleanup
unit binaries copied to common .\units\ dir by "install" command.
Without this step build process fails.
I build FPC from sources with the following layout:
.\fpc-min - FPC release installed from distrib
.\FPC - sources from Github
and these commands in batch file (this is a minimal excerpt from my
CALL make clean || GOTO :BuildFPCErr
CALL make all || GOTO :BuildFPCErr
CALL make install INSTALL_PREFIX="%FPCPath%" || GOTO :BuildFPCErr
The problem is that "make install" copies all unit binaries to
%FPCPath%\units\%platform%-%os% but "make clean" won't remove them so
the next build fails on rebuilding CustApp unit (IDK why this very unit
stops the process). If I add "RD /Q /S "units\%TargCPU%-%TargOS%" 2>
nul" after "make clean" where %TargCPU%-%TargOS% is i386-win32,
everything is fine. But I wonder if there's a built-in option to do
this? I discovered some lines dealing with \units folder in makefile but
its syntax just explodes my brain. I tried "cleanall" and "distclean"
with no luck.
More information about the fpc-pascal