include Makefile.inc
srcdir= @srcdir@
+VPATH = @srcdir@
top_srcdir= @top_srcdir@
INSTALL= @INSTALL@
### These are variables meant to be exported
-VPATH = $(srcdir)
-
BINDIR=$(prefix)/bin
RPMBINDIR=$(subst usr/bin,bin,$(BINDIR))
MANDIR=$(prefix)/man/man8
+#include "config.h"
+
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-VPATH = $(srcdir)
+VPATH = @srcdir@
LIBOBJECTS = \
misc.o parsePreamble.o part.o \
fi
AC_C_BIGENDIAN
+AC_C_INLINE
dnl look for libc features
PROVIDES_ERRNO=no
srcdir = @srcdir@
-VPATH = $(srcdir)
+VPATH = @srcdir@
top_srcdir = @top_srcdir@
LIBOBJECTS = header.o misc.o messages.o \
static int strntoul(const char * str, char ** endptr, int base, int num) {
char * buf, * end;
- unsigned long return;
+ unsigned long ret;
buf = alloca(num + 1);
strncpy(buf, str, num);
header->spec = malloc(header->specLength);
header->name = malloc(strlen(lit.labelstr) + 1);
if (!header->spec || !header->name) {
- header->spec ? free(header->spec) : 0;
- header->name ? free(header->name) : 0;
+ if (header->spec) free(header->spec);
+ if (header->name) free(header->name);
return "out of memory";
}
void oldhdrFree(struct oldrpmHeader * header) {
free(header->name);
free(header->spec);
- header->icon ? free(header->icon) : 0;
- header->group ? free(header->group) : 0;
+ if (header->icon) free(header->icon);
+ if (header->group) free(header->group);
}
void oldhdrSpecFree(struct oldrpmHeaderSpec * spec) {
void oldrpmfileFree(struct oldrpmFileInfo * fi) {
free(fi->path);
- fi->linkto ? free(fi->linkto) : 0;
+ if (fi->linkto) free(fi->linkto);
}
char * oldrpmfileToInfoStr(struct oldrpmFileInfo * fi) {
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-VPATH = $(srcdir)
+VPATH = @srcdir@
include ../Makefile.inc
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-VPATH = @srcdir
+VPATH = @srcdir@
LIBOBJECTS = popt.o
RANLIB=ranlib
endif
-ifeq (.depend,$(wildcard .depend-done))
+ifeq (.depend-done,$(wildcard .depend-done))
TARGET=allprogs
else
TARGET=@TARGET@
$(RANLIB) $@
distclean: clean
- rm -f Makefile .depend-done
+ rm -f Makefile .depend-done config.log config.status
clean:
rm -f *.a *.o *~ $(PROGS) test.out tagtable.c
srcdir = @srcdir@
-VPATH = $(srcdir)
+VPATH = @srcdir@
top_srcdir = @top_srcdir@
include ../Makefile.inc
PROGS = rpmlead rpmheader rpmarchive rpmsignature dump dumpdb
LOADLIBES = @LIBS@ @LIBMISC@ @LIBINTL@
-ifeq (.depend,$(wildcard .depend))
TARGET=everything
-else
-TARGET=depend everything
-endif
all: $(TARGET)