From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <lists@sr.ht>
Received: from mp2.migadu.com ([2001:41d0:403:58f0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms5.migadu.com with LMTPS
	id 2C3EJk1e6WYaAAAAe85BDQ:P1
	(envelope-from <lists@sr.ht>)
	for <patches@johnnyrichard.com>; Tue, 17 Sep 2024 12:47:41 +0200
Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp2.migadu.com with LMTPS
	id 2C3EJk1e6WYaAAAAe85BDQ
	(envelope-from <lists@sr.ht>)
	for <patches@johnnyrichard.com>; Tue, 17 Sep 2024 12:47:41 +0200
X-Envelope-To: patches@johnnyrichard.com
Authentication-Results: aspmx1.migadu.com;
	none
Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152])
	(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 aspmx1.migadu.com (Postfix) with ESMTPS id 89F117FA76
	for <patches@johnnyrichard.com>; Tue, 17 Sep 2024 12:47:41 +0200 (CEST)
DKIM-Signature: a=rsa-sha256; bh=IYp/W/nOif0e8yZMd4Aey7w+RYvp9z9UQ721NmJyruM=;
 c=simple/simple; d=lists.sr.ht;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID;
 q=dns/txt; s=20240113; t=1726570061; v=1;
 b=P2dxxcqPUeu6suwYm22ZAlLYa3FF+NpXDuaXypQpk5zbkNXe9glVezCD53cJuYp95TfzbZRb
 Xf/FghWFwnxVnCUBHAwzKrSKV+B2bJ2T84cmb6CBbLd/fKCwv8lDMQwhMZ23XbzthLgbYSEJscc
 JC3Tp3ZPw+IKWru8ordA6mO7a9NB6tfccgQXtDqB9HpHDDWVUdsyjCoGeOQq/qhNrRimNQFwSFc
 f57rZSEfH9QYidVm7Z+X3yR5V4sO+rU0Ra8lBUAlzBGcDP+2Q+x2/4mNAL4rtFQgJTtGQRGjV+Y
 lRYxZOJYKWYJJpyn0zugqWjOm6uhfXYX+AhRGtBnB2NaQ==
Received: from lists.sr.ht (unknown [46.23.81.154])
	by mail-a.sr.ht (Postfix) with ESMTPSA id 30EC72022F
	for <patches@johnnyrichard.com>; Tue, 17 Sep 2024 10:47:41 +0000 (UTC)
Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180])
	by mail-a.sr.ht (Postfix) with ESMTPS id 7B9D920242
	for <~johnnyrichard/olang-devel@lists.sr.ht>; Tue, 17 Sep 2024 10:47:40 +0000 (UTC)
X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com;
	s=key1; t=1726570060;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=WcaS+ZHmjdchYGMq+wSvOG9AzPFy6DORYVzVaKwKZtg=;
	b=D21DNwq2ICWYJtjOHgf6AQP8XdzNJOIrdpUOUDLUY/HdcpwqX2xw5wP+WXa1fUmjghDSnQ
	F11sFS4X/A7/dVaia/FhTjmDTqVtUN31pTc9MwgT3i0pzunijUQPlfQwmkH98hSpu3Z12a
	XVugx+XQQ+ZgTp8bDni70svTLUi4P3K01720epOyGwa9aM6dCdikBVdFWbTXt9h0g5ARxf
	zZI6KsxcTNwGyh3496CA/orrEhICBQO7HSGVBLpExtlYQ98K1qaEfDEiae50Q89+/kfcmZ
	88bjthGLjk+Zlg1spjg5Bx0rnIEQKMKd3lRrOw2kFCgx7CRibFRfLtSxgBqpXQ==
From: Johnny Richard <johnny@johnnyrichard.com>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Johnny Richard <johnny@johnnyrichard.com>
Subject: [PATCH olang v1 3/4] build: add install/uninstall targets for olang bin
Date: Tue, 17 Sep 2024 14:46:17 +0200
Message-ID: <20240917124716.184501-4-johnny@johnnyrichard.com>
In-Reply-To: <20240917124716.184501-1-johnny@johnnyrichard.com>
References: <20240917124716.184501-1-johnny@johnnyrichard.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Sourcehut-Patchset-Status: UNKNOWN
List-Unsubscribe: <mailto:~johnnyrichard/olang-devel+unsubscribe@lists.sr.ht?subject=unsubscribe>
List-Subscribe: <mailto:~johnnyrichard/olang-devel+subscribe@lists.sr.ht?subject=subscribe>
List-Archive: <https://lists.sr.ht/~johnnyrichard/olang-devel>
Archived-At: <https://lists.sr.ht/~johnnyrichard/olang-devel/%3C20240917124716.184501-4-johnny%40johnnyrichard.com%3E>
List-Post: <mailto:~johnnyrichard/olang-devel@lists.sr.ht>
List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht>
Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht>
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: NL
X-Migadu-Queue-Id: 89F117FA76
X-Migadu-Scanner: mx11.migadu.com
X-Spam-Score: -4.00
X-Migadu-Spam-Score: -4.00
X-TUID: 1RtqyLp3RSEK

Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
---
 Makefile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 35f0283..12b09a4 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,11 @@ info: olang.info
 # install target
 
 .PHONY: install
-install: install-man install-info
+install: install-bin install-man install-info
+
+.PHONY: install-bin
+install-bin: $(TARGET)
+	install -Dm755 $< ${DESTDIR}${BINDIR}/$<
 
 .PHONY: install-man
 install-man: install-man1
@@ -49,7 +53,11 @@ install-info: olang.info
 # uninstall target
 
 .PHONY: uninstall
-uninstall: uninstall-man uninstall-info
+uninstall: uninstall-bin uninstall-man uninstall-info
+
+.PHONY: uninstall-bin
+uninstall-bin: ${DESTDIR}${BINDIR}/olang
+	@rm -f ${DESTDIR}${BINDIR}/olang
 
 .PHONY: uninstall-man
 uninstall-man: uninstall-man1
-- 
2.46.0