README: add deprecation notice
[nautilus-actions.git] / maintainer / run-autogen.sh
blob7c0f10be25ae1961447d74ef9d6fcd6d2ec2abef
1 #!/bin/sh
2 # FileManager-Actions
3 # A file-manager extension which offers configurable context menu actions.
5 # Copyright (C) 2005 The GNOME Foundation
6 # Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
7 # Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
9 # FileManager-Actions is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation; either version 2 of
12 # the License, or (at your option) any later version.
14 # FileManager-Actions is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with FileManager-Actions; see the file COPYING. If not, see
21 # <http://www.gnu.org/licenses/>.
23 # Authors:
24 # Frederic Ruaudel <grumz@grumz.net>
25 # Rodrigo Moya <rodrigo@gnome-db.org>
26 # Pierre Wieser <pwieser@trychlos.org>
27 # ... and many others (see AUTHORS)
29 # Rationale
30 # =========
31 # 'run-autogen.sh' (this script) is a tool dedicated to the maintainer.
32 # It mainly gtkdocize-s and autoreconf-es the source tree.
34 # Note that, because 'aclocal' embeds its version number in some
35 # generated files (and mainly in 'aclocal.m4'), it may be needed to
36 # execute it from the oldest targeted distribution.
37 # This was true with Ubuntu 12 LTS, while this appears to be no more
38 # the case with Debian 7 Wheezy.
40 # As a maintainer shortcut, this 'run-autogen.sh' script also creates
41 # a convenience 'run-configure.sh' script in the current working
42 # directory, and executes it. This 'run-configure.sh' script doesn't
43 # generate the documentation (neither manuals nor reference).
45 maintainer_dir="$(cd "${0%/*}"; pwd)"
46 top_srcdir="${maintainer_dir%/*}"
47 cwd_dir="$(pwd)"
49 # check that we are able to address to top source tree
50 if [ ! -f "${top_srcdir}/configure.ac" ]; then
51 echo "> Unable to find 'configure.ac' in ${top_srcdir}" 1>&2
52 exit 1
55 PkgName=`autoconf --trace 'AC_INIT:$1' "${top_srcdir}/configure.ac"`
56 pkgname=$(echo $PkgName | tr '[[:upper:]]' '[[:lower:]]')
58 # a filemanager-actions-x.y may remain after an aborted make distcheck
59 # such a directory breaks gnome-autogen.sh generation
60 # so clean it here
61 for d in $(find ${top_srcdir} -maxdepth 2 -type d -name "${pkgname}-*"); do
62 echo "> Removing $d"
63 chmod -R u+w $d
64 rm -fr $d
65 done
67 # aclocal expects to find 'configure.ac' in its current working directory
68 # (i.e. to be run from top source tree)
70 cd "${top_srcdir}"
71 echo "> Running aclocal"
72 m4_dir=`autoconf --trace 'AC_CONFIG_MACRO_DIR:$1' configure.ac`
73 aclocal -I "${m4_dir}" --install || exit 1
76 # requires gtk-doc package
77 # used for Developer Reference Manual generation (devhelp)
78 # gtkdocize expects to find 'configure.ac' in its current working directory
79 # (i.e. to be run from top source tree)
81 cd "${top_srcdir}"
82 echo "> Running gtkdocize"
83 gtkdocize --copy || exit 1
86 # autoreconf expects to find 'configure.ac' in its current working directory
87 # (i.e. to be run from top source tree)
88 # this notably generate the 'configure' script and all Makefile's.in in
89 # the source tree
91 cd "${top_srcdir}"
92 echo "> Running autoreconf"
93 autoreconf --verbose --force --install -Wno-portability || exit 1
96 # creates the 'run-configure.sh' convenience script in the current
97 # working directory
98 runconf="./run-configure.sh"
99 echo "> Generating ${runconf}"
100 cat <<EOF >${runconf}
101 #!/bin/sh
102 # FileManager-Actions
103 # A file-manager extension which offers configurable context menu actions.
105 # Copyright (C) 2005 The GNOME Foundation
106 # Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
107 # Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
109 # FileManager-Actions is free software; you can redistribute it and/or
110 # modify it under the terms of the GNU General Public License as
111 # published by the Free Software Foundation; either version 2 of
112 # the License, or (at your option) any later version.
114 # FileManager-Actions is distributed in the hope that it will be useful,
115 # but WITHOUT ANY WARRANTY; without even the implied warranty of
116 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
117 # General Public License for more details.
119 # You should have received a copy of the GNU General Public License
120 # along with FileManager-Actions; see the file COPYING. If not, see
121 # <http://www.gnu.org/licenses/>.
123 # Authors:
124 # Frederic Ruaudel <grumz@grumz.net>
125 # Rodrigo Moya <rodrigo@gnome-db.org>
126 # Pierre Wieser <pwieser@trychlos.org>
127 # ... and many others (see AUTHORS)
129 # WARNING
130 # This file has been automatically generated
131 # by $(uname -n):$0
132 # on $(date) - Please do not manually modify it.
134 # top_srcdir here is the root of the source directory
135 #top_srcdir="\$(cd \${0%/*}; pwd)"
136 top_srcdir="${top_srcdir}"
138 # heredir is the root of the _build/_install directories
139 heredir=\$(pwd)
141 mkdir -p \${heredir}/_build
142 cd \${heredir}/_build
144 conf_cmd="\${top_srcdir}/configure"
145 conf_args=""
146 conf_args="\${conf_args} --prefix=\${heredir}/_install"
147 conf_args="\${conf_args} --with-nautilus-extdir=\${heredir}/_install/lib/nautilus"
148 #conf_args="\${conf_args} --with-nemo-extdir=\${heredir}/_install/lib/nemo"
149 #conf_args="\${conf_args} --with-caja-extdir=\${heredir}/_install/lib/caja"
150 conf_args="\${conf_args} --enable-maintainer-mode"
151 conf_args="\${conf_args} $*"
152 conf_args="\${conf_args} \$*"
154 tput bold
155 echo "\${conf_cmd} \${conf_args}
157 tput sgr0
159 \${conf_cmd} \${conf_args}
161 chmod a+x ${runconf}
163 echo "> Executing ${runconf}
165 ${runconf} &&
166 make -C _build &&
167 make -C _build install