Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-10

Rename executable extension MAKE or FPC

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

L505

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

Peter Vreman
to L505
Show quoted text 18 lines
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.

L505
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.