summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-02-22 05:36:02 +0100
committerDan McGee <dan@archlinux.org>2007-02-22 05:36:02 +0100
commit3595201f5f3c1274786844c541ef82edba6984f8 (patch)
tree5c3686add5a531460c27379a58d42662b24160c4
parent3b95de655b277efe895ac5de01b86c5ab313c030 (diff)
downloadpacman-3595201f5f3c1274786844c541ef82edba6984f8.tar.gz
pacman-3595201f5f3c1274786844c541ef82edba6984f8.tar.xz
* A lot of Makefile.am updates to try to get 'make dist' and 'make distcheck'
to work as expected.
-rw-r--r--Makefile.am8
-rw-r--r--TODO.dan2
-rw-r--r--configure.ac118
-rw-r--r--doc/Makefile.am10
-rw-r--r--lib/libalpm/Makefile.am65
-rw-r--r--scripts/Makefile.am24
-rw-r--r--src/pacman/Makefile.am33
-rw-r--r--src/pacman/log.h2
-rw-r--r--src/util/Makefile.am2
9 files changed, 139 insertions, 125 deletions
diff --git a/Makefile.am b/Makefile.am
index 089f140c..1074525c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,9 @@
SUBDIRS = lib/libalpm src/util src/pacman scripts doc etc
-EXTRA_DIST = \
- NEWS \
- COPYING \
- README
+# Some files automatically included, so they aren't specified below:
+# AUTHORS, COPYING, NEWS, README
+# TODO: move translation-help to ABOUT-NLS?
+EXTRA_DIST = HACKING
check: src/pacman
cd pactest; python pactest.py --test=tests/*.py -p ../src/pacman/pacman --debug=1
diff --git a/TODO.dan b/TODO.dan
index 292e021a..42b0f651 100644
--- a/TODO.dan
+++ b/TODO.dan
@@ -86,6 +86,8 @@ differ here.
Rewrite makepkg to use terminal-safe coloring/bolding. tput utility should
allow us to do this.
+Bugs/FRs to smash: 6468, 6437, 6430?, 6420, 6404, 6389, 6312?, 6284, 6273?, 6255?, 6208, 5987, 5885, 5571, 4182, 3492, 2810?, 1769, 1588, 1571
+
Other smaller things:
---------------------
diff --git a/configure.ac b/configure.ac
index 0bce1b6e..b532562c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,16 +11,9 @@ AM_INIT_AUTOMAKE
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.13.1)
-dnl Host dependant flags
-case "${host}" in
- *-*-cygwin*)
- ENV_CFLAGS="$ENV_CFLAGS -DCYGWIN"
- ;;
-esac
-
dnl Define here the libalpm version number
-PM_MAJOR_VERSION=0
-PM_MINOR_VERSION=1
+PM_MAJOR_VERSION=1
+PM_MINOR_VERSION=0
PM_MICRO_VERSION=0
PM_VERSION=$PM_MAJOR_VERSION.$PM_MINOR_VERSION.$PM_MICRO_VERSION
dnl Needed for libtool to create proper shared lib version
@@ -59,112 +52,109 @@ AC_ARG_ENABLE(doxygen,
AC_HELP_STRING([--disable-doxygen], [Build API docs via Doxygen]),
[wantdoxygen=$enableval], [wantdoxygen=yes])
+dnl Help line for config file
+AC_ARG_WITH(config-file,
+ AC_HELP_STRING([ --with-config-file=path], [Set the location of pacman's config file]),
+ [configfile=$withval], [configfile=/etc/pacman.conf])
+
+dnl Help line for debug
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--enable-debug], [Enable debugging support]),
+ [debug=$enableval], [debug=no])
+
+dnl Help line for fakeroot
+AC_ARG_ENABLE(fakeroot,
+ AC_HELP_STRING([--disable-fakeroot], [Disable fakeroot proof support]),
+ [fakeroot=$enableval], [fakeroot=yes])
+
+dnl Host dependant flags
+case "${host}" in
+ *-*-cygwin*)
+ ENV_CFLAGS="$ENV_CFLAGS -DCYGWIN"
+ ;;
+esac
+
dnl Check for architecture
-case "$host" in
- i686-*) AC_DEFINE_UNQUOTED([CARCH], ["i686"], [Architecture])
- AC_DEFINE_UNQUOTED([CARCHFLAGS], ["i686"], [Architecture])
- AC_DEFINE_UNQUOTED([ARCHSWITCH], ["march"], [Architecture])
+case "${host}" in
+ i686-*)
CARCH="i686"
CARCHFLAGS="i686"
ARCHSWITCH="march"
- CHOST="${host}"
;;
- x86_64-*) AC_DEFINE_UNQUOTED([CARCH], ["x86_64"], [Architecture])
- AC_DEFINE_UNQUOTED([CARCHFLAGS], ["x86-64"], [Architecture])
- AC_DEFINE_UNQUOTED([ARCHSWITCH], ["march"], [Architecture])
+ x86_64-*)
CARCH="x86_64"
CARCHFLAGS="x86-64"
ARCHSWITCH="march"
- CHOST="${host}"
;;
- ia64-*) AC_DEFINE_UNQUOTED([CARCH], ["ia64"], [Architecture])
- AC_DEFINE_UNQUOTED([CARCHFLAGS], ["ia64"], [Architecture])
- AC_DEFINE_UNQUOTED([ARCHSWITCH], ["march"], [Architecture])
+ ia64-*)
CARCH="ia64"
CARCHFLAGS="ia64"
ARCHSWITCH="march"
- CHOST="${host}"
;;
- sparc-*) AC_DEFINE_UNQUOTED([CARCH], ["sparc"], [Architecture])
- AC_DEFINE_UNQUOTED([CARCHFLAGS], ["v9"], [Architecture])
- AC_DEFINE_UNQUOTED([ARCHSWITCH], ["mcpu"], [Architecture])
+ sparc-*)
CARCH="sparc"
CARCHFLAGS="v9"
ARCHSWITCH="mcpu"
- CHOST="${host}"
;;
ppc-* | powerpc-*)
- AC_DEFINE_UNQUOTED([CARCH], ["ppc"], [Architecture])
- AC_DEFINE_UNQUOTED([CARCHFLAGS], ["750"], [Architecture])
- AC_DEFINE_UNQUOTED([ARCHSWITCH], ["mcpu"], [Architecture])
CARCH="ppc"
CARCHFLAGS="750"
ARCHSWITCH="mcpu"
- CHOST="${host}"
;;
- i386-*) AC_DEFINE_UNQUOTED([CARCH], ["i386"], [Architecture])
- AC_DEFINE_UNQUOTED([CARCHFLAGS], ["i386"], [Architecture])
- AC_DEFINE_UNQUOTED([ARCHSWITCH], ["march"], [Architecture])
+ i386-*)
CARCH="i386"
CARCHFLAGS="i386"
ARCHSWITCH="march"
- CHOST="${host}"
;;
*)
AC_MSG_ERROR([Your architecture is not supported])
;;
esac
+dnl Now do some things common to all architectures
+CHOST="${host}"
+AC_DEFINE_UNQUOTED([CARCH], ["$CARCH"], [Architecture])
+AC_DEFINE_UNQUOTED([CARCHFLAGS], ["$CARCHFLAGS"], [Architecture Flags])
+AC_DEFINE_UNQUOTED([ARCHSWITCH], ["$ARCHSWITCH"], [Architecture Switch (march/mcpu)])
+AC_DEFINE_UNQUOTED([CHOST], ["$CHOST"], [Host Type])
AC_SUBST(CARCH)
AC_SUBST(CARCHFLAGS)
AC_SUBST(ARCHSWITCH)
AC_SUBST(CHOST)
-dnl Help line for config file
-AC_ARG_WITH(config-file,
- AC_HELP_STRING([ --with-config-file=path], [Set the name and path for pacman's config file]),
- [configfile=$withval], [configfile=/etc/pacman.conf])
-
-dnl Help line for debug
-AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug], [Enable debugging support]),
- [debug=$enableval], [debug=no])
-
-dnl Help line for fakeroot
-AC_ARG_ENABLE(fakeroot,
- AC_HELP_STRING([--disable-fakeroot], [Disable fakeroot proof support]),
- [fakeroot=$enableval], [fakeroot=yes])
-
dnl Check for man2html binary
-AC_MSG_CHECKING(for support man2html)
-if test x$wantman2html = xyes ; then
+AC_MSG_CHECKING(for man2html)
+if test "x$wantman2html" = "xyes" ; then
AC_CHECK_PROGS([MAN2HTML], [man2html])
AM_CONDITIONAL(HAS_MAN2HTML, test $MAN2HTML)
if test $MAN2HTML ; then
- AC_DEFINE([HAS_MAN2HTML], [TRUE], [Enabled HTML generation from man via man2html])
- AC_MSG_RESULT(yes)
+ AC_DEFINE([HAS_MAN2HTML], [TRUE], [Enable HTML manpages using man2html])
+ AC_MSG_RESULT(yes)
else
- AC_DEFINE([HAS_MAN2HTML], [FALSE], [Disabled HTML generation from man via man2html])
- AC_MSG_RESULT(no, man2html missing)
+ AC_MSG_RESULT(no, man2html missing)
fi
else
- AM_CONDITIONAL(HAS_MAN2HTML, test $MAN2HTML)
- AC_DEFINE([HAS_MAN2HTML], [FALSE], [Not specified at configure line])
- AC_MSG_RESULT(not requested by configure)
+ AM_CONDITIONAL(HAS_MAN2HTML, false)
+ AC_MSG_RESULT(no, disabled by configure)
fi
dnl Check for doxygen support
-if test x$wantdoxygen = xyes ; then
+AC_MSG_CHECKING(for doxygen)
+if test "x$wantdoxygen" = "xyes" ; then
AC_CHECK_PROGS([DOXYGEN], [doxygen])
+ AM_CONDITIONAL(HAS_DOXYGEN, test $DOXYGEN)
if test $DOXYGEN ; then
- DOXYSTATUS="yes, path: `which $DOXYGEN`"
+ DOXYSTATUS="yes, path: `which $DOXYGEN`"
+ AC_MSG_RESULT(yes)
else
- DOXYSTATUS="doxygen binary not found"
+ DOXYSTATUS="doxygen binary not found"
+ AC_MSG_RESULT(no, doxygen missing)
fi
else
+ AM_CONDITIONAL(HAS_DOXYGEN, false)
DOXYSTATUS="no, disabled by configure"
+ AC_MSG_RESULT(no, disabled by configure)
fi
-AM_CONDITIONAL(HAS_DOXYGEN, test $DOXYGEN)
dnl Check for math
AC_CHECK_LIB([m], [sqrt], [AC_CHECK_HEADER([math.h], [LIBM='-lm'])])
@@ -196,12 +186,12 @@ fi
dnl Enable or disable debug code
AC_MSG_CHECKING(for debug mode request)
if test "$debug" = "yes" ; then
- AM_CONDITIONAL(PACMAN_DEBUG, test "$debug" = "yes")
+ AM_CONDITIONAL(PACMAN_DEBUG, test "x$debug" = "xyes")
CFLAGS="$CFLAGS -g -Wall -Werror -std=c99 -DPACMAN_DEBUG"
LDFLAGS="$LDFLAGS -lmcheck"
AC_MSG_RESULT(yes)
else
- AM_CONDITIONAL(PACMAN_DEBUG, test "$debug" = "no")
+ AM_CONDITIONAL(PACMAN_DEBUG, test "x$debug" = "xno")
CFLAGS="$CFLAGS -Wall -std=c99"
AC_MSG_RESULT(no)
fi
diff --git a/doc/Makefile.am b/doc/Makefile.am
index cd6cdf15..6bb9587d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -21,10 +21,14 @@ endif
clean:
rm -f html/*.html
rm -f man3/*.3
- rm -f man5/*.5
- rm -f man8/*.8
-man_MANS = pacman.8 makepkg.8 PKGBUILD.5 makepkg.conf.5 pacman.conf.5 libalpm.3
+man_MANS = \
+ pacman.8 \
+ makepkg.8 \
+ PKGBUILD.5 \
+ makepkg.conf.5 \
+ pacman.conf.5 \
+ libalpm.3
if HAS_DOXYGEN
man_MANS += *.3
diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
index eb8d788f..fa36941d 100644
--- a/lib/libalpm/Makefile.am
+++ b/lib/libalpm/Makefile.am
@@ -1,41 +1,42 @@
AUTOMAKE_OPTIONS = gnu
-DEFINES = -pedantic -D_GNU_SOURCE
-AM_CFLAGS = $(DEFINES)
-SUBDIRS = po
-localedir = $(datadir)/locale
-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-
-TARGETS = md5driver.c \
- md5.c \
- sha1.c \
- util.c \
- alpm_list.c \
- log.c \
- error.c \
- package.c \
- group.c \
- db.c \
- cache.c \
- conflict.c \
- deps.c \
- provide.c \
- versioncmp.c \
- backup.c \
- trans.c \
- add.c \
- remove.c \
- sync.c \
- handle.c \
- server.c \
- alpm.c \
- be_files.c
+SUBDIRS = po
lib_LTLIBRARIES = libalpm.la
-
include_HEADERS = alpm_list.h alpm.h
-libalpm_la_SOURCES = $(TARGETS)
+localedir = $(datadir)/locale
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+AM_CFLAGS = -pedantic -D_GNU_SOURCE $(CFLAGS)
+
+EXTRA_DIST = Doxyfile
+
+libalpm_la_SOURCES = \
+ add.h add.c \
+ alpm.h alpm.c \
+ alpm_list.h alpm_list.c \
+ backup.h backup.c \
+ be_files.c \
+ cache.h cache.c \
+ conflict.h conflict.c \
+ db.h db.c \
+ deps.h deps.c \
+ error.h error.c \
+ group.h group.c \
+ handle.h handle.c \
+ log.h log.c \
+ md5.h md5.c \
+ md5driver.c \
+ package.h package.c \
+ provide.h provide.c \
+ remove.h remove.c \
+ server.h server.c \
+ sha1.h sha1.c \
+ sync.h sync.c \
+ trans.h trans.c \
+ util.h util.c \
+ versioncmp.h versioncmp.c
libalpm_la_LDFLAGS = -no-undefined -version-info $(PM_VERSION_INFO)
libalpm_la_LIBADD = -larchive -ldownload -lm
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index a9c623c2..31d44cad 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,11 +1,15 @@
AUTOMAKE_OPTIONS = std-options
-bin_SCRIPTS = gensync \
- makepkg \
- makeworld \
- updatesync \
- pacman-optimize \
- rankmirrors \
- abs \
- repo-add \
- repo-remove \
- re-pacman
+
+bin_SCRIPTS = \
+ abs \
+ gensync \
+ makepkg \
+ makeworld \
+ pacman-optimize \
+ rankmirrors \
+ repo-add \
+ repo-remove \
+ re-pacman \
+ updatesync
+
+abs gensync makepkg makeworld pacman-optimize rankmirrors repo-add repo-remove re-pacman updatesync:
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am
index 9d82bf4c..ee03372d 100644
--- a/src/pacman/Makefile.am
+++ b/src/pacman/Makefile.am
@@ -1,25 +1,36 @@
+SUBDIRS = po
+
bin_PROGRAMS = pacman
if LINKSTATIC
bin_PROGRAMS += pacman.static
endif
-SUBDIRS = po
-
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-
-AM_CFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/lib/libalpm $(CFLAGS)
-
-pacman_SOURCES = util.c log.c package.c downloadprog.c trans.c add.c \
- remove.c upgrade.c query.c sync.c conf.c deptest.c pacman.c
-
-pacman_static_SOURCES = $(pacman_SOURCES)
+INCLUDES = -I$(top_srcdir)/lib/libalpm
+
+AM_CFLAGS = -D_GNU_SOURCE $(CFLAGS)
+
+pacman_SOURCES = \
+ add.h add.c \
+ conf.h conf.c \
+ deptest.h deptest.c \
+ downloadprog.h downloadprog.c \
+ log.h log.c \
+ package.h package.c \
+ pacman.c \
+ query.h query.c \
+ remove.h remove.c \
+ sync.h sync.c \
+ trans.h trans.c \
+ upgrade.h upgrade.c \
+ util.h util.c
pacman_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la \
-ldownload
+pacman_static_SOURCES = $(pacman_SOURCES)
+pacman_static_LDFLAGS = $(LDFLAGS) -all-static
pacman_static_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la \
-ldownload
-
-pacman_static_LDFLAGS = $(LDFLAGS) -all-static
diff --git a/src/pacman/log.h b/src/pacman/log.h
index 01a507c3..3317709e 100644
--- a/src/pacman/log.h
+++ b/src/pacman/log.h
@@ -21,6 +21,8 @@
#ifndef _PM_LOG_H
#define _PM_LOG_H
+/* TODO these are illegal in ISO C, thus the reason -pedantic was never used
+ * as a compile flag for the pacman side of things (named variadic macros) */
#define MSG(line, fmt, args...) pm_fprintf(stdout, line, fmt, ##args)
#define ERR(line, fmt, args...) do { \
pm_fprintf(stderr, line, _("error: ")); \
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 8f3a98bd..b0319694 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -1,6 +1,6 @@
bin_PROGRAMS = vercmp testpkg
-AM_CFLAGS = -I$(top_srcdir)/lib/libalpm
+INCLUDES = -I$(top_srcdir)/lib/libalpm
vercmp_SOURCES = vercmp.c
vercmp_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.so