* [PATCH v3 0/2] fsverity-utils Makefile fixes
@ 2020-05-20 21:25 Jes Sorensen
2020-05-20 21:25 ` [PATCH 1/2] Fix Makefile to delete objects from the library on make clean Jes Sorensen
2020-05-20 21:25 ` [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS Jes Sorensen
0 siblings, 2 replies; 6+ messages in thread
From: Jes Sorensen @ 2020-05-20 21:25 UTC (permalink / raw)
To: ebiggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen
From: Jes Sorensen <jsorensen@fb.com>
Hi,
This addresses the last comments, leaving the CPPFLAGS as override. I
checked that it doesn't break the rpm build as well.
Cheers,
Jes
Jes Sorensen (2):
Fix Makefile to delete objects from the library on make clean
Let package manager override CFLAGS and CPPFLAGS
Makefile | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--
2.26.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] Fix Makefile to delete objects from the library on make clean
2020-05-20 21:25 [PATCH v3 0/2] fsverity-utils Makefile fixes Jes Sorensen
@ 2020-05-20 21:25 ` Jes Sorensen
2020-05-20 21:25 ` [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS Jes Sorensen
1 sibling, 0 replies; 6+ messages in thread
From: Jes Sorensen @ 2020-05-20 21:25 UTC (permalink / raw)
To: ebiggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen
From: Jes Sorensen <jsorensen@fb.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 1a7be53..e7fb5cf 100644
--- a/Makefile
+++ b/Makefile
@@ -180,8 +180,8 @@ help:
done
clean:
- rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) $(LIB_OBJS) $(ALL_PROG_OBJ) \
- .build-config
+ rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) \
+ lib/*.o programs/*.o .build-config
FORCE:
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS
2020-05-20 21:25 [PATCH v3 0/2] fsverity-utils Makefile fixes Jes Sorensen
2020-05-20 21:25 ` [PATCH 1/2] Fix Makefile to delete objects from the library on make clean Jes Sorensen
@ 2020-05-20 21:25 ` Jes Sorensen
1 sibling, 0 replies; 6+ messages in thread
From: Jes Sorensen @ 2020-05-20 21:25 UTC (permalink / raw)
To: ebiggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen
From: Jes Sorensen <jsorensen@fb.com>
Package managers such as RPM wants to build everything with their
preferred flags, and we shouldn't hard override flags.
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
Makefile | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index e7fb5cf..18f08c3 100644
--- a/Makefile
+++ b/Makefile
@@ -29,16 +29,12 @@
cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null &>/dev/null; \
then echo $(1); fi)
-#### Common compiler flags. You can add additional flags by defining CFLAGS
-#### and/or CPPFLAGS in the environment or on the 'make' command line.
-
-override CFLAGS := -O2 -Wall -Wundef \
+CFLAGS := -O2 -Wall -Wundef \
$(call cc-option,-Wdeclaration-after-statement) \
$(call cc-option,-Wmissing-prototypes) \
$(call cc-option,-Wstrict-prototypes) \
$(call cc-option,-Wvla) \
- $(call cc-option,-Wimplicit-fallthrough) \
- $(CFLAGS)
+ $(call cc-option,-Wimplicit-fallthrough)
override CPPFLAGS := -D_FILE_OFFSET_BITS=64 $(CPPFLAGS)
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/2] Fix Makefile to delete objects from the library on make clean
2020-05-20 20:08 [PATCH v2 0/2] fsverity-utils Makefile fixes Jes Sorensen
@ 2020-05-20 20:08 ` Jes Sorensen
0 siblings, 0 replies; 6+ messages in thread
From: Jes Sorensen @ 2020-05-20 20:08 UTC (permalink / raw)
To: ebiggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen
From: Jes Sorensen <jsorensen@fb.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 1a7be53..e7fb5cf 100644
--- a/Makefile
+++ b/Makefile
@@ -180,8 +180,8 @@ help:
done
clean:
- rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) $(LIB_OBJS) $(ALL_PROG_OBJ) \
- .build-config
+ rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) \
+ lib/*.o programs/*.o .build-config
FORCE:
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Fix Makefile to delete objects from the library on make clean
2020-05-15 20:56 ` [PATCH 1/2] Fix Makefile to delete objects from the library on make clean Jes Sorensen
@ 2020-05-20 2:42 ` Eric Biggers
0 siblings, 0 replies; 6+ messages in thread
From: Eric Biggers @ 2020-05-20 2:42 UTC (permalink / raw)
To: Jes Sorensen; +Cc: linux-fscrypt, kernel-team, Jes Sorensen
On Fri, May 15, 2020 at 04:56:48PM -0400, Jes Sorensen wrote:
> From: Jes Sorensen <jsorensen@fb.com>
>
> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
> ---
> Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index 1a7be53..c5f46f4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -81,6 +81,7 @@ LIB_SRC := $(wildcard lib/*.c)
> LIB_HEADERS := $(wildcard lib/*.h) $(COMMON_HEADERS)
> STATIC_LIB_OBJ := $(LIB_SRC:.c=.o)
> SHARED_LIB_OBJ := $(LIB_SRC:.c=.shlib.o)
> +LIB_OBJS := $(SHARED_LIB_OBJ) $(STATIC_LIB_OBJ)
>
> # Compile static library object files
> $(STATIC_LIB_OBJ): %.o: %.c $(LIB_HEADERS) .build-config
> --
Thanks for pointing this out. I think it would be a bit easier to just use a
wildcard in the clean target, though.
diff --git a/Makefile b/Makefile
index 1a7be53..e7fb5cf 100644
--- a/Makefile
+++ b/Makefile
@@ -180,8 +180,8 @@ help:
done
clean:
- rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) $(LIB_OBJS) $(ALL_PROG_OBJ) \
- .build-config
+ rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) \
+ lib/*.o programs/*.o .build-config
FORCE:
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/2] Fix Makefile to delete objects from the library on make clean
2020-05-15 20:56 [PATCH 0/2] fsverity-utils Makefile fixes Jes Sorensen
@ 2020-05-15 20:56 ` Jes Sorensen
2020-05-20 2:42 ` Eric Biggers
0 siblings, 1 reply; 6+ messages in thread
From: Jes Sorensen @ 2020-05-15 20:56 UTC (permalink / raw)
To: ebiggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen
From: Jes Sorensen <jsorensen@fb.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 1a7be53..c5f46f4 100644
--- a/Makefile
+++ b/Makefile
@@ -81,6 +81,7 @@ LIB_SRC := $(wildcard lib/*.c)
LIB_HEADERS := $(wildcard lib/*.h) $(COMMON_HEADERS)
STATIC_LIB_OBJ := $(LIB_SRC:.c=.o)
SHARED_LIB_OBJ := $(LIB_SRC:.c=.shlib.o)
+LIB_OBJS := $(SHARED_LIB_OBJ) $(STATIC_LIB_OBJ)
# Compile static library object files
$(STATIC_LIB_OBJ): %.o: %.c $(LIB_HEADERS) .build-config
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-20 21:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 21:25 [PATCH v3 0/2] fsverity-utils Makefile fixes Jes Sorensen
2020-05-20 21:25 ` [PATCH 1/2] Fix Makefile to delete objects from the library on make clean Jes Sorensen
2020-05-20 21:25 ` [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS Jes Sorensen
-- strict thread matches above, loose matches on Subject: below --
2020-05-20 20:08 [PATCH v2 0/2] fsverity-utils Makefile fixes Jes Sorensen
2020-05-20 20:08 ` [PATCH 1/2] Fix Makefile to delete objects from the library on make clean Jes Sorensen
2020-05-15 20:56 [PATCH 0/2] fsverity-utils Makefile fixes Jes Sorensen
2020-05-15 20:56 ` [PATCH 1/2] Fix Makefile to delete objects from the library on make clean Jes Sorensen
2020-05-20 2:42 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).