$NetBSD: patch-Makefile,v 1.1 2016/07/27 20:37:27 kamil Exp $ Adapt install target for pkgsrc. --- Makefile.orig 1998-03-18 01:02:29.000000000 +0000 +++ Makefile @@ -40,6 +40,7 @@ RELEASE=-DRELEASE=\"1.3\" # Set this to the destination directory for the executable #BINDIR=../../bin/`uname` +DESTDIR?= BINDIR=/usr/local/bin # Location of manual pages #MANDIR=../../man @@ -93,18 +94,22 @@ sample_output: agm ./agm -c2 williamshatner leonardnimoy > sample_output $(MANDIR)/man6: - mkdir $(MANDIR)/man6 + install -d $(DESTDIR)$(MANDIR)/man6 install: agm agm.6 $(MANDIR)/man6 - strip agm - cp {,x}agm $(BINDIR) - chmod 755 $(BINDIR)/{,x}agm - cp agm.6 $(MANDIR)/man6 - chmod 644 $(MANDIR)/man6/agm.6 + install -d $(DESTDIR)$(BINDIR) + cp agm $(DESTDIR)$(BINDIR) + cp xagm $(DESTDIR)$(BINDIR) + chmod 755 $(DESTDIR)$(BINDIR)/agm + chmod 755 $(DESTDIR)$(BINDIR)/xagm + install -d $(DESTDIR)$(MANDIR)/man6 + cp agm.6 $(DESTDIR)$(MANDIR)/man6 + chmod 644 $(DESTDIR)$(MANDIR)/man6/agm.6 install-words: - cp words $(WORDDIR) - chmod 644 $(WORDDIR)/words + install -d $(DESTDIR)$(WORDDIR) + cp words $(DESTDIR)$(WORDDIR) + chmod 644 $(DESTDIR)$(WORDDIR)/words clean: rm -f agm agm.o agm*.tar* agm*.shar agm.ps *.o