[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Acl-devel] [PATCH attr 4/6 v2] modernize build system
From: |
Mike Frysinger |
Subject: |
[Acl-devel] [PATCH attr 4/6 v2] modernize build system |
Date: |
Thu, 9 Jan 2014 16:30:17 -0500 |
This deletes the hand rolled build system and replaces it entirely
with autotools. The overall diffstat shows that this is a clear
win, and it makes the package build/install like every other autotool
package out there which makes the lives of distro maintainers a lot
easier.
This should also be faster by virtue of using a non-recursive build.
Things to note:
- to generate autotools:
./autogen.sh
- to see full compile output:
make V=1
- to build specific targets:
make attr getfattr ...
- to run tests:
make check
- to create a release:
make distcheck -j
Other non-developer things:
- the xattr.conf file is now installed into sysconfdir by default
- man pages are no longer compressed as this is uncommon in the
autotools world and distros don't need it anyways (they already
handle it automatically for most pakages)
- the minor # of the shared library is now based on the package
version so it'll be much bigger ... this isn't a problem, and
is actually a bugfix (older releases didn't change when they
should have)
(Again, this is all using the standard autotool targets.)
---
.gitignore | 50 +++---
Makefile | 127 --------------
Makefile.am | 31 ++++
Makepkgs | 80 ---------
VERSION | 7 -
attr/Makefile | 34 ----
autogen.sh | 4 +
configure.ac | 56 ++++---
doc/INSTALL | 48 ------
doc/Makefile | 45 -----
doc/Makemodule.am | 5 +
examples/Makefile | 30 +---
examples/Makefile.examples | 9 -
getfattr/Makefile | 35 ----
include/Makefile | 39 -----
include/Makemodule.am | 9 +
include/builddefs.in | 107 ------------
include/buildmacros | 160 ------------------
include/buildrules | 104 ------------
include/config.h.in | 42 -----
include/install-sh | 365 -----------------------------------------
libattr/Makefile | 50 ------
libattr/Makemodule.am | 22 +++
libattr/attr_copy_action.c | 2 +-
libmisc/Makefile | 31 ----
libmisc/Makemodule.am | 8 +
m4/Makefile | 32 ----
m4/manual_format.m4 | 31 ----
m4/multilib.m4 | 43 -----
m4/package_globals.m4 | 61 -------
m4/package_utilies.m4 | 95 -----------
man/Makefile | 41 -----
man/Makemodule.am | 27 +++
man/man1/Makefile | 35 ----
man/man1/Makemodule.am | 4 +
man/man2/Makefile | 35 ----
man/man2/Makemodule.am | 5 +
man/man3/Makefile | 35 ----
man/man3/Makemodule.am | 6 +
man/man5/Makefile | 35 ----
man/man5/Makemodule.am | 2 +
package/Makefile | 60 -------
package/tar/Makefile | 36 ----
po/.gitignore | 12 ++
po/LINGUAS | 3 +
po/Makefile | 40 -----
po/Makevars | 41 +++++
po/update-potfiles | 13 ++
setfattr/Makefile | 35 ----
test/Makefile | 49 ------
test/Makemodule.am | 15 ++
tools/Makemodule.am | 13 ++
{attr => tools}/attr.c | 0
{getfattr => tools}/getfattr.c | 0
{setfattr => tools}/setfattr.c | 0
55 files changed, 290 insertions(+), 2014 deletions(-)
delete mode 100644 Makefile
create mode 100644 Makefile.am
delete mode 100755 Makepkgs
delete mode 100644 VERSION
delete mode 100644 attr/Makefile
create mode 100755 autogen.sh
delete mode 100644 doc/INSTALL
delete mode 100644 doc/Makefile
create mode 100644 doc/Makemodule.am
delete mode 100644 examples/Makefile.examples
delete mode 100644 getfattr/Makefile
delete mode 100644 include/Makefile
create mode 100644 include/Makemodule.am
delete mode 100644 include/builddefs.in
delete mode 100644 include/buildmacros
delete mode 100644 include/buildrules
delete mode 100644 include/config.h.in
delete mode 100755 include/install-sh
delete mode 100644 libattr/Makefile
create mode 100644 libattr/Makemodule.am
delete mode 100644 libmisc/Makefile
create mode 100644 libmisc/Makemodule.am
delete mode 100644 m4/Makefile
delete mode 100644 m4/manual_format.m4
delete mode 100644 m4/multilib.m4
delete mode 100644 m4/package_globals.m4
delete mode 100644 m4/package_utilies.m4
delete mode 100644 man/Makefile
create mode 100644 man/Makemodule.am
delete mode 100644 man/man1/Makefile
create mode 100644 man/man1/Makemodule.am
delete mode 100644 man/man2/Makefile
create mode 100644 man/man2/Makemodule.am
delete mode 100644 man/man3/Makefile
create mode 100644 man/man3/Makemodule.am
delete mode 100644 man/man5/Makefile
create mode 100644 man/man5/Makemodule.am
delete mode 100644 package/Makefile
delete mode 100644 package/tar/Makefile
create mode 100644 po/.gitignore
create mode 100644 po/LINGUAS
delete mode 100644 po/Makefile
create mode 100644 po/Makevars
create mode 100755 po/update-potfiles
delete mode 100644 setfattr/Makefile
delete mode 100644 test/Makefile
create mode 100644 test/Makemodule.am
create mode 100644 tools/Makemodule.am
rename {attr => tools}/attr.c (100%)
rename {getfattr => tools}/getfattr.c (100%)
rename {setfattr => tools}/setfattr.c (100%)
diff --git a/.gitignore b/.gitignore
index 25af69a..c311605 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,35 +1,45 @@
+*~
*.la
*.lo
*.mo
*.o
-*[-.]manifest
+.dirstamp
+.deps/
.libs/
-/.census
+
/Logs/
-/aclocal.m4
+
/attr-*
-/attr/attr
+/attr
+/getfattr
+/setfattr
+
+/ABOUT-NLS
+/aclocal.m4
/autom4te.cache/
+/ar-lib
+/config.cache
/config.guess
/config.log
+/config.rpath
/config.status
/config.sub
/configure
-/doc/CHANGES.gz
-/getfattr/getfattr
-/include/attr
-/include/builddefs
-/include/config.h
+/compile
+/depcomp
+/install-sh
/libtool
/ltmain.sh
-/po/attr.pot
-/setfattr/setfattr
-attr-*.tar.gz
-install-sh
-m4/libtool.m4
-m4/ltoptions.m4
-m4/ltsugar.m4
-m4/ltversion.m4
-m4/lt~obsolete.m4
-config.h.in
-*~
+/m4/
+/missing
+/test-driver
+Makefile
+Makefile.in
+stamp-h1
+
+*.log
+*.trs
+
+/include/attr
+/include/config.h
+/include/config.h.in
diff --git a/Makefile b/Makefile
deleted file mode 100644
index bd97921..0000000
--- a/Makefile
+++ /dev/null
@@ -1,127 +0,0 @@
-#
-# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = .
-HAVE_BUILDDEFS = $(shell test -f $(TOPDIR)/include/builddefs && echo yes ||
echo no)
-
-ifeq ($(HAVE_BUILDDEFS), yes)
-include $(TOPDIR)/include/builddefs
-endif
-
-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
-SRCFILES = \
- xattr.conf
-LSRCFILES = \
- configure.ac Makepkgs install-sh exports README VERSION \
- $(CONFIGURE)
-
-LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
- Logs/* built .census install.* install-dev.* install-lib.* *.gz
-
-LIB_SUBDIRS = include libmisc libattr
-TOOL_SUBDIRS = attr getfattr setfattr examples test m4 man doc po package
-
-SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
-
-default: include/builddefs include/config.h
-ifeq ($(HAVE_BUILDDEFS), no)
- $(MAKE) -C . $@
-else
- $(MAKE) $(SUBDIRS)
-endif
-
-# tool/lib dependencies
-libattr: include
-getfattr setfattr: libmisc libattr
-attr: libattr
-
-ifeq ($(HAVE_BUILDDEFS), yes)
-include $(BUILDRULES)
-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=/ \
- --exec-prefix=/ \
- --sbindir=/bin \
- --bindir=/usr/bin \
- --libdir=/lib \
- --libexecdir=/usr/lib \
- --enable-lib64=yes \
- --includedir=/usr/include \
- --mandir=/usr/share/man \
- --datadir=/usr/share \
- $$LOCAL_CONFIGURE_OPTIONS
- touch .census
-
-include/config.h: include/builddefs
-## Recover from the removal of $@
- @if test -f $@; then :; else \
- rm -f include/builddefs; \
- $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \
- fi
-
-install: default $(addsuffix -install,$(SUBDIRS))
- $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
- $(INSTALL) -m 644 README $(PKG_DOC_DIR)
- $(INSTALL) -m 755 -d $(PKG_CONF_DIR)
- $(INSTALL) -m 644 xattr.conf $(PKG_CONF_DIR)
-
-install-dev: default $(addsuffix -install-dev,$(SUBDIRS))
-
-install-lib: install $(addsuffix -install-lib,$(SUBDIRS))
-
-%-install:
- $(MAKE) -C $* install
-
-%-install-dev:
- $(MAKE) -C $* install-dev
-
-%-install-lib:
- $(MAKE) -C $* install-lib
-
-realclean distclean: clean
- rm -f $(LDIRT) $(CONFIGURE)
- rm -f include/builddefs include/config.h install-sh libtool
- rm -rf autom4te.cache Logs
-
-.PHONY: tests root-tests ext-tests
-tests root-tests ext-tests: default
- $(MAKE) -C test/ $@
-
-# HACK: Convert the man pages into html
-html:
- @for man in $$(find man -name '*.[1-9]'); do \
- echo $${man%.*}.html ; \
- groff -man -Thtml -P-h -P-l $$man > $${man%.*}.html; \
- done
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..5f0fadc
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,31 @@
+ACLOCAL_AMFLAGS = -I m4
+
+EXTRA_DIST = \
+ exports
+
+SUBDIRS = po
+
+AM_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -DSYSCONFDIR=\"$(sysconfdir)\"
+
+attrincludedir = $(includedir)/attr
+
+attrinclude_HEADERS =
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+noinst_HEADERS =
+noinst_LTLIBRARIES =
+dist_doc_DATA =
+dist_man_MANS =
+dist_sysconf_DATA = xattr.conf
+
+include doc/Makemodule.am
+include include/Makemodule.am
+include libattr/Makemodule.am
+include libmisc/Makemodule.am
+include man/Makemodule.am
+include test/Makemodule.am
+include tools/Makemodule.am
diff --git a/Makepkgs b/Makepkgs
deleted file mode 100755
index 7386910..0000000
--- a/Makepkgs
+++ /dev/null
@@ -1,80 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2001, 2002, 2003 Silicon Graphics, Inc. All rights reserved.
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-LOGDIR=Logs
-
-verbose=false
-
-MAKE=${MAKE:-make}
-test ! -z "$MAKE" && make=$MAKE
-
-for opt in $*
-do
- case "$opt" in
- clean)
- ;; # ignored, kept for backward compatibility
- verbose)
- verbose=true ;;
- *)
- echo "Usage: Makepkgs [verbose]"; exit 1 ;;
- esac
-done
-
-# start with a clean manifest
-test ! -d $LOGDIR && mkdir $LOGDIR
-rm -rf $LOGDIR/* > /dev/null 2>&1
-
-# build Debian packages, cleans itself before starting
-SUDO=${SUDO:-sudo}
-test ! -z "$SUDO" && sudo=$SUDO
-
-# build packages - manual clean before starting
-echo "== clean, log is $LOGDIR/clean"
-if $verbose ; then
- $MAKE clean 2>&1 | tee $LOGDIR/clean
-else
- $MAKE clean > $LOGDIR/clean 2>&1 || exit 1
-fi
-
-echo
-echo "== configure, log is $LOGDIR/configure"
-rm -f .census # force configure to run here
-if $verbose ; then
- $MAKE configure 2>&1 | tee $LOGDIR/configure
-else
- $MAKE configure > $LOGDIR/configure 2>&1 || exit 1
-fi
-
-echo
-echo "== default, log is $LOGDIR/default"
-if $verbose ; then
- $MAKE default 2>&1 | tee $LOGDIR/default
-else
- $MAKE default > $LOGDIR/default 2>&1 || exit 1
-fi
-
-echo
-echo "== dist, log is $LOGDIR/dist"
-[ ! -f .census ] && touch .census
-if $verbose ; then
- $MAKE -C package dist 2>&1 | tee $LOGDIR/dist
-else
- $MAKE -C package dist > $LOGDIR/dist 2>&1 || exit 1
- grep '^Wrote:' $LOGDIR/dist | sed -e 's/\.\.\/\.\.\///'
-fi
-
-exit 0
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 550314d..0000000
--- a/VERSION
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# This file is used by configure to get version information
-#
-PKG_MAJOR=2
-PKG_MINOR=4
-PKG_REVISION=47
-PKG_BUILD=0
diff --git a/attr/Makefile b/attr/Makefile
deleted file mode 100644
index 1c467e8..0000000
--- a/attr/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LTCOMMAND = attr
-CFILES = attr.c
-LLDLIBS = $(LIBATTR)
-LTDEPENDENCIES = $(LIBATTR)
-
-default: $(LTCOMMAND)
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL) -m 755 -d $(PKG_BIN_DIR)
- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)
-install-dev install-lib:
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..a98a3c5
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -ex
+po/update-potfiles
+autopoint --force
+exec autoreconf -f -i
diff --git a/configure.ac b/configure.ac
index b966d0e..5b15869 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,36 +13,46 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-AC_INIT(include/attributes.h)
+
+AC_INIT([attr], [2.4.48], address@hidden)
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_HEADER(include/config.h)
+AC_CONFIG_HEADER([include/config.h])
AC_PREFIX_DEFAULT(/usr)
-AC_PROG_LIBTOOL
+AM_INIT_AUTOMAKE([-Wall foreign 1.11 dist-xz subdir-objects])
+AM_SILENT_RULES([yes])
-AC_ARG_ENABLE(shared,
-[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
- enable_shared=yes)
-AC_SUBST(enable_shared)
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_USE_SYSTEM_EXTENSIONS
+AC_C_CONST
+AC_TYPE_MODE_T
+AC_FUNC_ALLOCA
-AC_ARG_ENABLE(gettext,
-[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
- enable_gettext=yes)
-AC_SUBST(enable_gettext)
+AM_PROG_AR
+LT_INIT
-AC_ARG_ENABLE(lib64,
-[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
- enable_lib64=no)
-AC_SUBST(enable_lib64)
+AM_GNU_GETTEXT_VERSION([0.18.2])
+AM_GNU_GETTEXT([external])
-AC_PACKAGE_GLOBALS(attr)
-AC_PACKAGE_UTILITIES(attr)
-AC_MANUAL_FORMAT
-AC_MULTILIB($enable_lib64)
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug], [Enable extra debugging])])
+AS_IF([test "x$enable_debug" = "xyes"],
+ [CPPFLAGS="$CPPFLAGS -DDEBUG"],
+ [CPPFLAGS="$CPPFLAGS -DNDEBUG"])
-AC_C_CONST
-AC_TYPE_MODE_T
-AC_FUNC_ALLOCA
+dnl Automatically increment the revision for every release.
+LT_REVISION=$(echo "${PACKAGE_VERSION}" | tr -d .)
+AC_SUBST(LT_REVISION)
-AC_OUTPUT(include/builddefs)
+AC_CONFIG_COMMANDS([include/attr],
+ [dnl
+ rm -rf include/attr
+ $as_ln_s "$ac_abs_top_srcdir/include" include/attr
+ ])
+AC_CONFIG_FILES([
+ Makefile
+ po/Makefile.in
+])
+AC_OUTPUT
diff --git a/doc/INSTALL b/doc/INSTALL
deleted file mode 100644
index 9f9f45f..0000000
--- a/doc/INSTALL
+++ /dev/null
@@ -1,48 +0,0 @@
-This document describes how to configure and build the extended
-attribute library and utility from source, and how to install them.
-
-0. If you have the binary rpm, simply install it and skip to step 2 (below).
- The rpm command to do this is:
- # rpm -Uvh attr
-
- The Debian command to do this is:
- # dpkg -i attr
- or, if you have apt configured (don't need the binary package):
- # apt-get install attr
-
-1. Configure, build and install the package
-
- The "attr" package uses autoconf/configure and expects a GNU build
- environment (your platform must at least have both autoconf and gmake).
-
- If you just want to spin an RPM and/or tar file, use the Makepkgs
- script in the top level directory. This will configure and build
- the package and leave binary and src RPMs in the build/rpm
- directory. It will also leave a tar file in the build/tar
- directory.
-
- # ./Makepkgs verbose
-
- If you want to build the package and install it manually, use the
- following steps:
-
- # make configure (or run autoreconf; ./configure)
- # make
- # su root
- # make install install-lib
-
- Note that there are so many "install" variants out there that we
- wrote our own script (see "install-sh" in the top level directory).
-
- If you wish to turn off debugging asserts in the command build and
- turn on the optimizer then set the shell environment variables:
-
- OPTIMIZER=-O
- DEBUG=-DNDEBUG
-
- before running make configure or Makepkgs.
-
-2. How to Contribute
-
- See the README file in this directory for details about how to
- contribute to the Linux extended attributes project.
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644
index c10ced6..0000000
--- a/doc/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LSRCFILES = INSTALL PORTING CHANGES COPYING COPYING.LGPL
-LDIRT = *.gz
-
-default: $(SUBDIRS) CHANGES.gz
- $(SUBDIRS_MAKERULE)
-
-include $(BUILDRULES)
-
-CHANGES.gz:
- $(ZIP) --best -c < CHANGES > $@
-
-install: default
- $(SUBDIRS_MAKERULE)
- $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
- $(INSTALL) -m 644 PORTING CHANGES.gz $(PKG_DOC_DIR)
-ifeq ($(PKG_DISTRIBUTION), debian)
- $(INSTALL) -S CHANGES.gz $(PKG_DOC_DIR)/changelog.gz
-else
- $(INSTALL) -m 644 COPYING $(PKG_DOC_DIR)
- $(INSTALL) -m 644 COPYING.LGPL $(PKG_DOC_DIR)
-endif
-
-install-dev install-lib: $(SUBDIRS)
- $(SUBDIRS_MAKERULE)
diff --git a/doc/Makemodule.am b/doc/Makemodule.am
new file mode 100644
index 0000000..e985636
--- /dev/null
+++ b/doc/Makemodule.am
@@ -0,0 +1,5 @@
+dist_doc_DATA += \
+ doc/CHANGES \
+ doc/COPYING \
+ doc/COPYING.LGPL \
+ doc/PORTING
diff --git a/examples/Makefile b/examples/Makefile
index f109739..8d6b5a3 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,27 +1,9 @@
-#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
+CFLAGS = -g -Wall -I../include
+LDFLAGS = -lattr
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
+PROGS = copyattr
-LSRCFILES = copyattr.c
-LDIRT = copyattr
+all : $(PROGS)
-include $(BUILDRULES)
-
-default install install-dev install-lib:
+clean:
+ rm -f $(PROGS)
diff --git a/examples/Makefile.examples b/examples/Makefile.examples
deleted file mode 100644
index 05c7831..0000000
--- a/examples/Makefile.examples
+++ /dev/null
@@ -1,9 +0,0 @@
-CFLAGS = -g -Wall
-LDFLAGS = -lattr
-
-PROGS = copyattr
-
-all : $(PROGS)
-
-clean:
- rm -f $(PROGS)
diff --git a/getfattr/Makefile b/getfattr/Makefile
deleted file mode 100644
index 91d3df2..0000000
--- a/getfattr/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LTCOMMAND = getfattr
-CFILES = getfattr.c
-
-LLDLIBS = $(LIBMISC) $(LIBATTR)
-LTDEPENDENCIES = $(LIBMISC) $(LIBATTR)
-
-default: $(LTCOMMAND)
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL) -m 755 -d $(PKG_BIN_DIR)
- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)
-install-dev install-lib:
diff --git a/include/Makefile b/include/Makefile
deleted file mode 100644
index 3068e56..0000000
--- a/include/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-INCDIR = attr
-INST_HFILES = attributes.h xattr.h error_context.h libattr.h
-HFILES = $(INST_HFILES) misc.h walk_tree.h
-LSRCFILES = builddefs.in buildmacros buildrules config.h.in install-sh
-LDIRT = $(INCDIR)
-
-default: $(INCDIR)
-
-$(INCDIR):
- $(LN_S) . $@
-
-include $(BUILDRULES)
-
-install-dev: default
- $(INSTALL) -m 755 -d $(PKG_INC_DIR)
- $(INSTALL) -m 644 $(INST_HFILES) $(PKG_INC_DIR)
-
-install install-lib:
diff --git a/include/Makemodule.am b/include/Makemodule.am
new file mode 100644
index 0000000..7258423
--- /dev/null
+++ b/include/Makemodule.am
@@ -0,0 +1,9 @@
+attrinclude_HEADERS += \
+ include/attributes.h \
+ include/error_context.h \
+ include/libattr.h \
+ include/xattr.h
+
+noinst_HEADERS += \
+ include/misc.h \
+ include/walk_tree.h
diff --git a/include/builddefs.in b/include/builddefs.in
deleted file mode 100644
index eef7aad..0000000
--- a/include/builddefs.in
+++ /dev/null
@@ -1,107 +0,0 @@
-#
-# Copyright (c) 2002-2006 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-# @configure_input@
-#
-
-ifndef _BUILDDEFS_INCLUDED_
-_BUILDDEFS_INCLUDED_ = 1
-
-DEBUG = @debug_build@
-OPTIMIZER = @opt_build@
-MALLOCLIB = @malloc_lib@
-LOADERFLAGS = @LDFLAGS@
-
-LIBATTR = $(TOPDIR)/libattr/libattr.la
-LIBMISC = $(TOPDIR)/libmisc/libmisc.la
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-top_builddir = @top_builddir@
-datarootdir = @datarootdir@
-
-PKG_NAME = @pkg_name@
-PKG_USER = @pkg_user@
-PKG_GROUP = @pkg_group@
-PKG_RELEASE = @pkg_release@
-PKG_VERSION = @pkg_version@
-PKG_PLATFORM = @pkg_platform@
-PKG_DISTRIBUTION= @pkg_distribution@
-PKG_BIN_DIR = @bindir@
-PKG_SBIN_DIR = @sbindir@
-PKG_LIB_DIR = @libdir@@libdirsuffix@
-PKG_DEVLIB_DIR = @libdir@@libdirsuffix@
-PKG_INC_DIR = @includedir@/attr
-PKG_MAN_DIR = @mandir@
-PKG_DOC_DIR = @datadir@/doc/@pkg_name@
-PKG_LOCALE_DIR = @datadir@/locale
-PKG_CONF_DIR = @sysconfdir@
-
-CC = @cc@
-AWK = @awk@
-SED = @sed@
-TAR = @tar@
-ZIP = @zip@
-MAKE = @make@
-ECHO = @echo@
-SORT = @sort@
-LN_S = @LN_S@
-SHELL = @SHELL@
-LIBTOOL = @LIBTOOL@
-MAKEDEPEND = @makedepend@
-
-MSGFMT = @msgfmt@
-MSGMERGE = @msgmerge@
-XGETTEXT = @xgettext@
-
-ENABLE_SHARED = @enable_shared@
-ENABLE_GETTEXT = @enable_gettext@
-
-HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
-
-ifneq "$(findstring $(PKG_PLATFORM), linux gnu gnu/kfreebsd gnu/knetbsd)" ""
-PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-endif
-
-ifeq ($(PKG_PLATFORM),linux)
-DEPENDFLAGS = -D__linux__
-endif
-ifeq ($(PKG_PLATFORM),darwin)
-DEPENDFLAGS = -D__APPLE__
-endif
-ifeq ($(PKG_PLATFORM),irix)
-DEPENDFLAGS = -D__sgi__
-endif
-ifeq ($(PKG_PLATFORM),freebsd)
-DEPENDFLAGS = -D__FreeBSD__
-endif
-
-GCFLAGS = $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
- -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
- -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include
-
-# Global, Platform, Local CFLAGS
-CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
-
-include $(TOPDIR)/include/buildmacros
-
-endif
-
-#
-# For targets that should always be rebuilt,
-# define a target that is never up-to-date.
-# Targets needing this should depend on $(_FORCE)
-_FORCE = __force_build
diff --git a/include/buildmacros b/include/buildmacros
deleted file mode 100644
index 9e81bb8..0000000
--- a/include/buildmacros
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-BUILDRULES = $(TOPDIR)/include/buildrules
-
-# LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in
-# user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES)
-# $(CXXFILES), or $(HFILES) and is used to construct the manifest list
-# during the "dist" phase (packaging).
-
-LDFLAGS += $(LOADERFLAGS) $(LLDFLAGS)
-LTLDFLAGS += $(LOADERFLAGS)
-LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB)
-
-MAKEOPTS = --no-print-directory
-SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)
-
-DEPDIRT = dep dep.bak
-MANDIRT = *.[1-9].gz
-PODIRT = *.tmpo *.mo
-CDIRT = $(OBJECTS) $(LTOBJECTS) $(LTCOMMAND) $(LTLIBRARY)
-DIRT = $(LDIRT) $(DEPDIRT) $(MANDIRT) $(PODIRT) $(CDIRT)
-
-OBJECTS = $(ASFILES:.s=.o) \
- $(CFILES:.c=.o) \
- $(LFILES:.l=.o) \
- $(YFILES:%.y=%.tab.o)
-
-INSTALL = $(TOPDIR)/include/install-sh -o $(PKG_USER) -g $(PKG_GROUP)
-
-IMAGES_DIR = $(TOPDIR)/all-images
-DIST_DIR = $(TOPDIR)/dist
-
-CCF = $(CC) $(CFLAGS) $(CPPFLAGS)
-MAKEF = $(MAKE) $(MAKEOPTS)
-CXXF = $(CXX) $(CXXFLAGS)
-
-# For libtool.
-LIBNAME = $(basename $(LTLIBRARY))
-LTOBJECTS = $(OBJECTS:.o=.lo)
-LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
-
-LTLINK = $(LIBTOOL) --mode=link $(CC)
-LTEXEC = $(LIBTOOL) --mode=execute
-LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF)
-
-ifeq ($(ENABLE_SHARED),yes)
-LTLDFLAGS += -rpath $(PKG_LIB_DIR)
-LTLDFLAGS += -version-info $(LTVERSION)
-endif
-
-ifeq ($(ENABLE_SHARED),yes)
-INSTALL_LTLIB = \
- cd $(TOPDIR)/$(LIBNAME)/.libs; \
- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
- ../$(INSTALL) -m 644 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \
- ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR)
-endif
-
-# Libtool thinks the static and shared libs should be in the same dir, so
-# make the static lib appear in the place we chose as rpath (using the two
-# symlinks below).
-# Other things want the shared libs to appear in /usr/lib, else they'll
-# link with the static libs there. So, another symlink to get the .so into
-# /usr/lib.
-ifeq ($(ENABLE_SHARED),yes)
-INSTALL_LTLIB_DEV = \
- cd $(TOPDIR)/$(LIBNAME)/.libs; \
- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
- ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \
- ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \
- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
- ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
- if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a
$(PKG_LIB_DIR)/$(LIBNAME).a; \
- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la
$(PKG_LIB_DIR)/$(LIBNAME).la; \
- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so
$(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
- fi
-else
-INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
-endif
-
-INSTALL_LTLIB_STATIC = \
- cd $(TOPDIR)/$(LIBNAME)/.libs; \
- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR);
-
-INSTALL_MAN = \
- @for d in $(MAN_PAGES); do \
- first=true; \
- for m in `$(AWK) \
- '/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
- | $(SED) \
- -e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
- -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
- do \
- [ -z "$$m" -o "$$m" = "\\" ] && continue; \
- t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
- if $$first; then \
- if $(HAVE_ZIPPED_MANPAGES); then \
- $(ZIP) -9 -c $$d > $$d.gz; _sfx=.gz; \
- fi; \
- u=$$m.$(MAN_SECTION)$$_sfx; \
- echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx;\
- $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
- else \
- echo $(INSTALL) -S $$u $${t}$$_sfx; \
- $(INSTALL) -S $$u $${t}$$_sfx; \
- fi; \
- first=false; \
- done; \
- done
-
-ifeq ($(ENABLE_GETTEXT),yes)
-INSTALL_LINGUAS = \
- @for l in $(LINGUAS) ""; do \
- if test -f "$$l.mo" ; then \
- ldir=$(PKG_LOCALE_DIR)/$$l/LC_MESSAGES; \
- $(INSTALL) -m 755 -d $$ldir; \
- $(INSTALL) -m 644 $$l.mo $$ldir/$(PKG_NAME).mo; \
- fi; \
- done
-endif
-
-MAN_MAKERULE = \
- @for f in *.[12345678] ""; do \
- if test ! -z "$$f"; then \
- $(ZIP) --best -c < $$f > $$f.gz; \
- fi; \
- done
-
-DIST_MAKERULE = \
- $(MAKEF) -C build dist
-
-SOURCE_MAKERULE = \
- @test -z "$$DIR" && DIR="."; \
- for f in $(SRCFILES) ""; do \
- test -z "$$f" && break; \
- test -L "$$f" || $(ECHO) $$DIR/$$f; \
- done; \
- for d in `echo $(SUBDIRS)` ""; do \
- test -z "$$d" && break; \
- if test -d "$$d"; then \
- $(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \
- fi; \
- done
diff --git a/include/buildrules b/include/buildrules
deleted file mode 100644
index 159d70c..0000000
--- a/include/buildrules
+++ /dev/null
@@ -1,104 +0,0 @@
-#
-# Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-ifndef _BUILDRULES_INCLUDED_
-_BUILDRULES_INCLUDED_ = 1
-
-include $(TOPDIR)/include/builddefs
-
-clean clobber : $(addsuffix -clean,$(SUBDIRS))
- rm -f $(DIRT)
- @rm -fr .libs
-
-%-clean:
- $(MAKE) -C $* clean
-
-# Never blow away subdirs
-ifdef SUBDIRS
-.PRECIOUS: $(SUBDIRS)
-.PHONY: $(SUBDIRS)
-
-$(SUBDIRS):
- $(MAKE) -C $@
-endif
-
-#
-# Standard targets
-#
-
-ifdef LTCOMMAND
-$(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES)
- $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
-endif
-
-ifdef LTLIBRARY
-$(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
- $(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
-
-%.lo: %.c
- $(LTCOMPILE) -c $<
-endif
-
-ifdef POTHEAD
-%.pot: $(XGETTEXTFILES)
- $(XGETTEXT) --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
-
-# Generate temp .po files, to check whether translations need updating.
-# Not by default, due to gettext output differences between versions.
-%.po: $(POTHEAD)
-# $(MSGMERGE) -o address@hidden $@ $(POTHEAD)
-# if ! diff address@hidden $@ >/dev/null; then echo "$@ dated, see
address@hidden"; fi
-
-%.mo: %.po
- $(MSGFMT) -o $@ $<
-endif
-
-source :
- $(SOURCE_MAKERULE)
-
-endif # _BUILDRULES_INCLUDED_
-
-$(_FORCE):
-
-.PHONY : depend
-
-DEPENDSCRIPT := $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
- $(SED) -e 's,`pwd`,$(TOPDIR),g' \
- -e 's, */[^ ]*,,g' \
- -e '/^[^ ]*: *$$/d' \
- -e '/^ *$$/d'
-
-ifdef LTLIBRARY
-DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
-endif
-
-depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS))
- $(DEPENDSCRIPT) > .dep
- test -s .dep || rm -f .dep
-
-%-depend:
- $(MAKE) -C $* depend
-
-# Include dep, but only if it exists
-ifeq ($(shell test -f .dep && echo .dep), .dep)
-include .dep
-else
-ifdef LTLIBRARY
-$(LTOBJECTS): $(HFILES)
-else
-$(OBJECTS): $(HFILES)
-endif
-endif
diff --git a/include/config.h.in b/include/config.h.in
deleted file mode 100644
index 5695431..0000000
--- a/include/config.h.in
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved.
- *
- * 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, either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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, see <http://www.gnu.org/licenses/>.
- *
- * @configure_input@
- */
-#ifndef __CONFIG_H__
-#define __CONFIG_H__
-
-/* Define if you want gettext (I18N) support */
-#undef ENABLE_GETTEXT
-
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
-
-#ifdef ENABLE_GETTEXT
-# include <libintl.h>
-# define _(x) gettext(x)
-#else
-# define _(x) (x)
-# define textdomain(d) do { } while (0)
-# define bindtextdomain(d,dir) do { } while (0)
-#endif
-#include <locale.h>
-
-#endif /* __CONFIG_H__ */
diff --git a/include/install-sh b/include/install-sh
deleted file mode 100755
index fb4997a..0000000
--- a/include/install-sh
+++ /dev/null
@@ -1,365 +0,0 @@
-#! /bin/sh
-#
-# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-# 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=:
-
-: ${DIST_ROOT:=${DESTDIR}}
-
-[ -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
diff --git a/libattr/Makefile b/libattr/Makefile
deleted file mode 100644
index c084130..0000000
--- a/libattr/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-
-LTLDFLAGS += -Wl,--version-script,$(TOPDIR)/exports
-include $(TOPDIR)/include/builddefs
-
-LTLIBRARY = libattr.la
-LT_CURRENT = 2
-LT_REVISION = 0
-LT_AGE = 1
-
-CFILES = libattr.c attr_copy_fd.c attr_copy_file.c attr_copy_check.c
attr_copy_action.c
-HFILES = libattr.h
-
-ifeq ($(PKG_PLATFORM),linux)
-CFILES += syscalls.c
-else
-LSRCFILES = syscalls.c
-endif
-
-LCFLAGS = -include libattr.h
-
-default: $(LTLIBRARY)
-
-include $(BUILDRULES)
-
-install:
-
-install-lib: default
- $(INSTALL_LTLIB)
-
-install-dev: default
- $(INSTALL_LTLIB_DEV)
diff --git a/libattr/Makemodule.am b/libattr/Makemodule.am
new file mode 100644
index 0000000..7e06e8e
--- /dev/null
+++ b/libattr/Makemodule.am
@@ -0,0 +1,22 @@
+lib_LTLIBRARIES += libattr.la
+
+# No other library exports version info, otherwise we'd have to add
+# "libattr_" prefix to all these variables.
+LT_CURRENT = 2
+# The configure script will set this for us automatically.
+#LT_REVISION =
+LT_AGE = 1
+LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+libattr_la_DEPENDENCIES = exports
+libattr_la_SOURCES = \
+ libattr/attr_copy_action.c \
+ libattr/attr_copy_check.c \
+ libattr/attr_copy_fd.c \
+ libattr/attr_copy_file.c \
+ libattr/libattr.c \
+ libattr/libattr.h \
+ libattr/syscalls.c
+libattr_la_LDFLAGS = \
+ -Wl,--version-script,$(top_srcdir)/exports \
+ -version-info $(LTVERSION)
diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
index 2697328..efcb467 100644
--- a/libattr/attr_copy_action.c
+++ b/libattr/attr_copy_action.c
@@ -27,7 +27,7 @@
#define ERROR_CONTEXT_MACROS
#include "error_context.h"
-#define ATTR_CONF "/etc/xattr.conf"
+#define ATTR_CONF SYSCONFDIR "/xattr.conf"
struct attr_action {
struct attr_action *next;
diff --git a/libmisc/Makefile b/libmisc/Makefile
deleted file mode 100644
index e64a287..0000000
--- a/libmisc/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LTLIBRARY = libmisc.la
-LTLDFLAGS =
-
-CFILES = quote.c unquote.c high_water_alloc.c next_line.c walk_tree.c
-
-default: $(LTLIBRARY)
-install install-dev install-lib:
-
-include $(BUILDRULES)
-
diff --git a/libmisc/Makemodule.am b/libmisc/Makemodule.am
new file mode 100644
index 0000000..d784622
--- /dev/null
+++ b/libmisc/Makemodule.am
@@ -0,0 +1,8 @@
+noinst_LTLIBRARIES += libmisc.la
+
+libmisc_la_SOURCES = \
+ libmisc/high_water_alloc.c \
+ libmisc/next_line.c \
+ libmisc/quote.c \
+ libmisc/unquote.c \
+ libmisc/walk_tree.c
diff --git a/m4/Makefile b/m4/Makefile
deleted file mode 100644
index 7fc6ffd..0000000
--- a/m4/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LSRCFILES = \
- manual_format.m4 \
- package_globals.m4 \
- package_utilies.m4 \
- multilib.m4
-
-default:
-
-include $(BUILDRULES)
-
-install install-dev install-lib: default
diff --git a/m4/manual_format.m4 b/m4/manual_format.m4
deleted file mode 100644
index 34aa466..0000000
--- a/m4/manual_format.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl Copyright (C) 2003 Silicon Graphics, Inc.
-dnl
-dnl This program is free software: you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation, either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Find format of installed man pages.
-# Always gzipped on Debian, but not Redhat pre-7.0.
-# We don't deal with bzip2'd man pages, which Mandrake uses,
-# someone will send us a patch sometime hopefully. :-)
-#
-AC_DEFUN([AC_MANUAL_FORMAT],
- [ have_zipped_manpages=false
- for d in ${prefix}/share/man ${prefix}/man ; do
- if test -f $d/man1/man.1.gz
- then
- have_zipped_manpages=true
- break
- fi
- done
- AC_SUBST(have_zipped_manpages)
- ])
diff --git a/m4/multilib.m4 b/m4/multilib.m4
deleted file mode 100644
index 8d991d8..0000000
--- a/m4/multilib.m4
+++ /dev/null
@@ -1,43 +0,0 @@
-# The AC_MULTILIB macro was extracted and modified from
-# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file
-# so that the correct paths can be used for 64-bit libraries.
-#
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl From Bruno Haible.
-
-dnl AC_MULTILIB creates a variable libdirsuffix, containing
-dnl the suffix of the libdir, either "" or "64".
-dnl Only do this if the given enable parameter is "yes".
-AC_DEFUN([AC_MULTILIB],
-[
- dnl There is no formal standard regarding lib and lib64. The current
- dnl practice is that on a system supporting 32-bit and 64-bit instruction
- dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
- dnl libraries go under $prefix/lib. We determine the compiler's default
- dnl mode by looking at the compiler's library search path. If at least
- dnl of its elements ends in /lib64 or points to a directory whose absolute
- dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
- dnl default, namely "lib".
- enable_lib64="$1"
- libdirsuffix=""
- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e
's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test "$enable_lib64" = "yes" -a -n "$searchpath"; then
- save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib64/ | */lib64 ) libdirsuffix=64 ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) libdirsuffix=64 ;;
- esac ;;
- esac
- fi
- done
- IFS="$save_IFS"
- fi
- AC_SUBST(libdirsuffix)
-])
diff --git a/m4/package_globals.m4 b/m4/package_globals.m4
deleted file mode 100644
index 915886e..0000000
--- a/m4/package_globals.m4
+++ /dev/null
@@ -1,61 +0,0 @@
-dnl Copyright (C) 2003, 2004, 2006, 2007 Silicon Graphics, Inc.
-dnl
-dnl This program is free software: you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation, either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Generic macro, sets up all of the global packaging variables.
-# The following environment variables may be set to override defaults:
-# DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP
-# BUILD_VERSION
-#
-AC_DEFUN([AC_PACKAGE_GLOBALS],
- [ pkg_name="$1"
- AC_SUBST(pkg_name)
-
- AC_PROG_CC
-
- . ./VERSION
- pkg_version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION}
- AC_SUBST(pkg_version)
- pkg_release=$PKG_BUILD
- test -z "$BUILD_VERSION" || pkg_release="$BUILD_VERSION"
- AC_SUBST(pkg_release)
-
- DEBUG=${DEBUG:-'-DDEBUG'} dnl -DNDEBUG
- debug_build="$DEBUG"
- AC_SUBST(debug_build)
-
- OPTIMIZER=${OPTIMIZER:-'-g -O2'}
- opt_build="$OPTIMIZER"
- AC_SUBST(opt_build)
-
- MALLOCLIB=${MALLOCLIB:-''} dnl /usr/lib/libefence.a
- malloc_lib="$MALLOCLIB"
- AC_SUBST(malloc_lib)
-
- pkg_user=`id -u -n`
- test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER"
- AC_SUBST(pkg_user)
-
- pkg_group=`id -g -n`
- test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP"
- AC_SUBST(pkg_group)
-
- pkg_distribution=`uname -s`
- test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION"
- AC_SUBST(pkg_distribution)
-
- pkg_platform=`uname -s | tr 'A-Z' 'a-z' | sed -e 's/irix64/irix/'`
- test -z "$PLATFORM" || pkg_platform="$PLATFORM"
- AC_SUBST(pkg_platform)
- ])
diff --git a/m4/package_utilies.m4 b/m4/package_utilies.m4
deleted file mode 100644
index 5f44914..0000000
--- a/m4/package_utilies.m4
+++ /dev/null
@@ -1,95 +0,0 @@
-dnl Copyright (C) 2003, 2004, 2005, 2006, 2007 Silicon Graphics, Inc.
-dnl
-dnl This program is free software: you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation, either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Check for specified utility (env var) - if unset, fail.
-#
-AC_DEFUN([AC_PACKAGE_NEED_UTILITY],
- [ if test -z "$2"; then
- echo
- echo FATAL ERROR: $3 does not seem to be installed.
- echo $1 cannot be built without a working $4 installation.
- exit 1
- fi
- ])
-
-#
-# Generic macro, sets up all of the global build variables.
-# The following environment variables may be set to override defaults:
-# CC MAKE LIBTOOL TAR ZIP MAKEDEPEND AWK SED ECHO SORT
-# MSGFMT MSGMERGE XGETTEXT
-#
-AC_DEFUN([AC_PACKAGE_UTILITIES],
- [ AC_PROG_CC
- cc="$CC"
- AC_SUBST(cc)
- AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler])
-
-
search_path="$PATH$PATH_SEPARATOR/usr/freeware/bin$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR/usr/local/bin"
-
- AC_PATH_PROGS(MAKE, gmake make,, $search_path)
- make=$MAKE
- AC_SUBST(make)
- AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
-
- AC_PATH_PROG(TAR, tar,, $search_path)
- tar=$TAR
- AC_SUBST(tar)
-
- AC_PATH_PROG(ZIP, gzip,, $search_path)
- zip=$ZIP
- AC_SUBST(zip)
-
- AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
- makedepend=$MAKEDEPEND
- AC_SUBST(makedepend)
-
- AC_PATH_PROG(AWK, awk,, $search_path)
- awk=$AWK
- AC_SUBST(awk)
-
- AC_PATH_PROG(SED, sed,, $search_path)
- sed=$SED
- AC_SUBST(sed)
-
- AC_PATH_PROG(ECHO, echo,, $search_path)
- echo=$ECHO
- AC_SUBST(echo)
-
- AC_PATH_PROG(SORT, sort,, $search_path)
- sort=$SORT
- AC_SUBST(sort)
-
- dnl check if symbolic links are supported
- AC_PROG_LN_S
-
- if test "$enable_gettext" = yes; then
- AC_PATH_PROG(MSGFMT, msgfmt,, $search_path)
- msgfmt=$MSGFMT
- AC_SUBST(msgfmt)
- AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext)
-
- AC_PATH_PROG(MSGMERGE, msgmerge,, $search_path)
- msgmerge=$MSGMERGE
- AC_SUBST(msgmerge)
- AC_PACKAGE_NEED_UTILITY($1, "$msgmerge", msgmerge, gettext)
-
- AC_PATH_PROG(XGETTEXT, xgettext,, $search_path)
- xgettext=$XGETTEXT
- AC_SUBST(xgettext)
- AC_PACKAGE_NEED_UTILITY($1, "$xgettext", xgettext, gettext)
-
- AC_DEFINE([ENABLE_GETTEXT], 1, [enable gettext])
- fi
- ])
diff --git a/man/Makefile b/man/Makefile
deleted file mode 100644
index 9535426..0000000
--- a/man/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-SUBDIRS = man1 man2 man3 man5
-
-default : $(SUBDIRS)
-
-install : $(addsuffix -install,$(SUBDIRS))
-
-install-dev : $(addsuffix -install-dev,$(SUBDIRS))
-
-install-lib : $(addsuffix -install-lib,$(SUBDIRS))
-
-%-install:
- $(MAKE) -C $* install
-
-%-install-dev:
- $(MAKE) -C $* install-dev
-
-%-install-lib:
- $(MAKE) -C $* install-lib
-
-include $(BUILDRULES)
diff --git a/man/Makemodule.am b/man/Makemodule.am
new file mode 100644
index 0000000..18cb279
--- /dev/null
+++ b/man/Makemodule.am
@@ -0,0 +1,27 @@
+include man/man1/Makemodule.am
+include man/man2/Makemodule.am
+include man/man3/Makemodule.am
+include man/man5/Makemodule.am
+
+# Support installing symlinks for man pages that cover multiple interfaces.
+install-data-hook:
+ set -e; \
+ cd "$(DESTDIR)$(mandir)"; \
+ for d in $(dist_man_MANS); do \
+ man_section=$${d##*.}; \
+ d=$${d#man/}; \
+ dst=$${d##*/}; \
+ for m in `$(AWK) \
+ '/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
+ | $(SED) \
+ -e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
+ -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
+ do \
+ [ "$$m" = "\\" ] && continue; \
+ ln="man$$man_section/$$m.$$man_section"; \
+ [ -e "$$ln" ] && continue; \
+ echo $(LN_S) $$dst $$ln; \
+ $(LN_S) $$dst $$ln; \
+ done; \
+ done; \
+ rmdir */ 2>/dev/null || :
diff --git a/man/man1/Makefile b/man/man1/Makefile
deleted file mode 100644
index 04db140..0000000
--- a/man/man1/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-MAN_SECTION = 1
-
-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
-LSRCFILES = $(MAN_PAGES)
-
-default : $(MAN_PAGES)
-
-include $(BUILDRULES)
-
-install : default
- $(INSTALL) -m 755 -d $(MAN_DEST)
- $(INSTALL_MAN)
-install-dev install-lib:
diff --git a/man/man1/Makemodule.am b/man/man1/Makemodule.am
new file mode 100644
index 0000000..0d054f2
--- /dev/null
+++ b/man/man1/Makemodule.am
@@ -0,0 +1,4 @@
+dist_man_MANS += \
+ man/man1/attr.1 \
+ man/man1/getfattr.1 \
+ man/man1/setfattr.1
diff --git a/man/man2/Makefile b/man/man2/Makefile
deleted file mode 100644
index d77309d..0000000
--- a/man/man2/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-MAN_SECTION = 2
-
-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
-LSRCFILES = $(MAN_PAGES)
-
-default install : $(MAN_PAGES)
-
-include $(BUILDRULES)
-
-install-dev : default
- $(INSTALL) -m 755 -d $(MAN_DEST)
- $(INSTALL_MAN)
-install-lib:
diff --git a/man/man2/Makemodule.am b/man/man2/Makemodule.am
new file mode 100644
index 0000000..b81b564
--- /dev/null
+++ b/man/man2/Makemodule.am
@@ -0,0 +1,5 @@
+dist_man_MANS += \
+ man/man2/getxattr.2 \
+ man/man2/listxattr.2 \
+ man/man2/removexattr.2 \
+ man/man2/setxattr.2
diff --git a/man/man3/Makefile b/man/man3/Makefile
deleted file mode 100644
index 4a07f5f..0000000
--- a/man/man3/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-MAN_SECTION = 3
-
-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
-LSRCFILES = $(MAN_PAGES)
-
-default install : $(MAN_PAGES)
-
-include $(BUILDRULES)
-
-install-dev : default
- $(INSTALL) -m 755 -d $(MAN_DEST)
- $(INSTALL_MAN)
-install-lib:
diff --git a/man/man3/Makemodule.am b/man/man3/Makemodule.am
new file mode 100644
index 0000000..e0d461b
--- /dev/null
+++ b/man/man3/Makemodule.am
@@ -0,0 +1,6 @@
+dist_man_MANS += \
+ man/man3/attr_get.3 \
+ man/man3/attr_list.3 \
+ man/man3/attr_multi.3 \
+ man/man3/attr_remove.3 \
+ man/man3/attr_set.3
diff --git a/man/man5/Makefile b/man/man5/Makefile
deleted file mode 100644
index 6b70d3d..0000000
--- a/man/man5/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-MAN_SECTION = 5
-
-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
-LSRCFILES = $(MAN_PAGES)
-
-default : $(MAN_PAGES)
-
-include $(BUILDRULES)
-
-install : default
- $(INSTALL) -m 755 -d $(MAN_DEST)
- $(INSTALL_MAN)
-install-dev install-lib:
diff --git a/man/man5/Makemodule.am b/man/man5/Makemodule.am
new file mode 100644
index 0000000..15302de
--- /dev/null
+++ b/man/man5/Makemodule.am
@@ -0,0 +1,2 @@
+dist_man_MANS += \
+ man/man5/attr.5
diff --git a/package/Makefile b/package/Makefile
deleted file mode 100644
index 0a9b6ce..0000000
--- a/package/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-MANIFEST=src-manifest
-SRCTAR=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz
-
-LDIRT = *-manifest *.gz $(TOPDIR)/$(PKG_NAME)-*
-
-# for clean and clobber
-SUBDIRS = tar
-
-# nothing to build here (it's all packaging)
-default install install-dev install-lib:
-
-include $(BUILDRULES)
-
-# Symlink in the TOPDIR is used to pack files relative to
-# product-version directory.
-$(MANIFEST) : $(_FORCE)
- @if [ ! -L $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ] ; then \
- $(LN_S) . $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ; \
- fi
- @CDIR=`pwd`; cd $(TOPDIR); \
- $(MAKE) --no-print-directory source | \
- sed -e 's/^\./$(PKG_NAME)-$(PKG_VERSION)/' > $$CDIR/$@ ;\
- if [ $$? -ne 0 ] ; then \
- exit 1; \
- else \
- unset TAPE; \
- $(TAR) -T $$CDIR/$@ -cf - | $(ZIP) --best > $$CDIR/$(SRCTAR); \
- echo Wrote: $$CDIR/$(SRCTAR); \
- fi
-
-dist : default $(MANIFEST)
- @DIST_MANIFEST=`pwd`/bin-manifest; DIST_ROOT=/tmp/$$$$; \
- export DIST_MANIFEST DIST_ROOT; \
- rm -f $$DIST_MANIFEST; \
- echo === install === && $(MAKE) -C $(TOPDIR) install || exit $$?; \
- if [ -x $(TAR) ]; then \
- ( echo "=== tar ===" && $(MAKEF) -C tar $@ || exit $$? ); \
- fi; \
- test -z "$$KEEP_DIST_ROOT" || rm -rf $$DIST_ROOT; echo Done
diff --git a/package/tar/Makefile b/package/tar/Makefile
deleted file mode 100644
index c27999d..0000000
--- a/package/tar/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-BINTAR=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-LDIRT = *.gz
-
-default install install-dev install-lib:
-
-include $(BUILDRULES)
-
-dist : default
- @HERE=`pwd`; cd $${DIST_ROOT:-/}; \
- $(SORT) -u $$HERE/../bin-manifest | $(AWK) ' \
- $$1 == "f" { printf (".%s\n", $$6); } \
- $$1 == "d" { next; } \
- $$1 == "l" { printf (".%s\n", $$3); }' \
- | $(TAR) -T - -cf - | $(ZIP) --best > $$HERE/$(BINTAR)
- @echo Wrote: `pwd`/$(BINTAR)
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644
index 0000000..b4da415
--- /dev/null
+++ b/po/.gitignore
@@ -0,0 +1,12 @@
+*.gmo
+*.sed
+*.sin
+attr.pot
+Makefile.in.in
+Makevars.template
+POTFILES
+POTFILES.in
+Rules-quot
address@hidden
address@hidden
+stamp-po
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..76ea839
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,3 @@
+cs de es fr gl nl pl sv
address@hidden
address@hidden
diff --git a/po/Makefile b/po/Makefile
deleted file mode 100644
index d071bed..0000000
--- a/po/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-POTHEAD = $(PKG_NAME).pot
-LINGUAS ?= cs de es fr gl nl pl sv
-LSRCFILES = $(LINGUAS:%=%.po) $(POTHEAD)
-LDIRT = $(POTHEAD)
-
-XGETTEXTFILES = $(TOPDIR)/attr/attr.c \
- $(TOPDIR)/getfattr/getfattr.c \
- $(TOPDIR)/setfattr/setfattr.c \
- $(TOPDIR)/libattr/attr_copy_fd.c \
- $(TOPDIR)/libattr/attr_copy_file.c
-
-default: $(POTHEAD) $(LINGUAS:%=%.mo)
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL_LINGUAS)
-
-install-dev install-lib:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..4b17ab3
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Silicon Graphics, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT)
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/update-potfiles b/po/update-potfiles
new file mode 100755
index 0000000..0201bff
--- /dev/null
+++ b/po/update-potfiles
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+
+(
+echo "# updated automatically by $0"
+echo
+find \
+ include \
+ libattr \
+ libmisc \
+ tools \
+ -name '*.[ch]' \
+ | grep -v include/config.h
+) > po/POTFILES.in
diff --git a/setfattr/Makefile b/setfattr/Makefile
deleted file mode 100644
index d55461b..0000000
--- a/setfattr/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LTCOMMAND = setfattr
-CFILES = setfattr.c
-
-LLDLIBS = $(LIBMISC) $(LIBATTR)
-LTDEPENDENCIES = $(LIBMISC) $(LIBATTR)
-
-default: $(LTCOMMAND)
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL) -m 755 -d $(PKG_BIN_DIR)
- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)
-install-dev install-lib:
diff --git a/test/Makefile b/test/Makefile
deleted file mode 100644
index b7bd8db..0000000
--- a/test/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <address@hidden>
-#
-# 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, either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-TEST = $(wildcard *.test)
-EXT = $(wildcard ext/*.test)
-ROOT = $(wildcard root/*.test)
-
-# ensure we pick these up in the source tarball
-LSRCFILES = $(TEST) $(EXT) $(ROOT) run sort-getfattr-output README
-
-default install install-dev install-lib:
-
-include $(BUILDRULES)
-
-PATH := $(abspath ../getfattr/):$(abspath ../setfattr):$(abspath
../chattr):$(PATH)
-
-tests: $(TEST)
-ext-tests: $(EXT)
-root-tests: $(ROOT)
-
-$(TEST):
- @echo "*** $@ ***"; perl run $@
-
-$(EXT):
- @echo "EXT specific tests"; @echo "*** $@ ***"; perl run $@
-
-$(ROOT):
- @echo "Note: Tests must run as root"; @echo "*** $@ ***"; perl run $@
-
-.PHONY: $(TEST) $(EXT) $(ROOT)
-.NOTPARALLEL:
diff --git a/test/Makemodule.am b/test/Makemodule.am
new file mode 100644
index 0000000..459a74c
--- /dev/null
+++ b/test/Makemodule.am
@@ -0,0 +1,15 @@
+XFAIL_TESTS = \
+ test/ext/fs.test \
+ test/root/getfattr.test
+TESTS = \
+ test/attr.test \
+ $(XFAIL_TESTS)
+
+EXTRA_DIST += \
+ test/README \
+ test/run \
+ test/sort-getfattr-output \
+ $(TESTS)
+
+AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH";
+TEST_LOG_COMPILER = $(srcdir)/test/run
diff --git a/tools/Makemodule.am b/tools/Makemodule.am
new file mode 100644
index 0000000..890c11f
--- /dev/null
+++ b/tools/Makemodule.am
@@ -0,0 +1,13 @@
+tools_ldadd = $(LDADD) libattr.la libmisc.la
+
+bin_PROGRAMS += attr
+attr_SOURCES = tools/attr.c
+attr_LDADD = $(tools_ldadd)
+
+bin_PROGRAMS += getfattr
+getfattr_SOURCES = tools/getfattr.c
+getfattr_LDADD = $(tools_ldadd)
+
+bin_PROGRAMS += setfattr
+setfattr_SOURCES = tools/setfattr.c
+setfattr_LDADD = $(tools_ldadd)
diff --git a/attr/attr.c b/tools/attr.c
similarity index 100%
rename from attr/attr.c
rename to tools/attr.c
diff --git a/getfattr/getfattr.c b/tools/getfattr.c
similarity index 100%
rename from getfattr/getfattr.c
rename to tools/getfattr.c
diff --git a/setfattr/setfattr.c b/tools/setfattr.c
similarity index 100%
rename from setfattr/setfattr.c
rename to tools/setfattr.c
--
1.8.4.3
- [Acl-devel] [PATCH attr 0/6 v2] modernize the build system, Mike Frysinger, 2014/01/09
- [Acl-devel] [PATCH attr 2/6 v2] move gettext logic into misc.h, Mike Frysinger, 2014/01/09
- [Acl-devel] [PATCH attr 6/6 v2] disable installation of man(2) pages by default, Mike Frysinger, 2014/01/09
- [Acl-devel] [PATCH attr 1/6 v2] punt debian/rpm packaging logic, Mike Frysinger, 2014/01/09
- [Acl-devel] [PATCH attr 3/6 v2] test: make running parallel/out-of-tree safe, Mike Frysinger, 2014/01/09
- [Acl-devel] [PATCH attr 4/6 v2] modernize build system,
Mike Frysinger <=
- [Acl-devel] [PATCH attr 5/6 v2] po: regenerate files after move, Mike Frysinger, 2014/01/09
- Re: [Acl-devel] [PATCH attr 0/6 v2] modernize the build system, Andreas Grünbacher, 2014/01/09