I am trying to use the precompiled header functionality of GNUstep-make. It seems to work well except that it chokes if I have static inline functions in the header I'm precompiling. I use the XXX_OBJC_PRECOMPILED_HEADERS variable and specify "-include mypch.h" in ADDITIONAL_OBJCFLAGS (the header doesn't seem to get included if i don't since its not referenced in the .m file).
The problem is that when I try to compile, I get errors (below). What am I doing wrong?
$ make
This is gnustep-make 2.6.2. ....
Making all for tool mytool...
Precompiling header file mypch.h ...
mypch.h:1:20: error: redefinition of ‘myfunc’
static inline void myfunc()
^
In file included from <command-line>:0:0:
./mypch.h:1:20: note: previous definition of ‘myfunc’ was here
static inline void myfunc()
^
make[2]: *** [obj/mytool.obj/PrecompiledHeaders/ObjC/mypch.h.gch] Error 1
make[1]: *** ["mytool".all.tool.variables] Error 2
make: *** [internal-all] Error 2
GNUMakefile:
#####################################################
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = "mytool"
mytool_OBJC_FILES = mytool.m
mytool_OBJC_PRECOMPILED_HEADERS = mypch.h
ADDITIONAL_OBJCFLAGS += -Wextra -include mypch.h
include $(GNUSTEP_MAKEFILES)/tool.make
#####################################################
#############################
int main(int argc, const char * argv[])
{
return 0;
}
#############################