Fixed precompiled headers when -I. is early in the command-line (eg, gnustep-gui)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24395 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2007-01-22 01:33:39 +00:00
parent f13b3ebb61
commit a181393476
3 changed files with 35 additions and 11 deletions

View file

@ -1,3 +1,17 @@
2007-01-22 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed precompiled headers when -I. is early in the compile command
line.
* rules.make (ALL_OBJCFLAGS): Added
OBJC_PRECOMPILED_HEADERS_INCLUDE_FLAGS at the beginning.
(ALL_CFLAGS, ALLCCFLAGS, ALL_OBJCCFLAGS): Similar changes.
* Instance/rules.make: Add the -I commands to find the precompiled
header to the new C_PRECOMPILED_HEADERS_INCLUDE_FLAGS,
OBJC_PRECOMPILED_HEADERS_INCLUDE_FLAGS,
CC_PRECOMPILED_HEADERS_INCLUDE_FLAGS,
OBJCC_PRECOMPILED_HEADERS_INCLUDE_FLAGS variables instead of
ADDITIONAL_INCLUDE_DIRS.
2007-01-16 Nicola Pero <nicola.pero@meta-innovation.com>
* configure.ac (GS_WITH_PRECOMPILED_HEADERS): Set to 'no'

View file

@ -299,20 +299,22 @@ ifneq ($(C_PRECOMPILED_OBJ_FILES)$(OBJC_PRECOMPILED_OBJ_FILES)$(CC_PRECOMPILED_O
$(CC_PRECOMPILED_OBJ_FILES)\
$(OBJCC_PRECOMPILED_OBJ_FILES)
# We put all the PrecompiledHeaders/xx/ dirs in ADDITIONAL_INCLUDE_DIRS;
# gcc can determine which language each file was compiled with, and
# will ignore files for different languages.
# We put all the PrecompiledHeaders/xx/ dirs in xx_PRECOMPILED_HEADERS_INCLUDE_FLAGS,
# which will be put before any other header include (this is what we want, as we
# want a precompiled header, if available, to be used in preference
# to the non-precompiled header, no matter where the non-precompiled
# header is).
ifneq ($(C_PRECOMPILED_OBJ_FILES),)
ADDITIONAL_INCLUDE_DIRS += -I$(GNUSTEP_OBJ_DIR)/PrecompiledHeaders/C
C_PRECOMPILED_HEADERS_INCLUDE_FLAGS += -I$(GNUSTEP_OBJ_DIR)/PrecompiledHeaders/C
endif
ifneq ($(OBJC_PRECOMPILED_OBJ_FILES),)
ADDITIONAL_INCLUDE_DIRS += -I$(GNUSTEP_OBJ_DIR)/PrecompiledHeaders/ObjC
OBJC_PRECOMPILED_HEADERS_INCLUDE_FLAGS += -I$(GNUSTEP_OBJ_DIR)/PrecompiledHeaders/ObjC
endif
ifneq ($(CC_PRECOMPILED_OBJ_FILES),)
ADDITIONAL_INCLUDE_DIRS += -I$(GNUSTEP_OBJ_DIR)/PrecompiledHeaders/CC
CC_PRECOMPILED_HEADERS_INCLUDE_FLAGS += -I$(GNUSTEP_OBJ_DIR)/PrecompiledHeaders/CC
endif
ifneq ($(OBJCC_PRECOMPILED_OBJ_FILES),)
ADDITIONAL_INCLUDE_DIRS += -I$(GNUSTEP_OBJ_DIR)/PrecompiledHeaders/ObjCC
OBJCC_PRECOMPILED_HEADERS_INCLUDE_FLAGS += -I$(GNUSTEP_OBJ_DIR)/PrecompiledHeaders/ObjCC
endif
else

View file

@ -230,7 +230,12 @@ endif
ALL_CPPFLAGS = $(AUTO_DEPENDENCIES_FLAGS) $(CPPFLAGS) $(ADDITIONAL_CPPFLAGS) \
$(AUXILIARY_CPPFLAGS)
ALL_OBJCFLAGS = $(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) \
# -I./obj/PrecompiledHeaders/ObjC must be before anything else because
# we want an existing and working precompiled header to be used before
# the non-precompiled header no matter how/where the non-precompiled
# header is found.
ALL_OBJCFLAGS = $(OBJC_PRECOMPILED_HEADERS_INCLUDE_FLAGS) \
$(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) \
$(AUXILIARY_OBJCFLAGS) $(ADDITIONAL_INCLUDE_DIRS) \
$(AUXILIARY_INCLUDE_DIRS) \
$(DERIVED_SOURCES_HEADERS_FLAG) \
@ -238,7 +243,8 @@ ALL_OBJCFLAGS = $(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) \
$(GNUSTEP_HEADERS_FLAGS) \
$(GNUSTEP_FRAMEWORKS_FLAGS)
ALL_CFLAGS = $(INTERNAL_CFLAGS) $(ADDITIONAL_CFLAGS) \
ALL_CFLAGS = $(C_PRECOMPILED_HEADERS_INCLUDE_FLAGS) \
$(INTERNAL_CFLAGS) $(ADDITIONAL_CFLAGS) \
$(AUXILIARY_CFLAGS) $(ADDITIONAL_INCLUDE_DIRS) \
$(AUXILIARY_INCLUDE_DIRS) \
$(DERIVED_SOURCES_HEADERS_FLAG) \
@ -247,7 +253,8 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(ADDITIONAL_CFLAGS) \
$(GNUSTEP_FRAMEWORKS_FLAGS)
# if you need, you can define ADDITIONAL_CCFLAGS to add C++ specific flags
ALL_CCFLAGS = $(ADDITIONAL_CCFLAGS) $(AUXILIARY_CCFLAGS)
ALL_CFLAGS = $(CC_PRECOMPILED_HEADERS_INCLUDE_FLAGS) \
$(ADDITIONAL_CCFLAGS) $(AUXILIARY_CCFLAGS)
# If you need, you can define ADDITIONAL_OBJCCFLAGS to add ObjC++
# specific flags. Please note that for maximum flexibility,
@ -260,7 +267,8 @@ ALL_CCFLAGS = $(ADDITIONAL_CCFLAGS) $(AUXILIARY_CCFLAGS)
# could be changed to put them in AUXILIARY_OBJCCFLAGS too and then we
# can remove AUXILIARY_OBJCCFLAGS from the following line, which would
# be cleaner. :-)
ALL_OBJCCFLAGS = $(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCCFLAGS) \
ALL_OBJCCFLAGS = $(OBJCC_PRECOMPILED_HEADERS_INCLUDE_FLAGS) \
$(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCCFLAGS) \
$(AUXILIARY_OBJCFLAGS) \
$(AUXILIARY_OBJCCFLAGS) $(ADDITIONAL_INCLUDE_DIRS) \
$(AUXILIARY_INCLUDE_DIRS) \