Package: gnustep-make
Version: 2.6.2-2.1
Severity: normal
Tags: upstream patch

Hello. Please consider the following minimal scenario.

-- Content of main.c
int main (void) { return (0); }

-- Content of GNUmakefile
include $(GNUSTEP_MAKEFILES)/common.make
CTOOL_NAME := my
my_C_FILES := main.c
include $(GNUSTEP_MAKEFILES)/ctool.make

-- Compile with
gs_make messages=yes CFLAGS=-DCFLAGS_from_command_line

Affecting CFLAGS on the command line should have an effect, as
documented, and like similar variables CPPFLAGS and OBJCFLAGS.

I suggest the attached diff.
--- a/common.make	2013-07-08 06:08:10.000000000 +0200
+++ b/common.make	2013-08-13 18:29:54.000000000 +0200
@@ -737,7 +737,7 @@
 
 INTERNAL_OBJCFLAGS += $(ADDITIONAL_FLAGS) $(OPTFLAG) $(OBJCFLAGS) \
 			$(RUNTIME_FLAG)
-INTERNAL_CFLAGS += $(ADDITIONAL_FLAGS) $(OPTFLAG)
+INTERNAL_CFLAGS += $(ADDITIONAL_FLAGS) $(OPTFLAG) $(CFLAGS)
 
 #
 # Support building of Multiple Architecture Binaries (MAB). The object files

Reply via email to