All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>,
	Eric Sandeen <sandeen@sandeen.net>,
	Mike Frysinger <vapier@gentoo.org>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [patch] fix parallel build failures in xfsprogs-3.0.0
Date: Mon, 16 Mar 2009 17:02:49 -0400	[thread overview]
Message-ID: <20090316210249.GA2641@infradead.org> (raw)
In-Reply-To: <200903161053.32745.agruen@suse.de>

On Mon, Mar 16, 2009 at 10:53:32AM +0100, Andreas Gruenbacher wrote:
> On Monday, 16 March 2009 8:31:48 Mike Frysinger wrote:
> > usually what i do is something like:
> > args=
> > libtoolize -n --install 2>/dev/null && args="-i"
> > libtoolize -c -f $args
> 
> Sigh, the usual GNU utility problem. I've added a compatibility fix to attr 
> and acl now. Thanks!

Ok.  Can anyone review the cumulated autotools/libtool patch for
xfsprogs below?


Subject: Automake and libtool fixes
From: Andreas Gruenbacher <agruen@suse.de>

Remove aclocal.m4 from the repository and generate it when needed.
Move the AC_PROG_LIBTOOL autoconf macro and use libtoolize according to
the libtool info pages.

Make sure that libtoolize adds the auxiliary files (config.guess and
config.sub).

Move install-sh into include/ so that libtoolize does not destroy it.

Split up the ``make clean'' and ``make distclean'' targets: the former
removes all files generated during a build.  The latter removes all
files generated by libtoolize, autoconf, and configure as well.


Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>


Index: xfsprogs-dev/Makefile
===================================================================
--- xfsprogs-dev.orig/Makefile	2009-03-16 07:57:07.891007993 +0100
+++ xfsprogs-dev/Makefile	2009-03-16 21:58:18.036977931 +0100
@@ -9,11 +9,18 @@ ifeq ($(HAVE_BUILDDEFS), yes)
 include $(TOPDIR)/include/builddefs
 endif
 
-CONFIGURE = configure include/builddefs include/platform_defs.h
-LSRCFILES = configure configure.in Makepkgs aclocal.m4 install-sh README VERSION
+CONFIGURE = \
+	aclocal.m4 \
+	configure config.guess config.sub \
+	ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
+	m4/ltversion.m4 m4/lt~obsolete.m4 \
+	include/builddefs include/platform_defs.h
+LSRCFILES = \
+	configure.in Makepkgs install-sh README VERSION \
+	configure aclocal.m4
 
-LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
-	Logs/* built .census install.* install-dev.* *.gz
+LDIRT = config.log config.status config.cache confdefs.h built .census \
+	Logs/* conftest* install.* install-dev.* *.dep *.gz
 
 LIB_SUBDIRS = libxfs libxlog libxcmd libhandle libdisk
 TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
@@ -21,7 +28,7 @@ TOOL_SUBDIRS = copy db estimate fsck fsr
 
 SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
 
-default: include/builddefs include/platform_defs.h
+default: configure include/builddefs include/platform_defs.h
 ifeq ($(HAVE_BUILDDEFS), no)
 	$(MAKE) -C . $@
 else
@@ -45,7 +52,15 @@ else
 clean:	# if configure hasn't run, nothing to clean
 endif
 
+# Recent versions of libtool require the -i option for copying auxiliary
+# files (config.sub, config.guess, install-sh, ltmain.sh), while older
+# versions will copy those files anyway, and don't understand -i.
+LIBTOOLIZE_INSTALL = `libtoolize -n -i >/dev/null 2>/dev/null && echo -i`
+
 configure include/builddefs:
+	libtoolize -c $(LIBTOOLIZE_INSTALL) -f
+	cp include/install-sh .
+	aclocal -I m4
 	autoconf
 	./configure \
 		--prefix=/ \
@@ -68,9 +83,6 @@ include/platform_defs.h: include/buildde
 		$(MAKE) $(AM_MAKEFLAGS) include/builddefs; \
 	fi
 
-aclocal.m4::
-	aclocal --acdir=`pwd`/m4 --output=$@
-
 install: default $(addsuffix -install,$(SUBDIRS))
 	$(INSTALL) -m 755 -d $(PKG_DOC_DIR)
 	$(INSTALL) -m 644 README $(PKG_DOC_DIR)
@@ -90,4 +102,5 @@ install-qa: install $(addsuffix -install
 
 realclean distclean: clean
 	rm -f $(LDIRT) $(CONFIGURE)
+	rm -f include/builddefs include/config.h install-sh libtool
 	rm -rf autom4te.cache Logs
Index: xfsprogs-dev/configure.in
===================================================================
--- xfsprogs-dev.orig/configure.in	2009-03-16 07:57:07.898984077 +0100
+++ xfsprogs-dev/configure.in	2009-03-16 21:58:18.036977931 +0100
@@ -1,6 +1,10 @@
 AC_INIT(include/libxfs.h)
+AC_CONFIG_AUX_DIR([.])
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADER(include/platform_defs.h)
 
+AC_PROG_LIBTOOL
+
 AC_ARG_ENABLE(shared,
 [ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
 	enable_shared=yes)
Index: xfsprogs-dev/m4/package_utilies.m4
===================================================================
--- xfsprogs-dev.orig/m4/package_utilies.m4	2009-03-16 07:57:07.903978218 +0100
+++ xfsprogs-dev/m4/package_utilies.m4	2009-03-16 07:57:09.538978690 +0100
@@ -32,8 +32,6 @@ AC_DEFUN([AC_PACKAGE_UTILITIES],
     AC_SUBST(make)
     AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
 
-    AC_PROG_LIBTOOL
-
     if test -z "$TAR"; then
         AC_PATH_PROG(TAR, tar,, /usr/freeware/bin:/bin:/usr/local/bin:/usr/bin)
     fi
Index: xfsprogs-dev/include/Makefile
===================================================================
--- xfsprogs-dev.orig/include/Makefile	2009-03-16 21:58:09.403978018 +0100
+++ xfsprogs-dev/include/Makefile	2009-03-16 21:58:18.036977931 +0100
@@ -36,8 +36,8 @@ HFILES += $(PKG_PLATFORM).h
 PHFILES = darwin.h freebsd.h irix.h linux.h
 DKHFILES = volume.h fstyp.h dvh.h
 LSRCFILES = $(shell echo $(PHFILES) | sed -e "s/$(PKG_PLATFORM).h//g")
-LSRCFILES += platform_defs.h.in builddefs.in buildmacros buildrules $(DKHFILES)
-LSRCFILES += command.h input.h path.h project.h unaligned.h
+LSRCFILES += platform_defs.h.in builddefs.in buildmacros buildrules install-sh
+LSRCFILES += $(DKHFILES) command.h input.h path.h project.h unaligned.h
 LDIRT = xfs disk
 
 default install: xfs disk
Index: xfsprogs-dev/include/install-sh
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ xfsprogs-dev/include/install-sh	2009-03-16 21:58:18.037978687 +0100
@@ -0,0 +1,349 @@
+#! /bin/sh
+#
+# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
+#
+# This script emulates bsd install and also recognises
+# two environment variables, with the following semantics :-
+#
+# $DIST_MANIFEST - if set, the name of the file to append manifest
+#                  information in the following format:
+#                  File     :  f mode owner group src target
+#                  Directory:  d mode owner group target
+#                  Symlink  :  l linkval target
+#
+# $DIST_ROOT     - if set, prepend to target
+#
+# The sematics of all combinations of these two variables
+# are as follows:
+#
+# $DIST_MANIFEST?  $DIST_ROOT? |   Copy?  Append Manifest?
+# -----------------------------+--------------------------
+#       not set       not set  |    yes        no
+#       not set       set      |    yes        no
+#       set           not set  |    no         yes
+#       set           set      |    yes        yes
+#
+_usage() {
+    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
+    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
+    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
+    echo "or     $prog -S file target  (creates \"target\" symlink)"
+    echo "or     $prog -T lt_arg [-o owner] [-g group] [-m mode] libtool.lai directory"
+    echo ""
+    echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
+    echo "behaviour of this command - see comments in the script."
+    echo "The -D flag is only available for the second usage, and causes"
+    echo "the target directory to be created before installing the file."
+    echo ""
+    exit 1
+}
+
+_chown ()
+{
+    _st=255
+    if [ $# -eq 3 ] ; then
+	chown $1:$2 $3
+	_st=$?
+	if [ $_st -ne 0 ] ; then
+	    if [ $REAL_UID != '0' ] ; then
+		if [ ! -f $DIST_ROOT/.chown.quiet ] ; then
+		    echo '==============================================='
+		    echo Ownership of files under ${DIST_ROOT:-/}
+		    echo cannot be changed
+		    echo '==============================================='
+		    if [ -n "$DIST_ROOT" ] ; then
+			touch $DIST_ROOT/.chown.quiet
+		    fi
+		fi
+	       _st=0
+	    fi     
+	fi
+    fi
+
+    return $_st
+}
+
+
+_manifest ()
+{ 
+    echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
+}
+
+prog=`basename $0`
+HERE=`pwd`
+dflag=false
+Dflag=false
+Sflag=false
+Tflag=false
+DIRMODE=755
+FILEMODE=644
+OWNER=`id -u`
+GROUP=`id -g`
+REAL_UID=$OWNER
+
+# default is to install and don't append manifest
+INSTALL=true
+MANIFEST=:
+
+[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false
+[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest"
+
+[ $# -eq 0 ] && _usage
+
+if $INSTALL
+then
+    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
+else
+    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
+fi
+
+[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
+
+while getopts "Dcm:d:S:o:g:T:" c $*
+do
+   case $c in
+   c)
+	;;
+   g)
+	GROUP=$OPTARG
+	;;
+   o)
+	OWNER=$OPTARG
+	;;
+   m)
+	DIRMODE=`expr $OPTARG`
+	FILEMODE=$DIRMODE
+	;;
+   D) 
+	Dflag=true
+	;;
+   S) 
+	symlink=$OPTARG
+	Sflag=true
+	;;
+   d) 
+	dir=$DIST_ROOT/$OPTARG
+	dflag=true
+	;;
+   T)
+	lt_install=$OPTARG
+	Tflag=true
+	;;
+   *)
+   	_usage
+	;;
+   esac
+done
+
+shift `expr $OPTIND - 1`
+
+status=0
+if $dflag
+then
+    #
+    # first usage
+    #
+    $MKDIR -p $dir 
+    status=$?
+    if [ $status -eq 0 ]
+    then
+	$CHMOD $DIRMODE $dir
+	status=$?
+    fi
+    if [ $status -eq 0 ]
+    then
+	$CHOWN $OWNER $GROUP $dir
+	status=$?
+    fi
+    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
+elif $Sflag
+then
+    #
+    # fourth usage (symlink)
+    #
+    if [ $# -ne 1 ]
+    then
+    	_usage
+    else
+    	target=$DIST_ROOT/$1
+    fi
+    $LN -s -f $symlink $target
+    status=$?
+    $MANIFEST l $symlink ${target#$DIST_ROOT} 
+elif $Tflag
+then
+    #
+    # -T (install libs built by libtool)
+    #
+    if [ $# -ne 2 ]
+    then
+	_usage
+    else
+	libtool_lai=$1
+	# source the libtool variables
+	if [ ! -f $libtool_lai ]
+	then
+		echo "$prog: Unable to find libtool library file $libtool_lai"
+		exit 2
+	fi
+	. ./$libtool_lai
+	target=$DIST_ROOT/$2
+    fi
+    case $lt_install in
+    so_dot_version)
+	# Loop until we find libfoo.so.x.y.z, then break out.
+	for solib in $library_names
+	do
+		# does it have enough parts?  libfoo.so.x.y.z == 5
+		cnt=`echo "$solib" | sed -e 's/\./ /g' | wc -w`
+		if [ $cnt -eq 5 ]
+		then
+			install_name=$target/$solib
+			$CP $solib $install_name
+			status=$?
+			$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$solib ${install_name#$DIST_ROOT}
+			break
+		fi
+	done
+	;;
+
+    so_*)
+	case $lt_install in
+	so_dot_current)
+		# ln -s libfoo.so.x.y.z to libfoo.so.x
+		from_parts=5  # libfoo.so.x.y.z
+		to_parts=3    # libfoo.so.x
+		;;
+	so_base)
+		# ln -s libfoo.so.x to libfoo.so
+		from_parts=3  # libfoo.so.x
+		to_parts=2    # libfoo.so
+		;;
+	*)
+		echo "$prog: -T $lt_install invalid"
+		exit 2
+		;;
+	esac
+
+	# Loop until we find the names, then break out.
+	for solib in $library_names
+	do
+		# does it have enough parts?
+		cnt=`echo "$solib" | sed -e 's/\./ /g' | wc -w`
+		if [ $cnt -eq $from_parts ]
+		then
+			from_name=$solib
+		elif [ $cnt -eq $to_parts ]
+		then
+			to_name=$solib
+		fi
+
+		if [ -n "$from_name" ] && [ -n "$to_name" ]
+		then
+			install_name=$target/$to_name
+			$LN -s -f $from_name $install_name
+			status=$?
+			$MANIFEST l $from_name ${install_name#$DIST_ROOT}
+			break
+		fi
+	done
+	;;
+    old_lib)
+	install_name=$target/$old_library
+	$CP $old_library $install_name
+	status=$?
+	$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$old_library ${install_name#$DIST_ROOT}
+	;;
+    *)
+	echo "$prog: -T $lt_install invalid"
+	exit 2
+	;;
+    esac
+
+    case $lt_install in
+    old_lib|so_dot_version)
+	if [ $status -eq 0 ]
+	then
+		$CHMOD $FILEMODE $install_name
+		$CHOWN $OWNER $GROUP $install_name
+	fi
+	;;
+    esac
+
+else
+    list=""
+    dir=""
+    if [ $# -eq 2 ]
+    then
+	#
+	# second usage
+	#
+	f=$1
+	dir=$DIST_ROOT/$2
+	if $Dflag
+	then
+	    mkdir -p `dirname $dir`
+	fi
+	$CP $f $dir
+	status=$?
+	if [ $status -eq 0 ]
+	then 
+	    if [ -f $dir/$f ]
+	    then
+		$CHMOD $FILEMODE $dir/$f
+		status=$?
+		if [ $status -eq 0 ]
+		then
+		    $CHOWN $OWNER $GROUP $dir/$f
+		    status=$?
+		fi
+		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
+	    else
+		$CHMOD $FILEMODE $dir
+		status=$?
+		if [ $status -eq 0 ]
+		then
+		    $CHOWN $OWNER $GROUP $dir
+		    status=$?
+		fi
+		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
+	    fi
+	fi
+    else
+	#
+	# third usage
+	#
+	n=1
+	while [ $# -gt 0 ]
+	do
+	    if [ $# -gt 1 ]
+	    then
+		list="$list $1"
+	    else
+		dir=$DIST_ROOT/$1
+	    fi
+	    shift
+	done
+
+	# echo DIR=$dir list=\"$list\"
+	for f in $list
+	do
+	    $CP $f $dir
+	    status=$?
+	    if [ $status -eq 0 ]
+	    then
+		$CHMOD $FILEMODE $dir/$f
+		status=$?
+		if [ $status -eq 0 ]
+		then
+		    $CHOWN $OWNER $GROUP $dir/$f
+		    status=$?
+		fi
+		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
+	    fi
+	    [ $status -ne 0 ] && break
+	done
+    fi
+fi
+
+exit $status

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-03-16 21:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  5:10 [patch] fix parallel build failures in xfsprogs-3.0.0 Mike Frysinger
2009-02-24  5:20 ` Eric Sandeen
2009-02-24  5:22 ` Eric Sandeen
2009-02-24  7:21   ` Mike Frysinger
2009-02-24 13:15     ` Christoph Hellwig
2009-02-24 14:53       ` Mike Frysinger
2009-02-24 15:14         ` Felix Blyakher
2009-02-24 15:37           ` Mike Frysinger
2009-02-24 18:46             ` Christoph Hellwig
2009-02-24 22:22               ` Andreas Gruenbacher
2009-02-24 23:45                 ` Mike Frysinger
2009-02-26  0:26                   ` Andreas Gruenbacher
2009-02-26  1:03                     ` Mike Frysinger
2009-02-26 12:23                       ` Andreas Gruenbacher
2009-02-26 15:17                         ` Mike Frysinger
2009-02-26 17:17                           ` Andreas Gruenbacher
2009-02-26 18:08                             ` Mike Frysinger
2009-02-27  7:22                             ` Greg Banks
2009-02-27  9:55                               ` Andreas Gruenbacher
2009-03-01  1:31                                 ` Greg Banks
2009-03-01  7:58                                   ` Mike Frysinger
2009-03-03 15:53                                   ` Christoph Hellwig
2009-02-27 17:35                           ` Andreas Gruenbacher
2009-03-04 17:27                             ` Christoph Hellwig
2009-03-08 13:09                               ` Andreas Gruenbacher
2009-03-10 16:41                                 ` Andreas Gruenbacher
2009-03-16  7:05                                   ` Christoph Hellwig
2009-03-16  7:31                                     ` Mike Frysinger
2009-03-16  9:53                                       ` Andreas Gruenbacher
2009-03-16 21:02                                         ` Christoph Hellwig [this message]
2009-03-24 13:12                                           ` Christoph Hellwig
2009-03-24 18:18                                             ` Andreas Gruenbacher
2009-03-25 19:03                                               ` Christoph Hellwig
2009-03-16  6:51                                 ` Christoph Hellwig
2009-03-27 16:02                                 ` Christoph Hellwig
2009-03-27 16:30                                   ` Mike Frysinger
2009-03-27 18:31                                     ` Christoph Hellwig
2009-02-26 23:03                 ` Christoph Hellwig
2009-02-28  0:07                   ` Andreas Gruenbacher
2009-02-28 22:27                     ` Eric Sandeen
2009-03-01  1:41                       ` Greg Banks
2009-03-01 17:23                       ` Andreas Gruenbacher
2009-03-03 15:55                         ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090316210249.GA2641@infradead.org \
    --to=hch@infradead.org \
    --cc=agruen@suse.de \
    --cc=sandeen@sandeen.net \
    --cc=vapier@gentoo.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.