Strip the leading and trailing spaces from the makefile-defined variables to make

the engine more input robust.
Fixes #8019


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42864 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Siarzhuk Zharski 2011-10-16 16:02:34 +00:00
parent c788baed28
commit 6b063167dc
1 changed files with 12 additions and 12 deletions

View File

@ -43,20 +43,20 @@ endif
C++ := g++
# SETTING: set the CFLAGS for each binary type
ifeq ($(TYPE), DRIVER)
ifeq ($(strip $(TYPE)), DRIVER)
CFLAGS += -D_KERNEL_MODE=1 -no-fpic
else
CFLAGS +=
endif
# SETTING: set the proper optimization level
ifeq ($(OPTIMIZE), FULL)
ifeq ($(strip $(OPTIMIZE)), FULL)
OPTIMIZER = -O3
else
ifeq ($(OPTIMIZE), SOME)
ifeq ($(strip $(OPTIMIZE)), SOME)
OPTIMIZER = -O1
else
ifeq ($(OPTIMIZE), NONE)
ifeq ($(strip $(OPTIMIZE)), NONE)
OPTIMIZER = -O0
else
# OPTIMIZE not set so set to full
@ -66,7 +66,7 @@ endif
endif
# SETTING: set proper debugger flags
ifeq ($(DEBUGGER), TRUE)
ifeq ($(strip $(DEBUGGER)), TRUE)
DEBUG += -g
OPTIMIZER = -O0
endif
@ -74,10 +74,10 @@ endif
CFLAGS += $(OPTIMIZER) $(DEBUG)
# SETTING: set warning level
ifeq ($(WARNINGS), ALL)
ifeq ($(strip $(WARNINGS)), ALL)
CFLAGS += -Wall -Wno-multichar -Wno-ctor-dtor-privacy
else
ifeq ($(WARNINGS), NONE)
ifeq ($(strip $(WARNINGS)), NONE)
CFLAGS += -w
endif
endif
@ -89,13 +89,13 @@ endif
LDFLAGS += $(DEBUG)
# SETTING: set linker flags for each binary type
ifeq ($(TYPE), APP)
ifeq ($(strip $(TYPE)), APP)
LDFLAGS += -Xlinker -soname=_APP_
else
ifeq ($(TYPE), SHARED)
ifeq ($(strip $(TYPE)), SHARED)
LDFLAGS += -nostart -Xlinker -soname=$(NAME)
else
ifeq ($(TYPE), DRIVER)
ifeq ($(strip $(TYPE)), DRIVER)
LDFLAGS += -nostdlib /boot/develop/lib/x86/_KERNEL_ \
/boot/develop/lib/x86/haiku_version_glue.o
endif
@ -191,7 +191,7 @@ LDFLAGS += $(LINKER_FLAGS)
# SETTING: use the archive tools if building a static library
# otherwise use the linker
ifeq ($(TYPE), STATIC)
ifeq ($(strip $(TYPE)), STATIC)
BUILD_LINE = ar -cru "$(TARGET)" $(OBJS)
else
BUILD_LINE = $(LD) -o "$@" $(OBJS) $(LDFLAGS)
@ -346,7 +346,7 @@ USER_BIN_PATH = /boot/home/config/add-ons/kernel/drivers/bin
USER_DEV_PATH = /boot/home/config/add-ons/kernel/drivers/dev
driverinstall :: default
ifeq ($(TYPE), DRIVER)
ifeq ($(strip $(TYPE)), DRIVER)
copyattr --data $(TARGET) $(USER_BIN_PATH)/$(NAME)
mkdir -p $(USER_DEV_PATH)/$(DRIVER_PATH)
ln -sf $(USER_BIN_PATH)/$(NAME) $(USER_DEV_PATH)/$(DRIVER_PATH)/$(NAME)