View Issue Details

IDProjectCategoryView StatusLast Update
0036767FPCOtherpublic2020-03-09 15:44
ReporterAlfred Assigned To 
Status newResolutionopen 
Product Version3.3.1 
Summary0036767: FPC executable name-mangling by Makefile
DescriptionThe FPC Makefile always adds the .exe extension onto the FPC executable defined.

So, if we have an FPC exe with the name fpc.bat, it gets changed by the Makefile into fpc.bat.exe !

Here, the presumed (.exe) extension is stripped:
override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
However, the .bat extension is NOT stripped.

Here, the presumed (.exe) extension is added:
override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)

Resulting in fpc.bat.exe !
Additional InformationA fpc.bat is used to add some extra command line parameters for better isolation of a custom install.
On Unix, a is used. That works flawless, while there is no SRCEXEEXT on Unix.
TagsNo tags attached.
Fixed in Revision
Attached Files


Marco van de Voort

2020-03-07 11:07

manager   ~0121428

Using batchfiles with same names is not supported functionality. That it works with unix is coincidence.


2020-03-07 11:20

reporter   ~0121429

That is good to know. I will use other methods to accomplish this mission, also on Unix.
And in that case, this non-bugger can be closed.

However, if a change can be accepted, I propose the below.
FPCSUFFIX:=$(suffix $(FPC))
ifeq ($(FPCSUFFIX),)
override FPC:=$(subst $(FPCSUFFIX),,$(FPC))
override FPC:=$(subst \,/,$(FPC))$(FPCSUFFIX)

Issue History

Date Modified Username Field Change
2020-03-07 10:03 Alfred New Issue
2020-03-07 11:07 Marco van de Voort Note Added: 0121428
2020-03-07 11:20 Alfred Note Added: 0121429
2020-03-09 15:44 Marco van de Voort Severity minor => feature
2020-03-09 15:44 Marco van de Voort Category Compiler => Other
2020-03-09 15:44 Marco van de Voort FPCTarget => -