From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id nKM5Nw/FBWCvIgAAWB0awg (envelope-from ) for ; Mon, 18 Jan 2021 12:27:43 -0500 Received: by simark.ca (Postfix, from userid 112) id D0AEE1EF80; Mon, 18 Jan 2021 12:27:43 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E3E091E940 for ; Mon, 18 Jan 2021 12:27:42 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 704543864877; Mon, 18 Jan 2021 17:27:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 704543864877 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610990862; bh=eSOou405TUgjHzBZ8hWtIyp/xJWMa+1qBitvnc/M+GE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=sSq7vEfGg5kHLlBeQmJBIcer6ZlQA954R0moMkFbX0prbPwL84y0sysulc70Oliyv 7Dc+NJ12zeXdHpELda51Hq4Wy6aGDPFYhLpiy+QklYsGS5uH5tnSEmEKDmcIdZX1Qw 5N8D/Z8qXAuENjQKOTrxy8z9Ub704+LdC9sEjbvU= Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 078FC3864877 for ; Mon, 18 Jan 2021 17:27:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 078FC3864877 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 3A9E9340E3B for ; Mon, 18 Jan 2021 17:27:39 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH/committed v2] sim: common: simplify version script Date: Mon, 18 Jan 2021 12:27:37 -0500 Message-Id: <20210118172737.2800-1-vapier@gentoo.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210118095726.GO265215@embecosm.com> References: <20210118095726.GO265215@embecosm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" We don't use the host & target aliases, so don't bother emitting them. --- sim/common/ChangeLog | 6 ++++++ sim/common/Make-common.in | 5 +++-- sim/common/create-version.sh | 17 ++++++----------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index beca012b601f..8ab1c903fff5 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,9 @@ +2021-01-18 Mike Frysinger + + * Make-common.in (version.c): Simplifiy args and call move-if-change. + * create-version.sh: Delete host & target alias logic. Write to the + output directly. + 2021-01-18 Mike Frysinger * configure, configure.ac, Makefile.in: Delete. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 6e7193044305..8740a4a079e7 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -291,8 +291,9 @@ stamp-tvals: gentmap touch stamp-tvals version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/sim/common/create-version.sh - $(SHELL) $(srcroot)/sim/common/create-version.sh $(srcroot)/gdb \ - $(host_alias) $(target_alias) version.c + $(SHELL) $(srcroot)/sim/common/create-version.sh $(srcroot)/gdb $@.tmp + $(SHELL) $(srcroot)/move-if-change $@.tmp $@ + touch $@ # # Rules for building sim-* components. Triggered by listing the corresponding diff --git a/sim/common/create-version.sh b/sim/common/create-version.sh index 5252c3b8bd80..7b35e87e2150 100755 --- a/sim/common/create-version.sh +++ b/sim/common/create-version.sh @@ -23,16 +23,11 @@ # TARGET_ALIAS OUTPUT-FILE-NAME srcdir="$1" -host_alias="$2" -target_alias="$3" -output="$4" +output="$2" -rm -f version.c-tmp $output version.tmp date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../bfd/version.h` -sed -e "s/DATE/$date/" < $srcdir/version.in > version.tmp -echo '#include "version.h"' >> version.c-tmp -echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp -echo 'const char host_name[] = "'"$host_alias"'";' >> version.c-tmp -echo 'const char target_name[] = "'"$target_alias"'";' >> version.c-tmp -mv version.c-tmp $output -rm -f version.tmp +ver=`sed -e "s/DATE/$date/;q" $srcdir/version.in` +( +echo '#include "version.h"' +echo 'const char version[] = "'"${ver}"'";' +) >"${output}" -- 2.28.0