5 AUTOMAKE="automake -a -c --foreign"
9 echo -n "Locating GNU m4... "
10 for prog in $M4 gm4 gnum4 m4 ; do
11 case `$prog --version 2>&1` in
19 if test x$ok = xno ; then
23 # Generate acinclude.m4
24 echo -n "Generate acinclude.m4... "
25 rm -f acinclude.m4 sigc++/acinclude.m4
27 for fil in config/lyxinclude.m4 config/libtool.m4 config/gettext.m4 config/lcmessage.m4 config/progtest.m4 config/sigc++.m4 config/kde.m4 config/gtk--.m4 config/gnome--.m4 config/gnome.m4 config/pspell.m4; do
28 cat $fil >> acinclude.m4
30 touch sigc++/acinclude.m4
31 for fil in config/libtool.m4 ; do
32 cat $fil >> sigc++/acinclude.m4
36 # Generate the ext_l10n.h
37 echo -n "Generate the ext_l10n file..."
39 # first the ui file(s)
40 grep -i -E "submenu|item|optitem" < lib/ui/default.ui | cut -d '"' -f 2 | awk '{printf "_(\"%s\");\n", $0}' > src/ext_l10n.h
41 # then the layout files
42 cat lib/layouts/*.layout lib/layouts/*.inc | grep -i -E "[ ]*style .+$" | cut -d ' ' -f 2 | sort | uniq | awk '{printf "_(\"%s\");\n", $0}' >> src/ext_l10n.h
45 # Generate the Makefiles and configure files
46 if ( aclocal --version ) </dev/null > /dev/null 2>&1; then
47 echo -n "Building macros... "
48 $ACLOCAL ; ( cd lib/reLyX; $ACLOCAL ) ; ( cd sigc++; $ACLOCAL )
51 echo "aclocal not found -- aborting"
55 if ( autoheader --version ) </dev/null > /dev/null 2>&1; then
56 echo -n "Building config header template... "
57 $AUTOHEADER ; ( cd sigc++; $AUTOHEADER )
60 echo "autoheader not found -- aborting"
64 if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then
65 echo -n "Building Makefile templates... "
66 $AUTOMAKE ; ( cd lib/reLyX ; $AUTOMAKE ) ; ( cd sigc++; $AUTOMAKE )
69 echo "automake not found -- aborting"
73 if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then
74 echo -n "Building configure... "
75 $AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF ) ; ( cd sigc++; $AUTOCONF )
78 echo "autoconf not found -- aborting"
82 # Autogenerate lib/configure.m4.
83 if test x$GNUM4 != x ; then
84 echo -n "Building lib/configure ... "
86 $GNUM4 lib/configure.m4 > lib/configure
87 chmod a+x lib/configure
90 echo "No GNU m4. Impossible to build lib/configure -- aborting"
94 echo -n "Creating POTFILES.in... "
97 # This file is automatically generated by autogen.sh. This command was
98 # used to extract the files from the sources:
100 # grep -E "_\(\".*\"\)" \`find src -name \*.[hHC]\` | \\
101 # awk 'BEGIN {FS= ":"} {print $1}' | sort | uniq
103 # This must be done when standing in lyx/
105 # This is all the files that contains internationalization strings.
109 grep -l -E "_\(\".*\"\)" `find src -name \*.[hHC]` | \
110 awk 'BEGIN {FS= ":"} {print $1}' | sort -f -d | uniq >> tmppot
111 mv tmppot po/POTFILES.in
115 echo 'run "./configure ; make"'