From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WK72B01e6WZpdQAAqHPOHw:P1 (envelope-from ) for ; Tue, 17 Sep 2024 12:47:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id WK72B01e6WZpdQAAqHPOHw (envelope-from ) for ; 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 147F310593 for ; Tue, 17 Sep 2024 12:47:41 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=iAgcrFJflF89D7Rce2KAhwfc4OkhiS/yEHacGp+S6KA=; 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=aVkq5U9kEqO9XdYUT0FEzjWzGVIg1zkQpRNim+uU2u4zSSLegVaZCaMx49E7KhN3NHQUcvCr /ClCp6jbkgv1x5d5HCbCRfZqa3dCYuszuy3PKSssyFK07UWdIwvjwCDEM9T0uRB6w653qXpY54G 95xsWls7932M9YP8aIIPHKSPEIp+J8dJjqy5od8opGeoOsr697LrJXu7CPerN9YyqPjJFvpjVWC qKDUskYfPA2N2WyIgQKyzvrBezWZsPCpFLp3q53fK9JL2QwMwTKwpvSm5Kkndu7nvviwsDPAtD/ stBoEHIE9UEoccyqkqrXA1rvz3ApqfRebd67TufuJQA7A== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id EF07320252 for ; Tue, 17 Sep 2024 10:47:40 +0000 (UTC) Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) by mail-a.sr.ht (Postfix) with ESMTPS id 434242022F 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=17pWPnKrtvN95uJqY5FYIRxd81mmb1CeQm+6mGmYBPk=; b=UTsfMDa1RYb/FRAE7UZfOBgkNSA7xaXEYg7XrGKPEI51xnaV/uLUxodJ09iV1iBES9wieY g6KeyaKysfkq/e5IVK9yHz4UTzVTVg1P01I05phi9ysmf/kMX0wlA4jxnOHSbzBN8GyZka RpDMljxaxVaa00hylBBkZlcB6i1reSIKjhge5r9/LawN8BKx/uGD41jdfDrXaVsyfjEfoT buElHYJLNP0vNrs8UEbhMAbfAUD8IwO6I+JIVzGfH/QSrq1GY4V30iq4vgIh7mFlScRx3n qq6NOryDDShXBYGJAJaQ4TOeErV0KXQHQb/Vh28zgMtDBnde9kChzmgJyF1Kog== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang v1 2/4] build: add install/uninstall targets for man pages Date: Tue, 17 Sep 2024 14:46:16 +0200 Message-ID: <20240917124716.184501-3-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: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Country: NL X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 X-Spam-Score: -4.00 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 147F310593 X-TUID: ddppOMlfLAKC Signed-off-by: Johnny Richard --- Makefile | 20 ++++++++++++++++++-- docs/Makefile | 11 +---------- docs/{manpages => man/man1}/olang.1 | 2 -- 3 files changed, 19 insertions(+), 14 deletions(-) rename docs/{manpages => man/man1}/olang.1 (99%) diff --git a/Makefile b/Makefile index 120cb7f..35f0283 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ BINDIR ?= ${PREFIX}/bin DATADIR ?= ${PREFIX}/share INFODIR ?= ${DATADIR}/info MANDIR ?= ${DATADIR}/man +MAN1DIR ?= ${MANDIR}/man1 SRCDIR := src BUILDDIR := build @@ -30,7 +31,15 @@ info: olang.info # install target .PHONY: install -install: install-info +install: install-man install-info + +.PHONY: install-man +install-man: install-man1 + +.PHONY: install-man1 +install-man1: docs/man/man1/olang.1 + install -Dm 644 docs/man/man1/olang.1 ${DESTDIR}${MAN1DIR}/olang.1 + gzip -f ${DESTDIR}${MAN1DIR}/olang.1 .PHONY: install-info install-info: olang.info @@ -40,7 +49,14 @@ install-info: olang.info # uninstall target .PHONY: uninstall -uninstall: uninstall-info +uninstall: uninstall-man uninstall-info + +.PHONY: uninstall-man +uninstall-man: uninstall-man1 + +.PHONY: uninstall-man1 +uninstall-man1: + @rm -f ${DESTDIR}${MAN1DIR}/olang.1.gz .PHONY: uninstall-info uninstall-info: diff --git a/docs/Makefile b/docs/Makefile index f069ff1..a17c1d6 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,10 +5,9 @@ SITE_DIR := $(BUILD_DIR)/site TARGET := $(SITE_DIR)/index.html DIST_FILE := site.tar.gz STYLE := style.css -MANPAGES := $(BUILD_DIR)/man .PHONY: all -all: $(BUILD_DIR) $(STYLE) $(TARGET) manpages manual +all: $(BUILD_DIR) $(STYLE) $(TARGET) manual .PHONY: clean clean: @@ -19,16 +18,9 @@ clean: .PHONY: dist dist: $(DIST_FILE) -.PHONY: manpages -manpages: $(BUILD_DIR) $(MANPAGES)/olang.1 - .PHONY: manual manual: $(SITE_DIR)/manual/index.html - -$(MANPAGES)/%.1: manpages/%.1 - @cp $< $@ - $(DIST_FILE): all tar -czf $(DIST_FILE) -C $(SITE_DIR) . @@ -38,7 +30,6 @@ $(TARGET): index.html $(BUILD_DIR): @mkdir -p $@ @mkdir -p $(SITE_DIR) - @mkdir -p $(MANPAGES) $(STYLE): $(BUILD_DIR) cp style.css $(SITE_DIR) diff --git a/docs/manpages/olang.1 b/docs/man/man1/olang.1 similarity index 99% rename from docs/manpages/olang.1 rename to docs/man/man1/olang.1 index fed1e4e..fa6544f 100644 --- a/docs/manpages/olang.1 +++ b/docs/man/man1/olang.1 @@ -39,12 +39,10 @@ Keep temp files used to compile program .TP .BI \-\-arch\ arch - Binary arch: default to "x86_64", avaliable options ("x86_64" | "aarch64") .TP .BI \-\-sysroot\ dir - System root dir where the GNU Assembler and GNU Linker are located: default to '/' -- 2.46.0