From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B4E41158041 for ; Wed, 13 Mar 2024 04:52:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 07C1FE29F0; Wed, 13 Mar 2024 04:52:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E354EE29F0 for ; Wed, 13 Mar 2024 04:52:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 35BD133FE7D for ; Wed, 13 Mar 2024 04:52:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B72F5B29 for ; Wed, 13 Mar 2024 04:52:01 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1710305497.80ac76208eade31ad0df6b347481049c20608a39.robbat2@gentoo> Subject: [gentoo-commits] proj/fifo-cronolog:master commit in: / X-VCS-Repository: proj/fifo-cronolog X-VCS-Files: .gitignore Makefile X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 80ac76208eade31ad0df6b347481049c20608a39 X-VCS-Branch: master Date: Wed, 13 Mar 2024 04:52:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 727991c4-b805-464e-bd96-bd6d47e5e421 X-Archives-Hash: 447f9b8f0f286988cf8e5d3ee529df43 commit: 80ac76208eade31ad0df6b347481049c20608a39 Author: Robin H. Johnson gentoo org> AuthorDate: Wed Mar 13 04:51:37 2024 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Wed Mar 13 04:51:37 2024 +0000 URL: https://gitweb.gentoo.org/proj/fifo-cronolog.git/commit/?id=80ac7620 build: add hacky dist rule Signed-off-by: Robin H. Johnson gentoo.org> .gitignore | 4 +++- Makefile | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 29b8ac9..718dc26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ - *.o fifo-cronolog +*.tgz +*.tar.gz +*.tar diff --git a/Makefile b/Makefile index 7894e74..74c132a 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,14 @@ BINDIR = /usr/sbin/ SYSTEMD_TARGET = /usr/lib/systemd/system/ SYSTEMD_UNIT = systemd/fifo-cronolog@.service +VERSION = $(shell awk -F'"' '/#define VERSION/{print $$2}' $(SRC) ) +DISTFILE_EXT = tar.gz +DISTFILE = $(BIN)-$(VERSION).$(DISTFILE_EXT) + +dist: + if test -e $(DISTFILE) ; then echo "$(DISTFILE) already exists" ; exit 1 ; fi + git archive --format $(DISTFILE_EXT) --prefix $(BIN)-$(VERSION)/ v$(VERSION) >$(DISTFILE).tmp && mv $(DISTFILE).tmp $(DISTFILE) + all: $(BIN) $(BIN): $(OBJ)