On Wed, 2011-04-06 at 13:40 +0400, Sergei Gorelkin wrote: > 06.04.2011 12:56, Joost van der Sluis пишет: > >> Another disaster occurs when I try to use the same source tree from > >> different OSes. > >> Say first I build in Linux, it successfully creates the > >> '/packages/fcl-web/fpmake' executable. After > >> that building from Windows fails since it attempts to run the Linux fpmake > >> without rebuilding it. > >> `make clean' from Windows does not remove Linux executable (tries to > >> remove the 'fpmake.exe' or does > >> not remove it at all, or maybe for some other reason). Removing it by hand > >> solves the problem. > > > > The reason that fpmake is not removed, is that you need it to do the > > clean. But maybe I can let the akefile compile fpmake, then run it to do > > the cleanup, and then remove the executable again. > > > I was seeing it from the point "one system does not touch files created > by/for the other system", to > be honest. > The things are going to get even more interesting when cross-compilation > comes in...
That should work. But Vincent already showed that if your first compile is a cross-compile, the fpmake will be generated for the target platform, so it won't work. If the fpmake executable already exists, it will work. > > To solve your actual problem, we could add a suffix to the fpmake > > executable name in case it is build by the Makefile. fppkg can simply > > check if the existing executable does work, and if not, re-compile it. > > > ...it will end up with a directory containing (hosts * targets) fpmake > executables? No. Only for the (platform*targets) you are compiling on. So if you share your fpc-source on 6 different systems, you will get 6 fpmake versions. But if you (cross)-compile for 12 different systems on these 6 systems, you till 'only' need 6 fpmake executables. > Just-in-time recompilation looks somewhat better in comparison with that :) Yes, but we have to deal with make. If you can give me a Makefile-script that checks if the executable is build for the running target, on all targets we support, I'll add it. If you use fppkg instead of make, this can be implemented easily. But we will use make in the foreseeable future for the compiler and rtl, so we need to keep some hybrid between the two. Joost. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel