summaryrefslogtreecommitdiff
path: root/Build/source/utils/ps2eps/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/ps2eps/Makefile.am')
-rw-r--r--Build/source/utils/ps2eps/Makefile.am50
1 files changed, 46 insertions, 4 deletions
diff --git a/Build/source/utils/ps2eps/Makefile.am b/Build/source/utils/ps2eps/Makefile.am
index e0c4a4ce3fe..55e463af293 100644
--- a/Build/source/utils/ps2eps/Makefile.am
+++ b/Build/source/utils/ps2eps/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for the TeX Live subdirectory utils/ps2eps/
##
-## 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
@@ -21,10 +21,52 @@ bin_PROGRAMS = bbox
bbox_SOURCES = \
$(PS2EPS_TREE)/src/C/bbox.c
-bin_SCRIPTS = \
- $(PS2EPS_TREE)/bin/ps2eps
-
man1_MANS = \
$(PS2EPS_TREE)/doc/man/man1/bbox.1 \
$(PS2EPS_TREE)/doc/man/man1/ps2eps.1
+perl_scripts = ps2eps
+
+scriptsdir = texmf/scripts/ps2eps
+texmfdir = ${prefix}/$(scriptsdir)
+nodist_texmf_SCRIPTS = $(PS2EPS_TREE)/bin/ps2eps.pl
+
+if WIN32
+if WIN32_WRAP
+## We treat the WIN32 wrappers as SCRIPTS to avoid automatic build rules
+nodist_bin_SCRIPTS = $(perl_scripts:=.exe)
+runscript = $(srcdir)/../../texk/texlive/w32_wrapper/runscript.exe
+$(nodist_bin_SCRIPTS): $(runscript)
+ $(LN_S) $(runscript) $@
+endif WIN32_WRAP
+endif WIN32
+
+install-data-hook:
+if !WIN32
+ case "$(bindir)" in \
+ */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. install-links;; \
+ */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. install-links;; \
+ *) echo "strange directory '$(bindir)' for linked scripts" >&2; \
+ exit 1;; \
+ esac
+endif !WIN32
+
+.PHONY: install-links
+install-links:
+ @cd $(DESTDIR)$(bindir) && \
+ for f in $(perl_scripts); do \
+ rm -f $$f; \
+ echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.pl'"; \
+ $(LN_S) $(REL)/$(scriptsdir)/$$f.pl $$f || exit 1; \
+ done
+
+uninstall-hook:
+if !WIN32
+ @for f in $(perl_scripts); do \
+ echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+endif !WIN32
+
+CLEANFILES = $(nodist_bin_SCRIPTS)
+