AutoGen-ized.
authorshort <>
Sat, 30 Aug 2003 09:54:38 +0000 (09:54 +0000)
committershort <>
Sat, 30 Aug 2003 09:54:38 +0000 (09:54 +0000)
autogen.pl [new file with mode: 0755]
autogen.sh [deleted file]

diff --git a/autogen.pl b/autogen.pl
new file mode 100755 (executable)
index 0000000..554598f
--- /dev/null
@@ -0,0 +1,52 @@
+#! /usr/bin/perl
+# 
+# $Id$
+# Run to generate the initial Makefiles etc. after CVS checkout.
+# Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; exactly version 2 of June 1991 is required
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
+use vars qw($VERSION);
+$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
+use strict;
+use warnings;
+
+BEGIN {
+       # 'macros' could got checked out empty by our '-r captive' tag.
+       if (!-f "./macros/AutoGen.pm") {
+               do { system $_ and die "$_: $!"; } for ("cvs co -A macros");
+               }
+       }
+use lib "./macros/";
+use AutoGen;
+
+use Carp qw(cluck confess);
+
+
+AutoGen->run(
+               "name"=>"ntfsprogs",
+               "ARGV"=>\@ARGV,
+               "clean"=>[qw(
+                               ./ntfsprogs/mkntfs
+                               ./ntfsprogs/ntfsfix
+                               ./ntfsprogs/ntfsinfo
+                               ./ntfsprogs/ntfslabel
+                               ./ntfsprogs/ntfsresize
+                               ./ntfsprogs/ntfsundelete
+                               ./ntfsprogs/*.8
+                               )],
+               "ChangeLog"=>"ChangeLog.captive",
+               );
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755 (executable)
index 6bcdeaa..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-DIE=0
-
-if test x$srcdir = x; then
-  srcdir=.
-fi
-
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
-  echo
-  echo "**Error**: You must have \`autoconf' installed to compile Linux-NTFS."
-  echo "Download the appropriate package for your distribution,"
-  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
-  DIE=1
-}
-
-(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
-  (libtool --version) < /dev/null > /dev/null 2>&1 || {
-    echo
-    echo "**Error**: You must have \`libtool' installed to compile Linux-NTFS."
-    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
-    echo "(or a newer version if it is available)"
-    DIE=1
-  }
-}
-
-(automake --version) < /dev/null > /dev/null 2>&1 || {
-  echo
-  echo "**Error**: You must have \`automake' installed to compile Linux-NTFS."
-  echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.3.tar.gz"
-  echo "(or a newer version if it is available)"
-  DIE=1
-  NO_AUTOMAKE=yes
-}
-
-# if no automake, don't bother testing for aclocal
-test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
-  echo
-  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
-  echo "installed doesn't appear recent enough."
-  echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.3.tar.gz"
-  echo "(or a newer version if it is available)"
-  DIE=1
-}
-
-if test "$DIE" -eq 1; then
-  exit 1
-fi
-
-if test -z "$*"; then
-  echo "**Warning**: I am going to run \`configure' with no arguments."
-  echo "If you wish to pass any to it, please specify them on the"
-  echo \`$0\'" command line."
-  echo
-fi
-
-case $CC in
-xlc )
-  am_opt=--include-deps;;
-esac
-
-for coin in `find $srcdir -name configure.ac -print`
-do 
-  dr=`dirname $coin`
-  if test -f $dr/NO-AUTO-GEN; then
-    echo skipping $dr -- flagged as no auto-gen
-  else
-    echo processing $dr
-    macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
-    ( cd $dr
-      macrosdir=`find . -name macros -print`
-      aclocalinclude="$ACLOCAL_FLAGS"
-      for k in $macrodirs; do
-       if test -d $k; then
-          aclocalinclude="$aclocalinclude -I $k"
-        fi
-      done
-      if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
-       if test -z "$NO_LIBTOOLIZE" ; then 
-         echo "Running libtoolize..."
-         libtoolize --force --copy
-       fi
-      fi
-      echo "Running aclocal $aclocalinclude ..."
-      aclocal $aclocalinclude || {
-       echo
-       echo "**Error**: aclocal failed. This may mean that you have not"
-       echo "installed all of the packages you need, or you may need to"
-       echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
-       echo "for the prefix where you installed the packages whose"
-       echo "macros were not found"
-       exit 1
-      }
-
-      if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
-       echo "Running autoheader..."
-       autoheader || { echo "**Error**: autoheader failed."; exit 1; }
-      fi
-      echo "Running automake --gnu $am_opt ..."
-      automake --add-missing --gnu $am_opt ||
-       { echo "**Error**: automake failed."; exit 1; }
-      echo "Running autoconf ..."
-      autoconf || { echo "**Error**: autoconf failed."; exit 1; }
-    ) || exit 1
-  fi
-done
-
-conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
-
-if test x$NOCONFIGURE = x; then
-  echo Running $srcdir/configure $conf_flags "$@" ...
-  $srcdir/configure $conf_flags "$@" \
-  && echo Now type \`make\' to compile $PKG_NAME || exit 1
-else
-  echo Skipping configure process.
-fi