[xml] build from source and *-config executable permission
- From: Roumen Petrov <bugtrack roumenpetrov info>
- To: libxml <xml gnome org>
- Subject: [xml] build from source and *-config executable permission
- Date: Wed, 14 Oct 2009 23:58:38 +0300
Hi All,
Version of 1.2.13 of xmlsec add support to build from libxml2/libxslt
source and this is good reason to setup a build environment where all
packages are kept up-to-date. After synchronization to recent repository
version user can just type make in build directory and the make rules
will do his job just fine with one exception: if configure.in script is
updated the *-config files are recreated but lost executable permission.
The attached file bootstrap.sh with simple GNU autotool based build show
how to reproduce and avoid issue.
As the patch is quite trivial I would like to describe only how to fix
issue without to propose a diff-file.
- libxml2/configure.in:
move line "chmod +x xml2-config python/setup.py" before AC_OUTPUT in a
AC_CONFIG_COMMANDS macro, i.e.:
AC_CONFIG_COMMANDS([set_executable], [chmod +x xml2-config python/setup.py])
AC_OUTPUT(....
- libxslt/configure.in:
the script don't set executable flag of xslt-config when is created.
so the solution: AC_CONFIG_COMMANDS before AC_OUTPUT as exapmle
AC_CONFIG_COMMANDS([set_executable], [chmod +x xslt-config])
Regards,
Roumen
#! /bin/sh
cat > foo.c <<EOF
#include <stdio.h>
#include <stdlib.h>
int main() {
printf("Hello World!\n");
exit(0);
return(0);
}
EOF
cat > foo-config.in <<EOF
#! /bin/sh
prefix= prefix@
echo foo=\$prefix
EOF
cat > my-config.in <<EOF
#! /bin/sh
prefix= prefix@
echo my=\$prefix
EOF
cat > configure.ac <<EOF
AC_PREREQ([2.61])
m4_define(FOO_VERSION, 0.0.1)
AC_INIT([FOO], [FOO_VERSION], [http://example.net/tracker/foo])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([foo.c])
#AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
AC_PROG_CC
AC_CONFIG_COMMANDS([my_config], [chmod +x my-config])
AC_OUTPUT([foo-config my-config Makefile])
chmod +x foo-config
EOF
for F in install-sh config.sub config.guess; do
cp -a /usr/share/automake-1.10/$F .
done
cat > Makefile.am <<EOF
#AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = foo
foo_SOURCES = foo.c
EOF
# =====
rm -f configure
#autoheader
aclocal
autoconf
automake --add-missing --copy
BUILD=i386-pc-linux
do_test()
{
(
D=.build-linux
echo "=== bootstrap.sh: entering $D ..." >&2
rm -rf $D; mkdir $D; cd $D
echo '===(1)===============' >&2
../configure
echo '=== (1 configure) ===' >&2
/bin/ls -l *config
make
echo '=== (1 make ) ===' >&2
/bin/ls -l *config
echo '===(2)=================' >&2
touch ../configure.ac
make
echo '=== (2 make ) ===' >&2
/bin/ls -l *config
)
}
# =====
do_test
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]