[fpc-devel]improve makefile

Peter Vreman peter at freepascal.org
Thu Jan 15 20:03:20 CET 2004

At 19:17 15-1-2004, you wrote:
> From several days I've try to make all fpc myself, but to do this under
>WIN98 is not so clear that it can be.
>I've found some bugs in makefile, and somebody may change FPCM to be
>generated proper MAKEFILE

What is proper? Windows is so broken for command line support, we try to 
support it as best as possible, but not to make it work less under the unix 

>my 4 suggestion:
>/*  current MAKEFILE
>ifdef PWD
>BASEDIR:=$(subst \,/,$(shell $(PWD)))
>ifdef inCygWin
>ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
>BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
>BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
>BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
>/** in last line change to ..,like FPCDIR

Why? Fixing it to c:/pp is also not good. And it means that PWD is not 
installed so it should already give an error.

>/* current MAKEFILE
>/* I change to .., but I don't know, how it be under Linux

Why fix it to c:/ ?

>please remove line:
>override DEFAULT_FPCDIR=..
>because it can't be pass from command line f.e: 'make all

This is taken from the Makefile.fpc and is only used to be able to build 
the tree without needing FPCDIR set.

>ifeq ($(FPCDIR),wrong)
>override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
>ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
>override FPCDIR=wrong
>/*  change to :
>override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))

Why remove the safety check? There must be a rtl or units dir else your 
installation is broken.


More information about the fpc-devel mailing list