From cbc4d448642a0457384b8935663ee047e3623025 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sat, 14 May 2016 00:29:45 +0300 Subject: [PATCH] [PATCH] configure: combine common parts of CONFIGURE_C{,XX}FLAGS --- df/88aeb039898b71d7c2cef1552e17ac33275d66 | 126 ++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 df/88aeb039898b71d7c2cef1552e17ac33275d66 diff --git a/df/88aeb039898b71d7c2cef1552e17ac33275d66 b/df/88aeb039898b71d7c2cef1552e17ac33275d66 new file mode 100644 index 000000000..c929aef95 --- /dev/null +++ b/df/88aeb039898b71d7c2cef1552e17ac33275d66 @@ -0,0 +1,126 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 3FD686DE0317 + for ; Fri, 13 May 2016 14:30:07 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.656 +X-Spam-Level: +X-Spam-Status: No, score=0.656 tagged_above=-999 required=5 tests=[AWL=-0.126, + HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01, + UPPERCASE_50_75=0.791] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id dQj-6Ix_SCqe for ; + Fri, 13 May 2016 14:29:58 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id B77D76DE02B2 + for ; Fri, 13 May 2016 14:29:57 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 1E73B10008D; Sat, 14 May 2016 00:29:47 +0300 (EEST) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Cc: tomi.ollila@iki.fi +Subject: [PATCH] configure: combine common parts of CONFIGURE_C{,XX}FLAGS +Date: Sat, 14 May 2016 00:29:45 +0300 +Message-Id: <1463174985-20654-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 2.8.2 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 13 May 2016 21:30:07 -0000 + +By combining the common parts of CONFIGURE_CFLAGS and CONFIGURE_CXXFLAGS +to a separate make variable and using that as part of their +definitions makes setting of these easier, DRYer and less error prone +(especially as we cannot check potential typing errors there). +--- + +This patch requires (at least patches 1-4) from David's "libconfig..." +series ( id:1463135893-7471-1-git-send-email-david@tethera.net ). + +I made slight reordering of the now common flags. these 4 first lines +in added lines basically shows that all flags in removed lines are there +(and XAPIAN_CXXFLAGS is the only thing differing in CONFIGURE_CXXFLAGS). + +> + \$(GMIME_CFLAGS) \$(TALLOC_CFLAGS) \$(ZLIB_CFLAGS) \\ +> + -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \$(VALGRIND_CFLAGS) \\ +> + -DHAVE_GETLINE=\$(HAVE_GETLINE) \\ +> + -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\ + + + configure | 47 ++++++++++++++++++----------------------------- + 1 file changed, 18 insertions(+), 29 deletions(-) + +diff --git a/configure b/configure +index eb143b2..1cb71ff 100755 +--- a/configure ++++ b/configure +@@ -1082,35 +1082,24 @@ WITH_BASH = ${WITH_BASH} + WITH_ZSH = ${WITH_ZSH} + + # Combined flags for compiling and linking against all of the above +-CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ +- -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\ +- \$(ZLIB_CFLAGS) \\ +- \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\ +- \$(VALGRIND_CFLAGS) \\ +- -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\ +- -DHAVE_STRSEP=\$(HAVE_STRSEP) \\ +- -DHAVE_TIMEGM=\$(HAVE_TIMEGM) \\ +- -DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\ +- -DSTD_GETPWUID=\$(STD_GETPWUID) \\ +- -DSTD_ASCTIME=\$(STD_ASCTIME) \\ +- -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\ +- -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\ +- -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER) +- +-CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ +- -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\ +- \$(ZLIB_CFLAGS) \\ +- \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\ +- \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS) \\ +- -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\ +- -DHAVE_STRSEP=\$(HAVE_STRSEP) \\ +- -DHAVE_TIMEGM=\$(HAVE_TIMEGM) \\ +- -DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\ +- -DSTD_GETPWUID=\$(STD_GETPWUID) \\ +- -DSTD_ASCTIME=\$(STD_ASCTIME) \\ +- -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\ +- -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\ +- -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER) ++COMMON_CONFIGURE_CFLAGS = \\ ++ \$(GMIME_CFLAGS) \$(TALLOC_CFLAGS) \$(ZLIB_CFLAGS) \\ ++ -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \$(VALGRIND_CFLAGS) \\ ++ -DHAVE_GETLINE=\$(HAVE_GETLINE) \\ ++ -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\ ++ -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\ ++ -DHAVE_STRSEP=\$(HAVE_STRSEP) \\ ++ -DHAVE_TIMEGM=\$(HAVE_TIMEGM) \\ ++ -DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\ ++ -DSTD_GETPWUID=\$(STD_GETPWUID) \\ ++ -DSTD_ASCTIME=\$(STD_ASCTIME) \\ ++ -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\ ++ -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\ ++ -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER) ++ ++CONFIGURE_CFLAGS = \$(COMMON_CONFIGURE_CFLAGS) ++ ++CONFIGURE_CXXFLAGS = \$(COMMON_CONFIGURE_CFLAGS) \$(XAPIAN_CXXFLAGS) + + CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS) + EOF +-- +2.8.2 + -- 2.26.2