From: Johnny Richard <johnny@johnnyrichard.com>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Johnny Richard <johnny@johnnyrichard.com>
Subject: [PATCH olang v1 2/4] build: add install/uninstall targets for man pages
Date: Tue, 17 Sep 2024 14:46:16 +0200 [thread overview]
Message-ID: <20240917124716.184501-3-johnny@johnnyrichard.com> (raw)
In-Reply-To: <20240917124716.184501-1-johnny@johnnyrichard.com>
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
---
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
next prev parent reply other threads:[~2024-09-17 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 12:46 [PATCH olang v1 0/4] build: add install and uninstall targets Johnny Richard
2024-09-17 12:46 ` [PATCH olang v1 1/4] build: add install/uninstall targets for info docs Johnny Richard
2024-09-17 12:46 ` Johnny Richard [this message]
2024-09-17 12:46 ` [PATCH olang v1 3/4] build: add install/uninstall targets for olang bin Johnny Richard
2024-09-17 12:46 ` [PATCH olang v1 4/4] docs: info: add instructions to install/uninstall olang Johnny Richard
2024-09-17 10:48 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-09-17 15:33 ` [PATCH olang v1 0/4] build: add install and uninstall targets Carlos Maniero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240917124716.184501-3-johnny@johnnyrichard.com \
--to=johnny@johnnyrichard.com \
--cc=~johnnyrichard/olang-devel@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.johnnyrichard.com/olang.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox