LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gtk-cflags-fix.patch of Package sparse (Project home:misiozor)

---
 Makefile |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ HAVE_GCC_DEP:=$(shell touch .gcc-test.c
 HAVE_GTK2:=$(shell pkg-config --exists gtk+-2.0 2>/dev/null && echo 'yes')
 
 GCC_BASE_DEFINE= -DGCC_BASE=\"$(shell $(CC) --print-file-name=)\"
+LOC_CFLAGS = $(GCC_BASE_DEFINE)
 
 ifeq ($(HAVE_GCC_DEP),yes)
 CFLAGS += -Wp,-MD,$(@D)/.$(@F).d
@@ -53,7 +54,7 @@ GTK2_LIBS := $(shell pkg-config --libs g
 PROGRAMS += test-inspect
 INST_PROGRAMS += test-inspect
 test-inspect_EXTRA_DEPS := ast-model.o ast-view.o ast-inspect.o
-test-inspect.o $(test-inspect_EXTRA_DEPS): CFLAGS += $(GTK2_CFLAGS)
+test-inspect.o $(test-inspect_EXTRA_DEPS): LOC_CFLAGS += $(GTK2_CFLAGS)
 test-inspect_EXTRA_OBJS := $(GTK2_LIBS)
 endif
 
@@ -145,7 +146,7 @@ DEP_FILES := $(wildcard .*.o.d)
 $(if $(DEP_FILES),$(eval include $(DEP_FILES)))
 
 c2xml.o: c2xml.c $(LIB_H)
-	$(QUIET_CC)$(CC) `pkg-config --cflags libxml-2.0` -o $@ -c $(GCC_BASE_DEFINE) $(CFLAGS) $<
+	$(QUIET_CC)$(CC) `pkg-config --cflags libxml-2.0` -o $@ -c $(LOC_CFLAGS) $(CFLAGS) $<
 
 compat-linux.o: compat/strtold.c compat/mmap-blob.c $(LIB_H)
 compat-solaris.o: compat/mmap-blob.c $(LIB_H)
@@ -153,7 +154,7 @@ compat-mingw.o: $(LIB_H)
 compat-cygwin.o: $(LIB_H)
 
 %.o: %.c
-	$(QUIET_CC)$(CC) -o $@ -c $(GCC_BASE_DEFINE) $(CFLAGS) $<
+	$(QUIET_CC)$(CC) -o $@ -c $(LOC_CFLAGS) $(CFLAGS) $<
 
 clean: clean-check
 	rm -f *.[oa] .*.d *.so $(PROGRAMS) $(SLIB_FILE) pre-process.h sparse.pc