[fpc-pascal] Linux Install: Is it me or the documentation? ;-)
First let me say how pleased I am to discover FreePascal. 'Twas my favourite programming language way back around 1988-89, being the last time I put my serious programming goggles on. So I'm trying to set this leopard up on Ubuntu (the Badger variety) and am following the user manual. Downloaded the .tar file; extracted to a temporary directory. (p11) Ran the install script as root (or rather, equivalent thereof) sudo ./install.sh and accepted all defaults (p12) Ran the test 'fpc hello' (p14). It fails. Run it will full directory listing, even tho' config has been written to /etc. Still fails. Umm... Less than satisfactory, verdade? Lev ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Linux Install: Is it me or the documentation? ;-)
On Sat, 28 Oct 2006, Lev Lafayette wrote: > > First let me say how pleased I am to discover FreePascal. 'Twas my > favourite programming language way back around 1988-89, being the last > time I put my serious programming goggles on. > > So I'm trying to set this leopard up on Ubuntu (the Badger variety) and > am following the user manual. > > Downloaded the .tar file; extracted to a temporary directory. (p11) > > Ran the install script as root (or rather, equivalent thereof) > sudo ./install.sh and accepted all defaults (p12) > > Ran the test 'fpc hello' (p14). It fails. Run it will full directory > listing, even tho' config has been written to /etc. Still fails. Ehm. What is the error you get ? > > Umm... Less than satisfactory, verdade? Definitely. Please provide slightly more detail, and we'll see what we can do to make it a satisfactory experience... :) Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Rename executable extension MAKE or FPC
Hi all, it's been a long time.. but I have a question. Is there any way tell FPCMAKE to rename all PROGRAMS to have a different extension? Example: On Windows: someprog.exe --> someprog.abc On Linux/BSD someprog --> someprog.abc Or is there any predefined macros that I can use with the -o (output) option to tell fpc compiler to rename the current executable being compiled, for example fpc test.pp -o$(targetexe).abc -- L505 http://z505.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Makefiles vs Pascal Automation
On Sat, 28 Oct 2006 01:04:12 -0600 L505 <[EMAIL PROTECTED]> wrote: > In many cases makefiles take about just as long to create as shell > scripts or pascal programs - they just offer a nice framework to > automate compiling in an easy way - but in sort of a funny syntax. > But makefiles kind of become ugly when they get big - and because > they have a poor syntax compared to pascal programs - couldn't one > just write a pascal program to automate the compilation process, > instead of a makefile? (if a good framework was in place). > > A reusable "automation" unit or framework would need to be created so > that automating the compile process from within a pascal program was > easy. > > After thinking about it, I determined that makefiles are actually > PROGRAMS in disguise - not config files, as their syntax seems to > lead us to believe. They are config files on steroids. Config files > generally don't execute instructions.. config files are more geared > toward storage of settings. But makefiles do execute instructions! > Makefiles are programs, not settings files. > > So if makefiles are actually mini-programs, why couldn't we simply > write makefiles in pascal instead of writing makefiles in > makefile-language/fpcmake-language? > > Psuedo Example.. let's consider I have to make four CGI programs in > one shot. I want to rename EXE or ELF programs to CGI programs after > the compilation is done. Compiling four programs using Make is > possible, writing up a makefile.. but it could also be done this way: > > program Maker; > uses > CompileTools; //the framework that simulates MAKE > const > targets : array of [1..4] = ('index.pp', 'main.pp', 'login.pp', > 'logout.pp'); begin > // compile several programs > Compile(targets); > if OStarget = linux then > writeln('compiling 4 programs for linux..'); > // 4 could actually be "CompileCount", if framework implemented > such a thing if OStarget = windows then > writeln('compiling 4 programs for windows..'); > for i:= 1 to 4 do >RenameFile(CompiledEXE[i], CompiledEXEName[i] + '.cgi'); > DeleteFiles('*.ppu', '*.a', '*.o'); > end; > > At the command line: > maker all > > Instead of using make: > make all > > The framework in the maker program would handle "all", "clean", etc. > Instead of writing a new makefile each time we wanted to automated > compilation, we would simple write a new pascal program which used > the maker framework. > > Why did I come across this idea? The same reason I sometimes build a > pascal program instead of using a shell script! > The same reason that HTML files would make poor executables! The same > reason that config files are really not meant to be programs... but > rather settings files. Similarly, a config file is really not a > program - and makefiles are becoming INI files on steroids - programs! > > If compiling the MAKER program each time is too much work, then maybe > this would be a good use for PascalScript. > > So basically my main point is that make files have become executable > INI files - something INI files really aren't intended to be - with > less power and clarity than a real pascal program. That's why FPC is switching to fpmake.pp files. And eventually/probably lazarus too. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Makefiles vs Pascal Automation
In many cases makefiles take about just as long to create as shell scripts or pascal programs - they just offer a nice framework to automate compiling in an easy way - but in sort of a funny syntax. But makefiles kind of become ugly when they get big - and because they have a poor syntax compared to pascal programs - couldn't one just write a pascal program to automate the compilation process, instead of a makefile? (if a good framework was in place). A reusable "automation" unit or framework would need to be created so that automating the compile process from within a pascal program was easy. After thinking about it, I determined that makefiles are actually PROGRAMS in disguise - not config files, as their syntax seems to lead us to believe. They are config files on steroids. Config files generally don't execute instructions.. config files are more geared toward storage of settings. But makefiles do execute instructions! Makefiles are programs, not settings files. So if makefiles are actually mini-programs, why couldn't we simply write makefiles in pascal instead of writing makefiles in makefile-language/fpcmake-language? Psuedo Example.. let's consider I have to make four CGI programs in one shot. I want to rename EXE or ELF programs to CGI programs after the compilation is done. Compiling four programs using Make is possible, writing up a makefile.. but it could also be done this way: program Maker;uses CompileTools; //the framework that simulates MAKE const targets : array of [1..4] = ('index.pp', 'main.pp', 'login.pp', 'logout.pp');begin // compile several programs Compile(targets); if OStarget = linux then writeln('compiling 4 programs for linux..'); // 4 could actually be "CompileCount", if framework implemented such a thing if OStarget = windows then writeln('compiling 4 programs for windows..'); for i:= 1 to 4 do RenameFile(CompiledEXE[i], CompiledEXEName[i] + '.cgi'); DeleteFiles('*.ppu', '*.a', '*.o');end; At the command line: maker all Instead of using make: make all The framework in the maker program would handle "all", "clean", etc. Instead of writing a new makefile each time we wanted to automated compilation, we would simple write a new pascal program which used the maker framework. Why did I come across this idea? The same reason I sometimes build a pascal program instead of using a shell script! The same reason that HTML files would make poor executables! The same reason that config files are really not meant to be programs... but rather settings files. Similarly, a config file is really not a program - and makefiles are becoming INI files on steroids - programs! If compiling the MAKER program each time is too much work, then maybe this would be a good use for PascalScript. So basically my main point is that make files have become executable INI files - something INI files really aren't intended to be - with less power and clarity than a real pascal program. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Makefiles vs Pascal Automation
> > So basically my main point is that make files have become executable > > INI files - something INI files really aren't intended to be - with > > less power and clarity than a real pascal program. > > That's why FPC is switching to fpmake.pp files. And eventually/probably > lazarus too. Ohh.. I didn't hear about it yet. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Rename executable extension MAKE or FPC
> Hi all, it's been a long time.. but I have a question. > > Is there any way tell FPCMAKE to rename all PROGRAMS to have a different > extension? > > Example: > > On Windows: > someprog.exe --> someprog.abc > > On Linux/BSD > someprog --> someprog.abc > > Or is there any predefined macros that I can use with the -o (output) > option to tell fpc > compiler to rename the current executable being compiled, for example > > fpc test.pp -o$(targetexe).abc The -o option is not passed by the default Makefile generated by fpcmake. But you can make your own Makefile and support it. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Makefiles vs Pascal Automation
On Sat, 28 Oct 2006, L505 wrote: > > > > So basically my main point is that make files have become executable > > > INI files - something INI files really aren't intended to be - with > > > less power and clarity than a real pascal program. > > > > That's why FPC is switching to fpmake.pp files. And eventually/probably > > lazarus too. > > > Ohh.. I didn't hear about it yet. check out the fpmake.pp and fpmake.inc file scattered all over the source trees; and the sources in utils/fppkg do what you describe 'TInstaller' TBuildEngine etc. We are working on a 2-stage approach: fpmake: compile/install/zip one or more packages (loosely defined as a group of units) fppkg: package manager like smart/yum/yast/rpm with download capacity. fpmake works already. fppkg is under construction. We'll base the 2.2 release on it, if all goes according to plan. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Rename executable extension MAKE or FPC
> Is there any way tell FPCMAKE to rename all PROGRAMS to have a different > extension? I just had to study up on how fpcmake RULES worked by looking at other existing fpcmake files.. hmm fpcmake files seem to resemble python - 8 space indentation for execution instructions. For win32 [rules] all: fpc_all copy *$(EXEEXT) *.abc And then remove all the exe files using rm or the dos equivilent command. For unix.. something like [rules] all: fpc_all rename $(EXEEXT) .abc * The docs should note that execution can be done like this. I was under the impression makefiles were config files, but really they are a scripting language with bizarre syntax. The docs mention tools available such as cp, upx, but no information on how to execute or use the tools in the fpc makefile. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Makefiles vs Pascal Automation
> > check out the fpmake.pp and fpmake.inc file scattered all over the source > trees; and the sources in utils/fppkg do what you describe 'TInstaller' > TBuildEngine etc. > > We are working on a 2-stage approach: > > fpmake: > compile/install/zip one or more packages (loosely defined as a group of > units) > fppkg: > package manager like smart/yum/yast/rpm with download capacity. > > fpmake works already. fppkg is under construction. > > We'll base the 2.2 release on it, if all goes according to plan. > > Michael. Ahh.. I thought maybe I was nuts for thinking up such a thing - and I needed verification that developers think alike ;-) It's too bad I spent so much time thinking about how to implement a psuedo example it when it is already in the works. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal