Skip to content

Commit

Permalink
Fix builds when make called with CFLAGS_*
Browse files Browse the repository at this point in the history
When running

    make CFLAGS_gcc=-DFOO

the command line value of CFLAGS_gcc overrides all definitions
from the Makefile made with normal = := += operators.

However, using the "override" statement, the Makefile can still
append to the value given on the command line. We need that for
compiling beep-log.c with secure_getenv().
  • Loading branch information
ndim committed Dec 20, 2019
1 parent 55b615a commit d86e50a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
1.4.x
-----
- Let user define CFLAGS_* during "make" time while internal appends still work

1.4.5
-----
Expand Down
6 changes: 3 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ beep_OBJS += beep-driver-evdev.o

beep_LIBS =

beep-log.clang-o : CFLAGS_clang += -D_GNU_SOURCE
beep-log.gcc-o : CFLAGS_gcc += -D_GNU_SOURCE
beep-log.clang-o : override CFLAGS_clang += -D_GNU_SOURCE
beep-log.gcc-o : override CFLAGS_gcc += -D_GNU_SOURCE

beep-log.clang-o : CFLAGS_clang += -Wno-format-nonliteral
beep-log.clang-o : override CFLAGS_clang += -Wno-format-nonliteral

# sbin_PROGRAMS += beep-foo
# beep_foo_OBJS =
Expand Down

0 comments on commit d86e50a

Please sign in to comment.