[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix for HAVE_DOS_PATHS build on cygwin
From: |
William Gianopoulos |
Subject: |
Re: Fix for HAVE_DOS_PATHS build on cygwin |
Date: |
Sat, 23 Sep 2006 13:04:25 -0700 (PDT) |
See attached file. Yahoo mail wordwraps everthing to
the point of unintelligibility.
--- Paul Smith <address@hidden> wrote:
> On Saturday, 23 September, Eli Zaretskii
> (address@hidden) wrote:
>
> > > This kind of brings up the question. Should the
> built-in abspath be
> > > overriding a user defined function with the same
> name?
> >
> > I tend to agree. Paul, what are your thoughts on
> such conflicts?
>
> I don't know what this means; there's no way to
> create a user defined
> function that conflicts with the builtin $(abspath
> ...).
>
> Users cannot invoke functions that way: they have to
> use $(call ...).
>
>
> I'm confused...
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
This is the code from the failing Makefile:
#########################################
# (5) Execute "global" rules. (OPTIONAL)
#########################################
include $(CORE_DEPTH)/coreconf/rules.mk
...
include ../platrules.mk
SRCDIR = $(call abspath,.)
%.chk: %.$(DLL_SUFFIX)
ifeq ($(OS_TARGET), OS2)
cd $(OBJDIR) ; cmd.exe /c $(SRCDIR)/sign.cmd $(DIST) \
$(call abspath,$(OBJDIR)) $(OS_TARGET) \
$(call abspath,$(NSPR_LIB_DIR)) $(call abspath,$<)
else
cd $(OBJDIR) ; sh $(SRCDIR)/sign.sh $(call abspath,$(DIST)) \
$(call abspath,$(OBJDIR)) $(OS_TARGET) $(call abspath,$(NSPR_LIB_DIR))
$(call abspath,$<)
endif
libs install :: $(CHECKLOC)
-----------------------------------------------------------------------------
and rules.mk contains this code:
ifeq (,$(filter-out OS2 AIX,$(OS_TARGET)))
# OS/2 and AIX
NEED_ABSOLUTE_PATH := 1
PWD := $(shell pwd)
else
# Windows
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
NEED_ABSOLUTE_PATH := 1
PWD := $(shell pwd)
ifeq (,$(findstring ;,$(PATH)))
ifndef USE_MSYS
PWD := $(subst \,/,$(shell cygpath -w $(PWD)))
endif
endif
else
# everything else
PWD := $(shell pwd)
endif
endif
abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter
/%,$(1)),$(1),$(PWD)/$(1))
-------------------------------------------------------------------------------
The $call abspath ends up calling the built-in abspath and does not use the one
defined in rules.mk.
This was verified both by adding fprintf's to the built-in abspath as well as
the fact that I was
able to fix my issue by making changes to the abspath funciton defined in
function.c.
So, if you are saying that $abspath( is the only way to invoke the built-in
function, and
$(call abaspath is suppsoed to invoke a user defined funtion, that is NOT what
is happening.