summaryrefslogtreecommitdiff
path: root/Build/source/texk/am
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-02-08 07:21:38 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-02-08 07:21:38 +0000
commit4e0aa3cac68c35a0bd5e9d78b67e820ae9fea4d0 (patch)
tree0d79116a3741946d63b1c7a0ff7830aa23a0c86d /Build/source/texk/am
parent60e5f2d4b36e6e72fb9d1af137d2da6efbea5ed8 (diff)
Use a Makefile fragment to (un)install manpage links
git-svn-id: svn://tug.org/texlive/trunk@21344 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/am')
-rw-r--r--Build/source/texk/am/man.am4
-rw-r--r--Build/source/texk/am/man1_links.am26
2 files changed, 30 insertions, 0 deletions
diff --git a/Build/source/texk/am/man.am b/Build/source/texk/am/man.am
index 5fe5dedffe3..9d1e48c573c 100644
--- a/Build/source/texk/am/man.am
+++ b/Build/source/texk/am/man.am
@@ -1,4 +1,8 @@
## texk/am/man.am: Makefile fragment for kpathsea and web2c manual pages.
+##
+## Copyright (C) 2009 - 2011 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
## requires $(man_sources)
## requires $(KPATHSEA_PATHS_H) giving the directory of kpathsea/paths.h
diff --git a/Build/source/texk/am/man1_links.am b/Build/source/texk/am/man1_links.am
new file mode 100644
index 00000000000..e0d5aeeb1e2
--- /dev/null
+++ b/Build/source/texk/am/man1_links.am
@@ -0,0 +1,26 @@
+## texk/am/man1_links.am: Makefile fragment for manual page links.
+##
+## Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+## requires $(man1_links)
+## Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1
+.PHONY: install-man1-links uninstall-man1-links
+
+install-man1-links:
+ @cd $(DESTDIR)$(man1dir) && \
+ for s in $(man1_links); do \
+ link=`echo $$s | sed 's,.*:,,'`; \
+ file=`echo $$s | sed 's,:.*,,'`; \
+ rm -f $$link.1; \
+ echo "creating link '$$link.1' -> '$$file.1'"; \
+ $(LN_S) $$file.1 $$link.1 || exit 1; \
+ done
+
+uninstall-man1-links:
+ @for s in $(man1_links); do \
+ link=`echo $$s | sed 's,.*:,,'`; \
+ rm -f $(DESTDIR)$(man1dir)/$$link.1; \
+ done
+
+