----- Original Message -----
> 13.10.2011 11:06, Juha Manninen пишет:
> > Hi
> >
> > Please test with r32866.
> > You must do "make clean all" first and then build from the "Build
>
> Already tested. Still broken.
I have a bit more info on this.
In some sense, the problem seems to come down to line 14 of ide/Makefile.fpc:
[target]
programs=lazarus startlazarus lazbuild
Lazarus IDE wants to "make -C ide all" while (effectively) OPT='...
-olazarus.new.exe' due to it being in idemake.cfg which is, I believe, going to
be applied to all fpc invocations which GNU make uses to solve for "lazarus.exe
startlazarus.exe lazbuild.exe". As a test of this hypothesis, build+clean and
let it fail. Now apply this patch:
Index: buildlazdialog.pas
===================================================================
--- buildlazdialog.pas (revision 32869)
+++ buildlazdialog.pas (working copy)
@@ -262,7 +262,7 @@
Tool.Title:=lisIDE;
Tool.WorkingDirectory:=WorkingDirectory;
case Options.IdeBuildMode of
- bmBuild: Tool.CmdLineParams:='all';
+ bmBuild: Tool.CmdLineParams:='ide';
bmCleanBuild: Tool.CmdLineParams:='clean all';
end;
// append extra options
--
Next replace lazarus.exe with the old working version and go into build+clean
options and turn off the "clean" radio button and checkbox. Save that and
build the ide. (Voila, it works!)
So, assuming I'm right about this, one reasonable solution is:
1) stop -olazarus.new.exe from going into idemake.cfg; instead of that...
2) create somewhere in the jumble of pass-by-reference ide-build info variables
to remember that the ide target was locked
3) separate out the make invocations for each of lazarus($ext),
startlazarus($ext) and lazbuild($ext). Everything is all set up in "Tool"
above -- most of that can be recycled so this is not so horrible as it sounds
perhaps.
4) append -olazarus.new.exe to the OPT= clause of just lazarus($ext), and only
when the locked flag got set
Arguably a better solution would be to just decide if the IDE is locked, and if
so, export an environment variable to make. Then hack up ide/Makefile.fpc to
contain some target-specific magical thingy which adds -olazarus.new($ext) only
to the lazarus.exe($ext) target and only if that variable is set. However
Makefile.fpc had might as well be sendmail.cf to me -- such techniques are too
advanced for my weak Makefile-foo.
I'd be happy to hack up an attempt at the 1-4 approach if some more
knowledgeable person can confirm that this seems correct, I think I have a
pretty good idea of where all the code goes.
-gmt
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus