From 0385e9d3d28dbace1719858af437c9a7ab76e218 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mon, 6 Nov 2017 16:27:25 -0500 Subject: [PATCH] conmon,pause: strip binary only if non-distro build strip binaries only if $DISTRO_BUILD isn't defined rpmbuild handles binary stripping automagically, so running the strip command via Makefile isn't any use to distro packages. With this commit, the rpm specfile can use `DISTRO_BUILD=1 make conmon pause` to generate unstripped binaries. Signed-off-by: Lokesh Mandvekar --- conmon/Makefile | 3 +++ pause/Makefile | 2 ++ 2 files changed, 5 insertions(+) diff --git a/conmon/Makefile b/conmon/Makefile index b75605d9..2e024be5 100644 --- a/conmon/Makefile +++ b/conmon/Makefile @@ -6,6 +6,9 @@ override CFLAGS += -std=c99 -Os -Wall -Wextra $(shell pkg-config --cflags glib-2 conmon: $(obj) $(CC) -o ../bin/$@ $^ $(CFLAGS) $(LIBS) +ifndef DISTRO_BUILD + strip ../bin/$@ +endif .PHONY: clean clean: diff --git a/pause/Makefile b/pause/Makefile index f0951af7..b8c198b7 100644 --- a/pause/Makefile +++ b/pause/Makefile @@ -6,7 +6,9 @@ override CFLAGS += -std=c99 -Os -Wall -Wextra -static pause: $(obj) $(CC) -o ../bin/$@ $^ $(CFLAGS) $(LIBS) +ifndef DISTRO_BUILD strip ../bin/$@ +endif .PHONY: clean clean: