$NetBSD: patch-aa,v 1.1.1.1 2001/07/24 13:47:34 wiz Exp $ --- Makefile.in.orig Thu Oct 21 18:08:35 1999 +++ Makefile.in @@ -62,7 +62,12 @@ # [16-Jan-1993] # ====================================================================== -prefix = /usr/local +prefix = @prefix@ + +srcdir = @srcdir@ +VPATH = @srcdir@ + +top_builddir = . # Change these to suit local conventions: BINDIR = $(prefix)/bin @@ -213,6 +218,15 @@ NROFF = @NROFF@ +INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM) +INSTALL_MAN = $(BSD_INSTALL_MAN) +INSTALL_SCRIPT = $(BSD_INSTALL_SCRIPT) +INSTALL_DATA = $(BSD_INSTALL_DATA) +INSTALL_PROGRAM_DIR = $(BSD_INSTALL_PROGRAM_DIR) +INSTALL_MAN_DIR = $(BSD_INSTALL_MAN_DIR) +INSTALL_DATA_DIR = $(BSD_INSTALL_DATA_DIR) + + # This variable defined to be empty, with the intent that the user can # set it on the make command line at build time to choose fancy # compiler-dependent optimization switches. @@ -387,16 +401,13 @@ all: programs -bibdup.sh: bibdup.sin Makefile - -$(RM) -f $@ - $(SED) -e 's=_LIBDIR_=$(SHRLIBDIR)=g' \ - -e 's=_BINDIR_=$(BINDIR)=g' \ - -e 's=_AWK_=$(AWK)=g' \ - $@ +bibdup.sh: $(srcdir)/bibdup.sin $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@:bibdup.sin CONFIG_HEADERS= $(SHELL) ./config.status $(CHMOD) 555 $@ biblex: lexmain.c biblex.c args.h bibyydcl.h token.h - $(CC) $(CFLAGS) -o biblex lexmain.c biblex.c $(LDFLAGS) $(LIBS) + $(CC) $(CFLAGS) -o biblex $(srcdir)/lexmain.c biblex.c $(LDFLAGS) $(LIBS) biblex.c: biblex.l @@ -555,7 +566,7 @@ html-files: $(HTML-FILES) -install: install-programs install-lib install-man install-show +install: install-programs install-lib install-man install-ftp: bibparse.jar bibparse.shr bibparse.tar bibparse.zip \ bibparse.zoo uninstall-ftp @@ -572,25 +583,23 @@ $(LS) -l $(FTPDIR)/bibparse-$(VERSION)* install-lib: uninstall-lib - -$(MKDIR) $(SHRLIBDIR) - $(CP) bibdup.awk $(SHRLIBDIR)/bibdup.awk - $(CHMOD) 664 $(SHRLIBDIR)/bibdup.awk + -$(INSTALL_DATA_DIR) $(SHRLIBDIR) + $(INSTALL_DATA) $(srcdir)/bibdup.awk $(SHRLIBDIR)/bibdup.awk install-man: uninstall-man + -$(INSTALL_MAN_DIR) $(MANDIR)/man$(MANEXT) for program in $(BASEPROGS) ; \ do \ - $(CP) $$program.man $(MANDIR)/man$(MANEXT)/$$program.1 ; \ - $(CHMOD) 664 $(MANDIR)/man$(MANEXT)/$$program.1 ; \ + $(INSTALL_MAN) $(srcdir)/$$program.man $(MANDIR)/man$(MANEXT)/$$program.1 ; \ done install-programs: $(PROGRAMS) bibdup.sh uninstall-programs + -$(INSTALL_PROGRAM_DIR) $(BINDIR) for program in $(PROGRAMS) ; \ do \ - $(CP) $$program $(BINDIR)/$$program ; \ - $(CHMOD) 775 $(BINDIR)/$$program ; \ + $(INSTALL_PROGRAM) $$program $(BINDIR)/$$program ; \ done ; \ - $(CP) bibdup.sh $(BINDIR)/bibdup ; \ - $(CHMOD) 775 $(BINDIR)/bibdup + $(INSTALL_SCRIPT) bibdup.sh $(BINDIR)/bibdup install-show: @echo ''