IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ticket #387: psmodule-0.6-build_tidy.patch

File psmodule-0.6-build_tidy.patch, 4.9 KB (added by jhoblitt, 21 years ago)

patch to add autogen.sh, tidy configure.ac & Makefile.cvs

  • psmodule/Makefile.

    ---------------------
    PatchSet 67 
    Date: 2005/04/29 20:48:18
    Author: jhoblitt
    Branch: HEAD
    Tag: (none) 
    Log:
    add autogen.sh
    tidy AC & AM initialization
    tidy list of AC processed files
    update Makefile.cvs
    
    Members: 
    	Makefile.cvs:1.1->1.2 
    	autogen.sh:INITIAL->1.1 
    	configure.ac:1.1->1.2 
    
    diff -u psmodule/Makefile.cvs:1.1 psmodule/Makefile.cvs:1.2
    old new  
    11default: all
    22
    33all:
    4         if [ "`which glibtoolize`" != "" ] ; then glibtoolize --force ; else libtoolize --force ; fi
    5         aclocal
    6         autoheader
    7         automake
    8         autoconf
     4        if [ "`which glibtoolize 2> /dev/null`" != "" ] ; then glibtoolize --force ; else libtoolize --force ; fi
     5        aclocal --force
     6        autoheader --force
     7        automake --add-missing --force
     8        autoconf --force
    99
  • new file psmodule/autogen.sh

    - +  
     1#!/bin/sh
     2# Run this to generate all the initial makefiles, etc.
     3
     4srcdir=`dirname $0`
     5test -z "$srcdir" && srcdir=.
     6
     7ORIGDIR=`pwd`
     8cd $srcdir
     9
     10PROJECT=psmodule
     11TEST_TYPE=-f
     12FILE=psmodule.pc.in
     13
     14DIE=0
     15
     16if [ "`which glibtoolize 2> /dev/null`" != "" ]
     17 then LIBTOOLIZE=glibtoolize
     18 else LIBTOOLIZE=libtoolize
     19fi
     20
     21ACLOCAL=aclocal
     22AUTOHEADER=autoheader
     23AUTOMAKE=automake
     24AUTOCONF=autoconf
     25
     26($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
     27        echo
     28        echo "You must have $LIBTOOlIZE installed to compile $PROJECT."
     29        echo "Download the appropriate package for your distribution,"
     30        echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
     31        DIE=1
     32}
     33
     34($ACLOCAL --version) < /dev/null > /dev/null 2>&1 || {
     35        echo
     36        echo "You must have $ACLOCAL installed to compile $PROJECT."
     37        echo "Download the appropriate package for your distribution,"
     38        echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
     39        DIE=1
     40}
     41
     42($AUTOHEADER --version) < /dev/null > /dev/null 2>&1 || {
     43        echo
     44        echo "You must have $AUTOHEADER installed to compile $PROJECT."
     45        echo "Download the appropriate package for your distribution,"
     46        echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
     47        DIE=1
     48}
     49
     50($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
     51        echo
     52        echo "You must have $AUTOMAKE installed to compile $PROJECT."
     53        echo "Download the appropriate package for your distribution,"
     54        echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
     55        DIE=1
     56}
     57
     58($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
     59        echo
     60        echo "You must have $AUTOCONF installed to compile $PROJECT."
     61        echo "Download the appropriate package for your distribution,"
     62        echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
     63        DIE=1
     64}
     65
     66if test "$DIE" -eq 1; then
     67        exit 1
     68fi
     69
     70test $TEST_TYPE $FILE || {
     71        echo "You must run this script in the top-level $PROJECT directory"
     72        exit 1
     73}
     74
     75if test -z "$*"; then
     76        echo "I am going to run ./configure with no arguments - if you wish "
     77        echo "to pass any to it, please specify them on the $0 command line."
     78fi
     79
     80$LIBTOOLIZE --copy --force || echo "$LIBTOOlIZE failed"
     81$ACLOCAL || echo "$ACLOCAL failed"
     82$AUTOHEADER || echo "$AUTOHEADER failed"
     83$AUTOMAKE --add-missing --force-missing --copy || echo "$AUTOMAKE failed"
     84$AUTOCONF || echo "$AUTOCONF failed"
     85
     86cd $ORIGDIR
     87
     88run_configure=true
     89for arg in $*; do
     90    case $arg in
     91        --no-configure)
     92            run_configure=false
     93            ;;
     94        *)
     95            ;;
     96    esac
     97done
     98
     99if $run_configure; then
     100    $srcdir/configure --enable-maintainer-mode "$@"
     101    echo
     102    echo "Now type 'make' to compile $PROJECT."
     103else
     104    echo
     105    echo "Now run 'configure' and 'make' to compile $PROJECT."
     106fi
  • psmodule/configure.

    diff -u psmodule/configure.ac:1.1 psmodule/configure.ac:1.2
    old new  
    1 AC_INIT([psmodule],[0.5.1],[http://www.pan-starrs.org/bugzilla])
     1AC_PREREQ(2.59)
    22
    3 AM_CONFIG_HEADER(src/config.h)
    4 AM_INIT_AUTOMAKE(psmodule, 0.5.1)
     3AC_INIT([psmodule],[0.5.1],[http://pan-starrs.ifa.hawaii.edu/bugzilla])
     4AC_CONFIG_SRCDIR([psmodule.pc.in])
     5
     6AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2])
     7AM_CONFIG_HEADER([src/config.h])
     8AM_MAINTAINER_MODE
    59
    610AC_LANG(C)
    711AC_PROG_CC
     
    5155
    5256CFLAGS="${CFLAGS=} -Wall -Werror"
    5357
    54 AC_CONFIG_FILES([Makefile])
    55 AC_CONFIG_FILES([src/Makefile])
    56 AC_CONFIG_FILES([test/Makefile])
    57 AC_CONFIG_FILES([Doxyfile])
    58 AC_CONFIG_FILES([psmodule-config])
    59 AC_CONFIG_FILES([psmodule.pc])
     58AC_CONFIG_FILES([
     59  Makefile
     60  src/Makefile
     61  test/Makefile
     62  Doxyfile
     63  psmodule-config
     64  psmodule.pc
     65])
    6066
    6167AC_OUTPUT