Commit 2a4c5bec68062d2f0d3ba3ebddd844e12e7a1c3d

Authored by Stéphane Raimbault
1 parent 3d3e0a05

Changes in autotools files

- cleanup in autogen.sh (only 2 lines now!)
- remove the version redundancy in configure.ac
Showing 2 changed files with 10 additions and 75 deletions
autogen.sh
1 -#!/bin/sh  
2 -#  
3 -# autogen.sh glue for hplip  
4 -#  
5 -# HPLIP used to have five or so different autotools trees. Upstream  
6 -# has reduced it to two. Still, this script is capable of cleaning  
7 -# just about any possible mess of autoconf files.  
8 -#  
9 -# BE CAREFUL with trees that are not completely automake-generated,  
10 -# this script deletes all Makefile.in files it can find.  
11 -#  
12 -# Requires: automake 1.9, autoconf 2.57+  
13 -# Conflicts: autoconf 2.13  
14 -set -e  
15 -  
16 -# Refresh GNU autotools toolchain.  
17 -echo Cleaning autotools files...  
18 -find -type d -name autom4te.cache -print0 | xargs -0 rm -rf \;  
19 -find -type f \( -name missing -o -name install-sh -o -name mkinstalldirs \  
20 - -o -name depcomp -o -name ltmain.sh -o -name configure \  
21 - -o -name config.sub -o -name config.guess \  
22 - -o -name Makefile.in \) -print0 | xargs -0 rm -f  
23 -  
24 -echo Running autoreconf...  
25 -autoreconf -v --force --install  
26 -  
27 -# For the Debian package build  
28 -test -d debian && {  
29 - # link these in Debian builds  
30 - rm -f config.sub config.guess  
31 - ln -s /usr/share/misc/config.sub .  
32 - ln -s /usr/share/misc/config.guess .  
33 -  
34 - # refresh list of executable scripts, to avoid possible breakage if  
35 - # upstream tarball does not include the file or if it is mispackaged  
36 - # for whatever reason.  
37 - [ "$1" == "updateexec" ] && {  
38 - echo Generating list of executable files...  
39 - rm -f debian/executable.files  
40 - find -type f -perm +111 ! -name '.*' -fprint debian/executable.files  
41 - }  
42 -  
43 - # Remove any files in upstream tarball that we don't have in the Debian  
44 - # package (because diff cannot remove files)  
45 - version=`dpkg-parsechangelog | awk '/Version:/ { print $2 }' | sed -e 's/-[^-]\+$//'`  
46 - source=`dpkg-parsechangelog | awk '/Source:/ { print $2 }' | tr -d ' '`  
47 - if test -r ../${source}_${version}.orig.tar.gz ; then  
48 - echo Generating list of files that should be removed...  
49 - rm -f debian/deletable.files  
50 - touch debian/deletable.files  
51 - [ -e debian/tmp ] && rm -rf debian/tmp  
52 - mkdir debian/tmp  
53 - ( cd debian/tmp ; tar -zxf ../../../${source}_${version}.orig.tar.gz )  
54 - find debian/tmp/ -type f ! -name '.*' -print0 | xargs -0 -ri echo '{}' | \  
55 - while read -r i ; do  
56 - if test -e "${i}" ; then  
57 - filename=$(echo "${i}" | sed -e 's#.*debian/tmp/[^/]\+/##')  
58 - test -e "${filename}" || echo "${filename}" >>debian/deletable.files  
59 - fi  
60 - done  
61 - rm -fr debian/tmp  
62 - else  
63 - echo Emptying list of files that should be deleted...  
64 - rm -f debian/deletable.files  
65 - touch debian/deletable.files  
66 - fi  
67 -}  
68 -  
69 -exit 0 1 +#! /bin/sh
  2 +autoreconf -v --install || exit 1
  3 +./configure --enable-maintainer-mode "$@"
configure.ac
@@ -2,8 +2,9 @@ @@ -2,8 +2,9 @@
2 # Process this file with autoconf to produce a configure script. 2 # Process this file with autoconf to produce a configure script.
3 3
4 AC_PREREQ(2.59) 4 AC_PREREQ(2.59)
5 -AC_INIT(libmodbus, 2.0, stephane.raimbault@gmail.com)  
6 -AM_INIT_AUTOMAKE(libmodbus, 2.0.0) 5 +AC_INIT(libmodbus, 2.0.0, stephane.raimbault@gmail.com)
  6 +AC_CONFIG_SRCDIR([modbus/modbus.c])
  7 +AM_INIT_AUTOMAKE
7 AM_DISABLE_STATIC 8 AM_DISABLE_STATIC
8 9
9 # Checks for programs. 10 # Checks for programs.
@@ -26,8 +27,8 @@ AC_FUNC_SELECT_ARGTYPES @@ -26,8 +27,8 @@ AC_FUNC_SELECT_ARGTYPES
26 AC_CHECK_FUNCS([inet_ntoa memset select socket]) 27 AC_CHECK_FUNCS([inet_ntoa memset select socket])
27 28
28 AC_OUTPUT([ 29 AC_OUTPUT([
29 -Makefile  
30 -modbus/Makefile  
31 -tests/Makefile  
32 -modbus.pc 30 + Makefile
  31 + modbus/Makefile
  32 + tests/Makefile
  33 + modbus.pc
33 ]) 34 ])