~ubuntu-branches/ubuntu/raring/luatex/raring

« back to all changes in this revision

Viewing changes to source/texk/am/script_links.am

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2011-05-20 09:40:39 UTC
  • mfrom: (0.8.1) (1.8.1) (19.2.3 oneiric)
  • Revision ID: package-import@ubuntu.com-20110520094039-7sezr4kqonjqxqz6
Tags: 0.70.1-1
* new upstream release (probably) matching TeX Live 2011
* deactivate fix-luatex-build-with-old-libpng patch, included upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## texk/am/perl_links.am: Makefile fragment for perl script links.
 
2
##
 
3
## Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
 
4
## You may freely use, modify and/or distribute this file.
 
5
##
 
6
## requires conditionals WIN32 and WIN32_WRAP
 
7
## requires $(scriptsdir): e.g., texmf/scripts/chktex
 
8
## requires $(perl_scripts): e.g., deweb
 
9
## optional $(shell_scripts): e.g. htlatex
 
10
## appends to $(nodist_bin_SCRIPTS)
 
11
.PHONY: install-perl-links make-perl-links \
 
12
        install-shell-links make-shell-links uninstall-links
 
13
 
 
14
all_scripts = $(perl_scripts) $(shell_scripts)
 
15
 
 
16
if WIN32
 
17
if WIN32_WRAP
 
18
## We treat the WIN32 wrappers as SCRIPTS to avoid automatic build rules
 
19
wrappers = $(all_scripts:=.exe)
 
20
nodist_bin_SCRIPTS += $(wrappers)
 
21
runscript = $(top_srcdir)/../../texk/texlive/w32_wrapper/runscript.exe
 
22
$(wrappers): $(runscript)
 
23
        $(LN_S) $(runscript) $@
 
24
endif WIN32_WRAP
 
25
endif WIN32
 
26
 
 
27
# We support both multiplatform and non-multiplatform builds.
 
28
install-perl-links:
 
29
if !WIN32
 
30
        case "$(bindir)" in \
 
31
          */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. make-perl-links;; \
 
32
          */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. make-perl-links;; \
 
33
          *) echo "strange directory '$(bindir)' for linked scripts" >&2; \
 
34
             exit 1;; \
 
35
        esac
 
36
endif !WIN32
 
37
 
 
38
install-shell-links:
 
39
if !WIN32
 
40
        case "$(bindir)" in \
 
41
          */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. make-shell-links;; \
 
42
          */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. make-shell-links;; \
 
43
          *) echo "strange directory '$(bindir)' for linked scripts" >&2; \
 
44
             exit 1;; \
 
45
        esac
 
46
endif !WIN32
 
47
 
 
48
make-perl-links:
 
49
        @cd $(DESTDIR)$(bindir) && \
 
50
          for f in $(perl_scripts); do \
 
51
            rm -f $$f; \
 
52
            echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.pl'"; \
 
53
            $(LN_S) $(REL)/$(scriptsdir)/$$f.pl $$f || exit 1; \
 
54
          done  
 
55
 
 
56
make-shell-links:
 
57
        @cd $(DESTDIR)$(bindir) && \
 
58
          for f in $(shell_scripts); do \
 
59
            rm -f $$f; \
 
60
            echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.sh'"; \
 
61
            $(LN_S) $(REL)/$(scriptsdir)/$$f.sh $$f || exit 1; \
 
62
          done
 
63
 
 
64
uninstall-links:
 
65
if !WIN32
 
66
        @for f in $(all_scripts); do \
 
67
          echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \
 
68
          rm -f "$(DESTDIR)$(bindir)/$$f"; \
 
69
        done
 
70
endif !WIN32
 
71