On Tue, 12 Dec 2006 00:41:10 +0200
"George Birbilis" <[EMAIL PROTECTED]> wrote:

> In fact it should be
> 
> Set path=%fpcmakepath%;%path%
> 
> So that the %fpcmakepath% takes precedence (the leftmost ones are
> checked first), in case other MAKE are in the path from MS or Borland
> or other tools
> 
> 1) Can you please add the following batch file to the Laz source
> distro? Please name it either MakeAll.bat or better RebuildAll.bat
> since I think "make clean all" in fact does a "Rebuild all" action
> instead of compiling only the "changed" stuff (files with "archive"
> attribute on?). Please add the file as is, without edits, esp. don't
> add a space between o and : at "echo:" cause it's a trick to echo an
> empty line and has to stay as is. The :: are comments, can also use
> REM but it's ugly and hard to read then
> 
> 2) Also, is there some make command (haven't used it for ages) to do
> "Compile all" and "Build all" actions (first will make object files or
> whatever changed but with no linking [not much needed though] and

compile fast if only small things changed:
make

compile fast without linking:
make OPT=-Cn


> second will do linking too but only changed stuff compared to the
> "Rebuild all" which builds all stuff again and takes long time). 

compile everything:
make clean all

There are more options, like building an IDE with packages:
make idepkg
Or building an IDE with a lot of standard packages:
make bigide

These commands work under all platforms and are used by the IDE itself
to build itself. With the notable exception of BSD, where gmake instead
of make is used.


> Such
> actions are a bit classic in Delphi-world, esp. the "Build all" so an
> extra .bat called BuildAll.bat with the make command modified to not
> rebuild all stuff, would be useful to include too in the distro.
> 
> In fact the "set FPC_PATH" and "set FPC_BIN_PATH" and each ones
> preceding comment lines could exist in separate .BAT called
> FPC_paths.bat and both the BuildAll.bat and RebuildAll.bat could call
> that doing
> 
> call FPC_paths.bat
> 
> at their start (after the @echo off command [the @ is there to not
> echo the command "echo off" itself to the console]) instead of the
> set FPC_PATH and set FPC_BIN_PATH. Don't forget to prepend "call" in
> that case cause else the environment vars set at the other .bat file
> will be ignored (in fact I think execution flow would then continue
> at that .bat file and never return to the caller)
> 
> Also modify readme.txt and online wiki to inform windows users that
> they can do this (in fact Unix users should also have such ready-made
> scripts for the various command shells of *nix [.sh etc.] to automate
> the builds and check for build errors instead of typing in commands

'make' and 'make clean all' are no inventions of FPC/Laz. Unix users
expect them to work. In fact, they would get confused, if lazarus
would provide shell scripts to call make.


> and then reading carefully the output to see if there were errors
> etc. thrown, could keep all those at some "buildscripts" subfolder
> with subfolders for each platform if they become many files)
> 
> thanks,
> George
> 
> P.S. let me know if you have any objections to this

IMO it is a good idea to provide a simple way/batch file to build
lazarus. But IMHO it is a bad idea to put several batches/scripts for
each platform into the main directory.
It would be better to add a INSTALL.txt, describing the most common
build commands for every platform and pointing to the wiki for the rest.
At the moment these things are in the README.txt.


Mattias



> 
> ---- RebuildAll.bat follows:
> 
> 
> @echo off
> 
> ::-- edit the following line to match your FPC installation folder
> set FPC_PATH=c:\fpc\2.0.4
> 
> ::-- edit the following line to specify the FPC bin subfolder for your
> target platform
> set FPC_BIN_PATH=%FPC_PATH%\bin\i386-win32
> 
> set PATH=%FPC_BIN_PATH%;%PATH%
> ::-- echo %PATH%
> 
> make clean all
> echo:
> if %ERRORLEVEL% NEQ 0 goto ERRORS
> 
> echo [OK]
> goto FINISH
> 
> :ERRORS
> echo [Errors occured]
> 
> :FINISH
> Pause
> 
> 
> 
> 
> 
>   _____  
> 
> avast! Antivirus <http://www.avast.com> : Outbound message clean. 
> 
> 
> Virus Database (VPS): 0653-5, 05/12/2006
> Tested on: 12/12/2006 12:41:10 p?
> avast! - copyright (c) 1988-2006 ALWIL Software.
> 
> 
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to