[fpc-devel]Makefile layout
    Sergey Korshunoff 
    seyko at comail.ru
       
    Tue May 28 01:50:26 CEST 2002
    
    
  
Hi!
Why Makefile's in a FPC tree have so agly layout?
For example:
ifndef ECHO
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
ifeq ($(ECHO),)
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
ifeq ($(ECHO),)
ECHO=echo
else
ECHO:=$(firstword $(ECHO))
endif
else
ECHO:=$(firstword $(ECHO))
endif
endif
export ECHO
The following layout is more nicer (in my opinion):
ifndef ECHO
  ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  ifeq ($(ECHO),)
    ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
    ifeq ($(ECHO),)
      ECHO=echo
    else
      ECHO:=$(firstword $(ECHO))
    endif
  else
    ECHO:=$(firstword $(ECHO))
  endif
endif
export ECHO
There was no problems under Linux and Windows with new layout.
I change fpcmake to keep comments and spaces from Makefile.fpc
and template.  No problems again. And Makefile's looks much nicer.
Can you give any comments?
Regards,
	Sergey Korshunoff
    
    
More information about the fpc-devel
mailing list