summaryrefslogtreecommitdiff
path: root/Build/source/texk/dviljk
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-31 09:47:04 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-31 09:47:04 +0000
commit15cca88e2666b7aae4e54112a21cb5c9bc312069 (patch)
tree8b31517b2e92f03da2b949831029cd9439ce7cef /Build/source/texk/dviljk
parent18662309a8be07470a0bc6294a1fddf5ffcb8d72 (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/dviljk')
-rw-r--r--Build/source/texk/dviljk/ChangeLog4
-rw-r--r--Build/source/texk/dviljk/Makefile.am49
-rw-r--r--Build/source/texk/dviljk/Makefile.in73
3 files changed, 52 insertions, 74 deletions
diff --git a/Build/source/texk/dviljk/ChangeLog b/Build/source/texk/dviljk/ChangeLog
index 18d70bb522d..76df090f945 100644
--- a/Build/source/texk/dviljk/ChangeLog
+++ b/Build/source/texk/dviljk/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * doc/Makefile.am: Use ../am/bin_links.am for $(bindir) links.
+
2011-05-25 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am (SUBDIRS): Add win32 to build C program dvihp
diff --git a/Build/source/texk/dviljk/Makefile.am b/Build/source/texk/dviljk/Makefile.am
index 2ae8e49c8a3..b875ff94b78 100644
--- a/Build/source/texk/dviljk/Makefile.am
+++ b/Build/source/texk/dviljk/Makefile.am
@@ -26,60 +26,43 @@ else !WIN32
dist_bin_SCRIPTS = dvihp
endif !WIN32
-dvilj_CPPFLAGS = -DKPATHSEA -DLJ
-
-dvilj_SOURCES = \
+dvi2xx_sources = \
commands.h \
config.h \
dvi2xx.c \
dvi2xx.h
+dvilj_CPPFLAGS = -DKPATHSEA -DLJ
+dvilj_SOURCES = $(dvi2xx_sources)
$(dvilj_OBJECTS): libdvilj.a
dvilj2p_CPPFLAGS = -DKPATHSEA -DLJ2P
-
-dvilj2p_SOURCES = \
- commands.h \
- config.h \
- dvi2xx.c \
- dvi2xx.h
-
+dvilj2p_SOURCES = $(dvi2xx_sources)
$(dvilj2p_OBJECTS): libdvilj.a
dvilj4_CPPFLAGS = -DKPATHSEA -DLJ4
-
-dvilj4_SOURCES = \
- commands.h \
- config.h \
- dvi2xx.c \
- dvi2xx.h
-
+dvilj4_SOURCES = $(dvi2xx_sources)
$(dvilj4_OBJECTS): libdvilj.a
dvilj4l_CPPFLAGS = -DKPATHSEA -DLJ4 -DLJ4L
-
-dvilj4l_SOURCES = \
- commands.h \
- config.h \
- dvi2xx.c \
- dvi2xx.h
-
+dvilj4l_SOURCES = $(dvi2xx_sources)
$(dvilj4l_OBJECTS): libdvilj.a
LDADD = libdvilj.a $(KPATHSEA_LIBS)
dvilj6_CPPFLAGS = -DEXEPROG=\"dvilj4.exe\"
-
dvilj6_SOURCES = $(srcdir)/../texlive/w32_wrapper/callexe.c
-
dvilj6_LDADD =
## Rebuild libkpathsea
@KPATHSEA_RULE@
+bin_links = dvilj4$(EXEEXT):dvilj6
+
+include $(top_srcdir)/../am/bin_links.am
+
dist_man1_MANS = dvihp.man dvilj.man
-# Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1
man1_links = \
dvilj:dvilj2p \
dvilj:dvilj4 \
@@ -88,19 +71,11 @@ man1_links = \
include $(top_srcdir)/../am/man1_links.am
-install-exec-hook:
-if !WIN32
- cd $(DESTDIR)$(bindir) && \
- rm -f dvilj6$(EXEEXT) && \
- $(LN_S) dvilj4$(EXEEXT) dvilj6$(EXEEXT)
-endif !WIN32
+install-exec-hook: install-bin-links
install-data-hook: install-man1-links
-uninstall-hook: uninstall-man1-links
-if !WIN32
- rm -f $(DESTDIR)$(bindir)/dvilj6$(EXEEXT)
-endif !WIN32
+uninstall-hook: uninstall-bin-links uninstall-man1-links
VERSION = `grep 'define VERSION' $(srcdir)/dvi2xx.c | sed -e 's/^.*version //' -e 's/).*//'`
if MAINTAINER_MODE
diff --git a/Build/source/texk/dviljk/Makefile.in b/Build/source/texk/dviljk/Makefile.in
index 119fad0d1f0..1ec2b1c4072 100644
--- a/Build/source/texk/dviljk/Makefile.in
+++ b/Build/source/texk/dviljk/Makefile.in
@@ -48,6 +48,7 @@ DIST_COMMON = README $(am__configure_deps) \
$(srcdir)/../../build-aux/ltmain.sh \
$(srcdir)/../../build-aux/missing $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/c-auto.in \
+ $(top_srcdir)/../am/bin_links.am \
$(top_srcdir)/../am/man1_links.am $(top_srcdir)/configure \
../../build-aux/config.guess ../../build-aux/config.sub \
../../build-aux/depcomp ../../build-aux/install-sh \
@@ -84,20 +85,24 @@ libdvilj_a_OBJECTS = $(am_libdvilj_a_OBJECTS)
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am_dvilj_OBJECTS = dvilj-dvi2xx.$(OBJEXT)
+am__objects_1 = dvilj-dvi2xx.$(OBJEXT)
+am_dvilj_OBJECTS = $(am__objects_1)
dvilj_OBJECTS = $(am_dvilj_OBJECTS)
dvilj_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
dvilj_DEPENDENCIES = libdvilj.a $(am__DEPENDENCIES_1)
-am_dvilj2p_OBJECTS = dvilj2p-dvi2xx.$(OBJEXT)
+am__objects_2 = dvilj2p-dvi2xx.$(OBJEXT)
+am_dvilj2p_OBJECTS = $(am__objects_2)
dvilj2p_OBJECTS = $(am_dvilj2p_OBJECTS)
dvilj2p_LDADD = $(LDADD)
dvilj2p_DEPENDENCIES = libdvilj.a $(am__DEPENDENCIES_1)
-am_dvilj4_OBJECTS = dvilj4-dvi2xx.$(OBJEXT)
+am__objects_3 = dvilj4-dvi2xx.$(OBJEXT)
+am_dvilj4_OBJECTS = $(am__objects_3)
dvilj4_OBJECTS = $(am_dvilj4_OBJECTS)
dvilj4_LDADD = $(LDADD)
dvilj4_DEPENDENCIES = libdvilj.a $(am__DEPENDENCIES_1)
-am_dvilj4l_OBJECTS = dvilj4l-dvi2xx.$(OBJEXT)
+am__objects_4 = dvilj4l-dvi2xx.$(OBJEXT)
+am_dvilj4l_OBJECTS = $(am__objects_4)
dvilj4l_OBJECTS = $(am_dvilj4l_OBJECTS)
dvilj4l_LDADD = $(LDADD)
dvilj4l_DEPENDENCIES = libdvilj.a $(am__DEPENDENCIES_1)
@@ -329,41 +334,26 @@ libdvilj_a_SOURCES = \
@WIN32_TRUE@SUBDIRS = win32
@WIN32_FALSE@dist_bin_SCRIPTS = dvihp
-dvilj_CPPFLAGS = -DKPATHSEA -DLJ
-dvilj_SOURCES = \
+dvi2xx_sources = \
commands.h \
config.h \
dvi2xx.c \
dvi2xx.h
+dvilj_CPPFLAGS = -DKPATHSEA -DLJ
+dvilj_SOURCES = $(dvi2xx_sources)
dvilj2p_CPPFLAGS = -DKPATHSEA -DLJ2P
-dvilj2p_SOURCES = \
- commands.h \
- config.h \
- dvi2xx.c \
- dvi2xx.h
-
+dvilj2p_SOURCES = $(dvi2xx_sources)
dvilj4_CPPFLAGS = -DKPATHSEA -DLJ4
-dvilj4_SOURCES = \
- commands.h \
- config.h \
- dvi2xx.c \
- dvi2xx.h
-
+dvilj4_SOURCES = $(dvi2xx_sources)
dvilj4l_CPPFLAGS = -DKPATHSEA -DLJ4 -DLJ4L
-dvilj4l_SOURCES = \
- commands.h \
- config.h \
- dvi2xx.c \
- dvi2xx.h
-
+dvilj4l_SOURCES = $(dvi2xx_sources)
LDADD = libdvilj.a $(KPATHSEA_LIBS)
dvilj6_CPPFLAGS = -DEXEPROG=\"dvilj4.exe\"
dvilj6_SOURCES = $(srcdir)/../texlive/w32_wrapper/callexe.c
dvilj6_LDADD =
+bin_links = dvilj4$(EXEEXT):dvilj6
dist_man1_MANS = dvihp.man dvilj.man
-
-# Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1
man1_links = \
dvilj:dvilj2p \
dvilj:dvilj4 \
@@ -379,7 +369,7 @@ all: c-auto.h
.SUFFIXES: .c .lo .o .obj
am--refresh:
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../am/man1_links.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../am/bin_links.am $(top_srcdir)/../am/man1_links.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -1139,16 +1129,29 @@ uninstall-man: uninstall-man1
$(libdvilj_a_OBJECTS): $(KPATHSEA_DEPEND)
-
$(dvilj_OBJECTS): libdvilj.a
-
$(dvilj2p_OBJECTS): libdvilj.a
-
$(dvilj4_OBJECTS): libdvilj.a
-
$(dvilj4l_OBJECTS): libdvilj.a
@KPATHSEA_RULE@
+.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
.PHONY: install-man1-links uninstall-man1-links
install-man1-links:
@@ -1167,15 +1170,11 @@ uninstall-man1-links:
rm -f $(DESTDIR)$(man1dir)/$$link.1; \
done
-install-exec-hook:
-@WIN32_FALSE@ cd $(DESTDIR)$(bindir) && \
-@WIN32_FALSE@ rm -f dvilj6$(EXEEXT) && \
-@WIN32_FALSE@ $(LN_S) dvilj4$(EXEEXT) dvilj6$(EXEEXT)
+install-exec-hook: install-bin-links
install-data-hook: install-man1-links
-uninstall-hook: uninstall-man1-links
-@WIN32_FALSE@ rm -f $(DESTDIR)$(bindir)/dvilj6$(EXEEXT)
+uninstall-hook: uninstall-bin-links uninstall-man1-links
@MAINTAINER_MODE_TRUE@dvilj.man: dvilj.pod dvi2xx.c
@MAINTAINER_MODE_TRUE@ pod2man --center="TeX-Live" --release="Version $(VERSION)" $< >$@
dvilj.ps: dvilj.man