]> git.sven.stormbind.net Git - sven/jattach.git/commitdiff
fix order of CPPFLAGS and CFLAGS, make CFLAGS assignment more flexible
authorSven Höxter <sven.hoexter@rewe-digital.com>
Thu, 19 Sep 2019 15:19:29 +0000 (17:19 +0200)
committerSven Höxter <sven.hoexter@rewe-digital.com>
Thu, 19 Sep 2019 15:19:29 +0000 (17:19 +0200)
debian/patches/do-not-override-CFLAGS

index fb07492be992757385260c26bd470aa2415920ec..50774fc2e53ce9b4e0bd6e2c18fbe0a88d363299 100644 (file)
@@ -7,20 +7,21 @@ Index: jattach/Makefile
 ===================================================================
 --- jattach.orig/Makefile
 +++ jattach/Makefile
-@@ -16,7 +16,6 @@ else
+@@ -16,7 +16,7 @@ else
      SOURCES=$(RPM_ROOT)/SOURCES
      SPEC_FILE=jattach.spec
      CC=gcc
 -    CFLAGS=-O2
++    CFLAGS ?= -O2
      JATTACH_EXE=jattach
    endif
  endif
-@@ -27,7 +26,7 @@ build:
+@@ -27,7 +27,7 @@ build:
        mkdir -p build
  
  build/jattach: src/jattach_posix.c
 -      $(CC) $(CFLAGS) -DJATTACH_VERSION=\"$(JATTACH_VERSION)\" -o $@ $^
-+      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DJATTACH_VERSION=\"$(JATTACH_VERSION)\" -o $@ $^
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DJATTACH_VERSION=\"$(JATTACH_VERSION)\" -o $@ $^
  
  build/jattach.exe: src/jattach_windows.c
        $(CL) $(CFLAGS) /DJATTACH_VERSION=\"$(JATTACH_VERSION)\" /Fobuild/jattach.obj /Fe$@ $^ advapi32.lib /link /SUBSYSTEM:CONSOLE,5.02