mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 13:28:12 -05:00
Build vercmp without needing link to libalpm
Include the object file directly from the libalpm version comparison code as it is the only thing we need. This drops the dependency of vercmp on libalpm and all of the stuff we know it drags in. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
4f80993933
commit
eb6af031ec
@ -16,7 +16,7 @@ INCLUDES = -I$(top_srcdir)/lib/libalpm
|
||||
AM_CFLAGS = -pedantic -D_GNU_SOURCE
|
||||
|
||||
vercmp_SOURCES = vercmp.c
|
||||
vercmp_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la
|
||||
vercmp_LDADD = $(top_builddir)/lib/libalpm/version.o
|
||||
|
||||
testpkg_SOURCES = testpkg.c
|
||||
testpkg_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la
|
||||
|
@ -23,12 +23,14 @@
|
||||
#include <stdio.h> /* printf */
|
||||
#include <string.h> /* strncpy */
|
||||
|
||||
#include <alpm.h>
|
||||
|
||||
#define BASENAME "vercmp"
|
||||
|
||||
#define MAX_LEN 255
|
||||
|
||||
/* forward declaration, comes from vercmp.o in libalpm source that is linked in
|
||||
* directly so we don't have any library deps */
|
||||
int alpm_pkg_vercmp(const char *a, const char *b);
|
||||
|
||||
static void usage()
|
||||
{
|
||||
fprintf(stderr, "usage: %s <ver1> <ver2>\n\n", BASENAME);
|
||||
|
Loading…
Reference in New Issue
Block a user