diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-05-31 09:47:04 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-05-31 09:47:04 +0000 |
commit | 15cca88e2666b7aae4e54112a21cb5c9bc312069 (patch) | |
tree | 8b31517b2e92f03da2b949831029cd9439ce7cef /Build/source/texk/cjkutils | |
parent | 18662309a8be07470a0bc6294a1fddf5ffcb8d72 (diff) |
Use the Makefile fragment `bin_links.am' to create symlinks within $(bindir)
For cygwin always create links `foo->bar.exe' and not `foo.exe->bar.exe'
git-svn-id: svn://tug.org/texlive/trunk@22701 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/cjkutils')
-rw-r--r-- | Build/source/texk/cjkutils/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/cjkutils/Makefile.am | 44 | ||||
-rw-r--r-- | Build/source/texk/cjkutils/Makefile.in | 73 |
3 files changed, 70 insertions, 51 deletions
diff --git a/Build/source/texk/cjkutils/ChangeLog b/Build/source/texk/cjkutils/ChangeLog index 20d7cb5723e..5510635e5e3 100644 --- a/Build/source/texk/cjkutils/ChangeLog +++ b/Build/source/texk/cjkutils/ChangeLog @@ -1,3 +1,7 @@ +2011-05-30 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Makefile.am: Use ../am/bin_links.am for $(bindir) links. + 2010-12-18 Peter Breitenlohner <peb@mppmu.mpg.de> * Import cjk-4.8.2/utils as cjkutils-4.8.2, diff --git a/Build/source/texk/cjkutils/Makefile.am b/Build/source/texk/cjkutils/Makefile.am index 03b7b89052a..efdc603188e 100644 --- a/Build/source/texk/cjkutils/Makefile.am +++ b/Build/source/texk/cjkutils/Makefile.am @@ -1,6 +1,6 @@ ## Makefile.am for the TeX Live subdirectory texk/cjkutils/ ## -## Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> +## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## ACLOCAL_AMFLAGS = -I ../../m4 @@ -57,16 +57,16 @@ endif WIN32 ## and copy them to{bg5,cef5,cef,cefs,sjis}{,pdf}latex.exe. ## ## For Unix systems we install the {bg5,cef5,cef,cefs,gbk,sjis}{,pdf}latex -## shell scripts and create symlinks gbk{,pdf}latex -> bg5{,pdf}latex. +## shell scripts and create symlinks bg5+{,pdf}latex -> gbk{,pdf}latex. ## if WIN32 HOOK_DST = bg5 cef5 cef cefs sjis -HOOK_CMD = cp else !WIN32 -HOOK_DST = bg5+ -HOOK_CMD = $(LN_S) +bin_links = gbklatex:bg5+latex gbkpdflatex:bg5+pdflatex endif !WIN32 +include $(srcdir)/../am/bin_links.am + gbklatex_SOURCES = \ $(CJKUTILS_TREE)/cjklatex/cjklatex.c gbklatex_DEPENDENCIES = $(KPATHSEA_DEPEND) @@ -82,6 +82,21 @@ gbkpdflatex_LDADD = $(gbklatex_LDADD) if WIN32 bin_SCRIPTS = +install-exec-hook: + @cd $(DESTDIR)$(bindir) && \ + for p in latex pdflatex; do \ + for c in $(HOOK_DST); do \ + echo "cp gbk$$p$(EXEEXT) $$c$$p$(EXEEXT)"; \ + rm -f $$c$$p$(EXEEXT); cp gbk$$p$(EXEEXT) $$c$$p$(EXEEXT); \ + done; \ + done +uninstall-hook: + @for p in latex pdflatex; do \ + for c in $(HOOK_DST); do \ + echo "rm -f $(DESTDIR)$(bindir)/$$c$$p$(EXEEXT)"; \ + rm -f $(DESTDIR)$(bindir)/$$c$$p$(EXEEXT); \ + done; \ + done else !WIN32 bin_SCRIPTS = \ $(CJKUTILS_TREE)/Bg5conv/bg5latex \ @@ -96,25 +111,10 @@ bin_SCRIPTS = \ $(CJKUTILS_TREE)/SJISconv/sjispdflatex \ $(CJKUTILS_TREE)/extconv/gbklatex \ $(CJKUTILS_TREE)/extconv/gbkpdflatex +install-exec-hook: install-bin-links +uninstall-hook: uninstall-bin-links endif !WIN32 -install-exec-hook: - @cd $(DESTDIR)$(bindir) && \ - for p in latex pdflatex; do \ - for c in $(HOOK_DST); do \ - echo "$(HOOK_CMD) gbk$$p$(EXEEXT) $$c$$p$(EXEEXT)"; \ - rm -f $$c$$p$(EXEEXT); $(HOOK_CMD) gbk$$p$(EXEEXT) $$c$$p$(EXEEXT); \ - done; \ - done - -uninstall-hook: - @for p in latex pdflatex; do \ - for c in $(HOOK_DST); do \ - echo "rm -f $(DESTDIR)$(bindir)/$$c$$p$(EXEEXT)"; \ - rm -f $(DESTDIR)$(bindir)/$$c$$p$(EXEEXT); \ - done; \ - done - man1_MANS = \ $(CJKUTILS_TREE)/Bg5conv/bg5conv.1 \ $(CJKUTILS_TREE)/CEFconv/cef5conv.1 \ diff --git a/Build/source/texk/cjkutils/Makefile.in b/Build/source/texk/cjkutils/Makefile.in index 5b69f5b17a9..03870948156 100644 --- a/Build/source/texk/cjkutils/Makefile.in +++ b/Build/source/texk/cjkutils/Makefile.in @@ -43,20 +43,20 @@ bin_PROGRAMS = bg5conv$(EXEEXT) cefconv$(EXEEXT) cef5conv$(EXEEXT) \ @WIN32_TRUE@ gbklatex \ @WIN32_TRUE@ gbkpdflatex -subdir = . DIST_COMMON = $(am__configure_deps) \ $(srcdir)/../../build-aux/config.guess \ $(srcdir)/../../build-aux/config.sub \ $(srcdir)/../../build-aux/depcomp \ $(srcdir)/../../build-aux/install-sh \ $(srcdir)/../../build-aux/ltmain.sh \ - $(srcdir)/../../build-aux/missing $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/c-auto.in \ - $(top_srcdir)/configure ../../build-aux/config.guess \ - ../../build-aux/config.sub ../../build-aux/depcomp \ - ../../build-aux/install-sh ../../build-aux/ltmain.sh \ - ../../build-aux/missing ../../build-aux/texinfo.tex \ - ../../build-aux/ylwrap ChangeLog + $(srcdir)/../../build-aux/missing $(srcdir)/../am/bin_links.am \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/c-auto.in $(top_srcdir)/configure \ + ../../build-aux/config.guess ../../build-aux/config.sub \ + ../../build-aux/depcomp ../../build-aux/install-sh \ + ../../build-aux/ltmain.sh ../../build-aux/missing \ + ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog +subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -305,10 +305,8 @@ hbf2gf_SOURCES = \ hbf2gf_CPPFLAGS = -I$(srcdir)/$(CJKUTILS_TREE)/hbf2gf -Dunix -DHAVE_LIBKPATHSEA $(AM_CPPFLAGS) hbf2gf_DEPENDENCIES = $(KPATHSEA_DEPEND) hbf2gf_LDADD = $(KPATHSEA_LIBS) -@WIN32_FALSE@HOOK_DST = bg5+ @WIN32_TRUE@HOOK_DST = bg5 cef5 cef cefs sjis -@WIN32_FALSE@HOOK_CMD = $(LN_S) -@WIN32_TRUE@HOOK_CMD = cp +@WIN32_FALSE@bin_links = gbklatex:bg5+latex gbkpdflatex:bg5+pdflatex gbklatex_SOURCES = \ $(CJKUTILS_TREE)/cjklatex/cjklatex.c @@ -372,7 +370,7 @@ all: c-auto.h .SUFFIXES: .c .lo .o .obj am--refresh: @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../am/bin_links.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -1045,25 +1043,42 @@ dist-hook: config.force: $(KPATHSEA_DEPEND) echo timestamp >config.force $(SHELL) ./config.status --recheck +.PHONY: install-bin-links uninstall-bin-links + +install-bin-links: +@WIN32_FALSE@ @cd $(DESTDIR)$(bindir) && \ +@WIN32_FALSE@ for s in $(bin_links); do \ +@WIN32_FALSE@ link=`echo $$s | sed 's,.*:,,'`; \ +@WIN32_FALSE@ file=`echo $$s | sed 's,:.*,,'`; \ +@WIN32_FALSE@ rm -f $$link; \ +@WIN32_FALSE@ echo "creating link '$$link' -> '$$file'"; \ +@WIN32_FALSE@ $(LN_S) $$file $$link || exit 1; \ +@WIN32_FALSE@ done + +uninstall-bin-links: +@WIN32_FALSE@ @for s in $(bin_links); do \ +@WIN32_FALSE@ link=`echo $$s | sed 's,.*:,,'`; \ +@WIN32_FALSE@ rm -f $(DESTDIR)$(bindir)/$$link; \ +@WIN32_FALSE@ done @KPATHSEA_RULE@ - -install-exec-hook: - @cd $(DESTDIR)$(bindir) && \ - for p in latex pdflatex; do \ - for c in $(HOOK_DST); do \ - echo "$(HOOK_CMD) gbk$$p$(EXEEXT) $$c$$p$(EXEEXT)"; \ - rm -f $$c$$p$(EXEEXT); $(HOOK_CMD) gbk$$p$(EXEEXT) $$c$$p$(EXEEXT); \ - done; \ - done - -uninstall-hook: - @for p in latex pdflatex; do \ - for c in $(HOOK_DST); do \ - echo "rm -f $(DESTDIR)$(bindir)/$$c$$p$(EXEEXT)"; \ - rm -f $(DESTDIR)$(bindir)/$$c$$p$(EXEEXT); \ - done; \ - done +@WIN32_TRUE@install-exec-hook: +@WIN32_TRUE@ @cd $(DESTDIR)$(bindir) && \ +@WIN32_TRUE@ for p in latex pdflatex; do \ +@WIN32_TRUE@ for c in $(HOOK_DST); do \ +@WIN32_TRUE@ echo "cp gbk$$p$(EXEEXT) $$c$$p$(EXEEXT)"; \ +@WIN32_TRUE@ rm -f $$c$$p$(EXEEXT); cp gbk$$p$(EXEEXT) $$c$$p$(EXEEXT); \ +@WIN32_TRUE@ done; \ +@WIN32_TRUE@ done +@WIN32_TRUE@uninstall-hook: +@WIN32_TRUE@ @for p in latex pdflatex; do \ +@WIN32_TRUE@ for c in $(HOOK_DST); do \ +@WIN32_TRUE@ echo "rm -f $(DESTDIR)$(bindir)/$$c$$p$(EXEEXT)"; \ +@WIN32_TRUE@ rm -f $(DESTDIR)$(bindir)/$$c$$p$(EXEEXT); \ +@WIN32_TRUE@ done; \ +@WIN32_TRUE@ done +@WIN32_FALSE@install-exec-hook: install-bin-links +@WIN32_FALSE@uninstall-hook: uninstall-bin-links hbf2gf.dvi: $(CWEB_TEX) TEXINPUTS=.:$(srcdir):$$TEXINPUTS $(TEX) hbf2gf.tex |