From patchwork Sun Mar 24 22:21:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 2327291 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B32963FC54 for ; Sun, 24 Mar 2013 22:16:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754831Ab3CXWQy (ORCPT ); Sun, 24 Mar 2013 18:16:54 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:47053 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754812Ab3CXWQy (ORCPT ); Sun, 24 Mar 2013 18:16:54 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 8F12533DB61 for ; Sun, 24 Mar 2013 22:16:53 +0000 (UTC) From: Mike Frysinger To: linux-nfs@vger.kernel.org Subject: [PATCH [nfs-utils]] locktes/rpcgen: tweak how we override compiler settings Date: Sun, 24 Mar 2013 18:21:08 -0400 Message-Id: <1364163668-15490-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.8.1.2 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Newer autotools will use both CFLAGS and _CFLAGS when compiling the . Adding the build settings to the target-specific flags no longer works as a way to compile build-time tools. Instead, clobber the global flags. This triggers an automake warning, but the end result actually works (unlike the existing code). Signed-off-by: Mike Frysinger --- tools/locktest/Makefile.am | 7 +++---- tools/rpcgen/Makefile.am | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am index 3156815..efe6fcd 100644 --- a/tools/locktest/Makefile.am +++ b/tools/locktest/Makefile.am @@ -1,12 +1,11 @@ ## Process this file with automake to produce Makefile.in CC=$(CC_FOR_BUILD) -LIBTOOL = @LIBTOOL@ --tag=CC +CFLAGS=$(CFLAGS_FOR_BUILD) +CPPFLAGS=$(CPPFLAGS_FOR_BUILD) +LDFLAGS=$(LDFLAGS_FOR_BUILD) noinst_PROGRAMS = testlk testlk_SOURCES = testlk.c -testlk_CFLAGS=$(CFLAGS_FOR_BUILD) -testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD) MAINTAINERCLEANFILES = Makefile.in diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am index 8a9ec89..3adeec1 100644 --- a/tools/rpcgen/Makefile.am +++ b/tools/rpcgen/Makefile.am @@ -1,7 +1,9 @@ ## Process this file with automake to produce Makefile.in CC=$(CC_FOR_BUILD) -LIBTOOL = @LIBTOOL@ --tag=CC +CFLAGS=$(CFLAGS_FOR_BUILD) +CPPFLAGS=$(CPPFLAGS_FOR_BUILD) +LDFLAGS=$(LDFLAGS_FOR_BUILD) noinst_PROGRAMS = rpcgen rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ @@ -9,9 +11,6 @@ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \ rpc_scan.h rpc_util.h -rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD) -rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD) -rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD) rpcgen_LDADD=$(LIBTIRPC) MAINTAINERCLEANFILES = Makefile.in