apps/Makefile: Fix APPDIR path for native build.
A recent change gets the APPSDIR root directory path from: APPSDIR = $(CURDIR) Where CURDIR is a special variable maintained by GNU make. In the native build, GNU make is provided by GNUWin32. The value of CURDIR provided by the GNUWin32 CURDIR is not POSIX, but not quite windows compatible either. It does return paths that start with C: or D:, but uses forward slashes for path segment delimiters, not backsalshes as required by Windows tools. This fix here is to use $(CURDIR) to get the APPSDIR path for file inclusions, that part is fine. But then, if we find out we are doing a native build, the update the APPSDIR using shell %CD% environment variable which is the authoritative source of the current working directory under Windows.
This commit is contained in:
parent
de836fed72
commit
367b4d7e5b
10
Makefile
10
Makefile
@ -40,6 +40,16 @@ TOPDIR ?= $(APPDIR)/import
|
||||
-include $(TOPDIR)/Make.defs
|
||||
-include $(APPDIR)/Make.defs
|
||||
|
||||
# The GNU make CURDIR will always be a POSIX-like path with forward slashes
|
||||
# as path segment separators. This is fine for the above inclusions but
|
||||
# will cause problems later for the native build. If we know that this is
|
||||
# a native build, then we need to fix up the APPDIR path for subsequent
|
||||
# use
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
APPDIR := ${shell echo %CD%}
|
||||
endif
|
||||
|
||||
# Symbol table for loadable apps.
|
||||
|
||||
SYMTABSRC = symtab_apps.c
|
||||
|
Loading…
Reference in New Issue
Block a user