help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU-make help


From: ElChino
Subject: GNU-make help
Date: Wed, 11 Feb 2015 00:42:11 +0100
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1

Hello list.

Supposed I want my GNU-make (v4.x) built program to support
and select among these SSL libs:
  OpenSSL, GnuTLS, BoringSSL, Windows SChannel etc.

But only 1 of them. Hence my Makefile checks could be like:

ifeq ($(ENABLE_OPENSSL),1)
  ifeq ($(ENABLE_BORINGSSL),1)
    $(error Cannot have ENABLE_OPENSSL=1 with ENABLE_BORINGSSL=1.)
  endif

  ifeq ($(ENABLE_GNUTLS),1)
    $(error Cannot set ENABLE_GNUTLS=1 with ENABLE_OPENSSL=1.)
  endif
endif
...

As you figure, the permutation of checks could become large.
I figured I could test the concatenation and length of:
  $(ENABLE_OPENSSL)$(ENABLE_GNUSSL)$(ENABLE_OPENSSL)$(ENABLE_SCHANNEL)

for a value with only 1 "bit" set. But how can I do that using
bash or GNU-make 4.x syntax?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]