NadpDesktopFile: do not try to import empty or not DES-EMA files
[nautilus-actions.git] / run-autogen.sh
blob8b189e2ae5168df2f060cc4d8f7c655a1a236bc8
1 #!/bin/sh
3 # pwi 2011-11-28 goal is to have a single source tree, being able to easily
4 # build it in several virtual guests which all have a read
5 # access to this source tree
6 # -> run-distcheck.sh and run-autogen.sh are only executed on the development
7 # boxes, while run-configure is meant to build from anywhere
8 # -> on the development box, _build and _install are subdirectories of the
9 # source tree
10 # -> on the virtual guests, _build and _install are subdirectories of the
11 # current working directory
13 target=${target:-normal}
14 srcdir=$(cd ${0%/*}; pwd)
16 # a nautilus-actions-x.y may remain after an aborted make distcheck
17 # such a directory breaks gnome-autogen.sh generation
18 # so clean it here
19 for d in $(find ${srcdir} -maxdepth 1 -type d -name 'nautilus-actions-*'); do
20 chmod -R u+w $d
21 rm -fr $d
22 done
24 [ "${target}" = "normal" ] &&
25 conf_arg=" \
26 --disable-deprecated \
27 --disable-gtk-doc \
28 --disable-html-manuals \
29 --disable-pdf-manuals \
32 # 'doc' mode: enable deprecated, manuals and gtk-doc
33 [ "${target}" = "doc" ] &&
34 conf_arg=" \
35 --enable-deprecated \
36 --enable-gtk-doc \
37 --enable-gtk-doc-html \
38 --enable-gtk-doc-pdf \
39 --enable-html-manuals \
40 --enable-pdf-manuals \
43 # Build with Gtk+ 3 (actually a 2.97.x unstable version)
44 # installed in ~/.local/jhbuild
46 # Note that building with Gtk 3.0 not only requires that we have a
47 # Gtk+ 3 available library, but also that all our required libraries
48 # only depend of Gtk+ 3.0. In our case, we have:
49 # $ grep gtk+-2.0 /usr/lib/pkgconfig/*
50 # libnautilus-extension.pc:Requires: glib-2.0 gio-2.0 gtk+-2.0
51 # unique-1.0.pc:Requires: gtk+-2.0
53 #[ "${target}" = "jhbuild" ] &&
54 # export autogen_prefix=${HOME}/data/jhbuild/run &&
55 # PKG_CONFIG_PATH=${autogen_prefix}/lib/pkgconfig \
56 # LD_LIBRARY_PATH=${autogen_prefix}/lib \
57 # exec ./autogen.sh \
58 # --prefix=${autogen_prefix} \
59 # --sysconfdir=/etc \
60 # --disable-schemas-install \
61 # $*
63 NOCONFIGURE=1 ${srcdir}/autogen.sh
65 runconf=${srcdir}/run-configure.sh
66 echo "
67 Generating ${runconf}"
69 cat <<EOF >${runconf}
70 #!/bin/sh
72 # srcdir here is the root of the source directory
73 target=\${target:-normal}
74 srcdir=\$(cd \${0%/*}; pwd)
76 # heredir is the root of the _build/_install directories
77 heredir=\$(pwd)
79 mkdir -p \${heredir}/_build
80 cd \${heredir}/_build
82 \${srcdir}/configure \
83 --prefix=\${heredir}/_install \
84 --sysconfdir=/etc \
85 --with-nautilus-extdir=\${heredir}/_install/lib/nautilus \
86 --disable-schemas-install \
87 --disable-scrollkeeper \
88 --enable-maintainer-mode \
89 \$* &&
90 make &&
91 make install
92 EOF
94 echo "Executing ${runconf}
96 chmod a+x ${runconf}
97 exec ${runconf}