Skip to contentSkip to conversation

zlib: Replace negative logic in Makefile with positive

PATCH New Michael Roth 2 participants 2 messages Sep 29, 2009 – Sep 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zlib: Replace negative logic in Makefile with positive

Positive logic is easier to read and understand than something like 'if not option=yes then foo else bar'.

---
 package/zlib/zlib.mk |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
package/zlib/zlib.mk +5 -5
index 41d0632..a67a5e8 100644
@@ -18,14 +18,14 @@ $(ZLIB_DIR)/.patched: $(DL_DIR)/$(ZLIB_SOURCE)
 	$(CONFIG_UPDATE) $(@D)
 	touch $@
 
-ifneq ($(BR2_PREFER_STATIC_LIB),y)
-ZLIB_PIC := -fPIC
-ZLIB_SHARED := --shared
-ZLIB_TARGET := $(TARGET_DIR)/usr/lib/libz.so
-else
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
 ZLIB_PIC :=
 ZLIB_SHARED :=
 ZLIB_TARGET := $(STAGING_DIR)/usr/lib/libz.a
+else
+ZLIB_PIC := -fPIC
+ZLIB_SHARED := --shared
+ZLIB_TARGET := $(TARGET_DIR)/usr/lib/libz.so
 endif
 
 $(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.patched
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 zlib: Replace negative logic in Makefile with positive

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Michael" == Michael Roth <[email protected]> writes:

Michael> Positive logic is easier to read and understand than something Michael> like 'if not option=yes then foo else bar'.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard