]> git.lyx.org Git - lyx.git/blob - development/tools/lxtl.sh
Finish ControlSendto.
[lyx.git] / development / tools / lxtl.sh
1 #!/bin/sh
2 #
3 # Author:  Allan Rae <rae@lyx.org>
4 #
5 # Copy xtl files ready for internal use.
6
7 usage () {
8         echo "usage:  lxtl.sh <version-number>">&2
9         echo "        <version-number> is required and should be of the form" >&2
10         echo "        'XTL-x.y.pl.z' where x, y and z are digits." >&2
11         echo "" >&2
12         echo "Run this from the root of the xtl source tree." >&2
13         echo "Everything LyX needs will be moved into lxtl/" >&2
14         echo "you then 'cp lxtl/* /path-to-lyx/src/xtl/'" >&2
15         exit 0
16 }
17
18
19 if [ ! -d ./include/xtl ] ; then
20         usage
21 fi
22
23 if [ -d ./lxtl ]; then
24         echo "Uh oh!  There's a directory called lxtl here already." >&2
25         echo "I'm going to delete it unless you press <Ctrl><C> right now!" >&2
26         read aline
27         rm -rf lxtl
28 fi
29
30 if [ $# -lt 1 ]; then
31         usage
32 fi
33
34 mkdir lxtl
35
36 cp COPYING.LIB lxtl
37 cat > lxtl/README <<EOF
38 $1
39 This directory contains the subset of XTL required by LyX.
40 The full distribution includes extensive tests and documentation.
41 If you encounter compiler errors in xtl code when compiling LyX please
42 get a copy of the full distribution and run the regression tests on your
43 system. Report any problems found to the xtl mailing list.
44
45 See:  http://gsd.di.uminho.pt/jop/xtl/
46
47 -------------------------===========================----------------------
48
49 EOF
50
51 cat README >> lxtl/README
52
53 cat > lxtl/Makefile.am <<\EOF
54 AUTOMAKE_OPTIONS = foreign 1.4
55 DISTCLEANFILES= *.orig *.rej *~ *.bak core 
56 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
57 EXTRA_DIST = README COPYING.LIB
58 ETAGS_ARGS = --lang=c++
59 SOURCES = \
60         autobuf.h \
61         autoio.h \
62         config.h \
63         giop.h \
64         graphio.h \
65         macros.h \
66         objio.h \
67         text.h \
68         vobjio.h \
69         xdr.h
70 EOF
71
72 cat > lxtl/.cvsignore <<EOF
73 Makefile
74 Makefile.in
75 EOF
76
77 # strip the Id info otherwise it gets replaced with the CVS version instead
78 # making it even more confusing.
79 #
80 (
81     cd include/xtl;
82     for hfile in `ls`; do
83             sed < $hfile > ../../lxtl/$hfile \
84                 -e '/Id:/s/\$//g'
85     done
86 )
87