Skip to content

Commit

Permalink
Strip the leading and trailing spaces from the makefile-defined varia…
Browse files Browse the repository at this point in the history
…bles 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
  • Loading branch information
siarzhuk committed Oct 16, 2011
1 parent c788bae commit 6b06316
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions data/develop/makefile-engine
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -66,18 +66,18 @@ endif
endif

# SETTING: set proper debugger flags
ifeq ($(DEBUGGER), TRUE)
ifeq ($(strip $(DEBUGGER)), TRUE)
DEBUG += -g
OPTIMIZER = -O0
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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6b06316

Please sign in to comment.