$NetBSD: patch-aj,v 1.2 1998/08/07 11:10:32 agc Exp $ --- Makefile.in.orig Wed May 27 16:49:34 1998 +++ Makefile.in Wed Jul 29 14:20:47 1998 @@ -21,9 +21,10 @@ ### These are variables meant to be exported BINDIR=$(prefix)/bin -RPMBINDIR=$(subst usr/bin,bin,$(BINDIR)) +RPMBINDIR=$(BINDIR) MANDIR=$(prefix)/man/man8 LIBDIR=$(libdir) +DATADIR=$(datadir) INCDIR=$(prefix)/include/rpm ETCDIR=$(ROOT)/etc @@ -42,16 +43,16 @@ SOURCES = $(subst .o,.c,$(OBJS)) -ifeq (.depend-done,$(wildcard .depend-done)) +.if exists(.depend-done) TARGET=everything -else +.else TARGET=@TARGET@ -endif +.endif all: $(TARGET) rpm: lib/librpm.a build/librpmbuild.a @MISCPATH@ $(OBJS) - $(CC) -o rpm $(LDFLAGS_STATIC) $(OBJS) $(LDFLAGS) $(LOADLIBES) $(LIBS) \ + $(CC) -o rpm $(OBJS) $(LDFLAGS) $(LOADLIBES) $(LIBS) \ $(LIBEFENCE) rpm.shared: lib/librpm.a build/librpmbuild.a $(OBJS) @@ -115,20 +116,20 @@ [ -d $(installprefix)/$(LIBDIR) ] || mkdir -p $(installprefix)/$(LIBDIR) [ -d $(installprefix)/$(INCDIR) ] || mkdir -p $(installprefix)/$(INCDIR) [ -d $(installprefix)/$(RPMCONFIGDIR) ] || \ - mkdir -p $(installprefix)/$(INCDIR) + mkdir -p $(installprefix)/$(RPMCONFIGDIR) if [ -x ./rpm ]; then \ $(INSTALL_PROGRAM) -s -m 755 rpm $(installprefix)/$(RPMBINDIR); \ else \ $(INSTALL_PROGRAM) -s -m 755 rpm.shared $(installprefix)/$(RPMBINDIR)/rpm; \ fi - $(INSTALL_PROGRAM) -m 755 $(srcdir)/gendiff $(installprefix)/$(BINDIR) - $(INSTALL_PROGRAM) -m 755 $(topdir)/find-provides.sh $(installprefix)/$(BINDIR)/find-provides - $(INSTALL_PROGRAM) -m 755 $(topdir)/find-requires.sh $(installprefix)/$(BINDIR)/find-requires + $(INSTALL_PROGRAM:N-s) -m 755 $(srcdir)/gendiff $(installprefix)/$(BINDIR) + $(INSTALL_PROGRAM:N-s) -m 755 $(topdir)/find-provides.sh $(installprefix)/$(BINDIR)/find-provides + $(INSTALL_PROGRAM:N-s) -m 755 $(topdir)/find-requires.sh $(installprefix)/$(BINDIR)/find-requires $(INSTALL_PROGRAM) -s -m 755 rpm2cpio $(installprefix)/$(BINDIR) $(INSTALL_DATA) -m 644 $(srcdir)/rpm.8 $(installprefix)/$(MANDIR) $(INSTALL_DATA) -m 644 $(srcdir)/rpm2cpio.8 $(installprefix)/$(MANDIR) - $(INSTALL_DATA) -m 644 $(topdir)/lib-rpmrc $(installprefix)/$(LIBDIR)/rpmrc - $(INSTALL_DATA) -m 644 $(srcdir)/rpmpopt $(installprefix)/$(LIBDIR)/rpmpopt + $(INSTALL_DATA) -m 644 $(topdir)/lib-rpmrc $(installprefix)/$(RPMCONFIGDIR)/rpmrc + $(INSTALL_DATA) -m 644 $(srcdir)/rpmpopt $(installprefix)/$(RPMCONFIGDIR)/rpmpopt (cd lib; $(MAKE) LIBDIR=$(installprefix)/$(LIBDIR) INCDIR=$(installprefix)/$(INCDIR) install) for d in $(INSTSUBDIRS); do \ (cd $$d; $(MAKE) installprefix=$(installprefix) LIBDIR=$(installprefix)/$(LIBDIR) INCDIR=$(installprefix)/$(INCDIR) install) ;\ @@ -205,6 +206,6 @@ @echo " " @echo "The final archive is ./rpm-$(VERSION).tar.gz." -ifeq (.depend,$(wildcard .depend)) -include .depend -endif +.if exists(.depend) +.include ".depend" +.endif