[BACK]Return to patch-aa CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / mawk / patches

File: [cvs.NetBSD.org] / pkgsrc / lang / mawk / patches / Attic / patch-aa (download)

Revision 1.5, Mon Aug 20 21:42:26 2007 UTC (16 years, 7 months ago) by agc
Branch: MAIN
CVS Tags: pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3, pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, pkgsrc-2008Q1-base, pkgsrc-2008Q1, pkgsrc-2007Q4-base, pkgsrc-2007Q4, pkgsrc-2007Q3-base, pkgsrc-2007Q3, cwrapper, cube-native-xorg-base, cube-native-xorg
Changes since 1.4: +8 -6 lines

Add DESTDIR support

$NetBSD: patch-aa,v 1.5 2007/08/20 21:42:26 agc Exp $

--- Makefile.in.orig	1996-01-31 21:05:40.000000000 -0800
+++ Makefile.in
@@ -11,10 +11,11 @@
 
 YACC = @YACC@ 
 
+prefix = ${PREFIX}
 # where to put mawk
-BINDIR = @BINDIR@
+BINDIR = $(prefix)/bin
 # where to put the man pages
-MANDIR = @MANDIR@
+MANDIR = $(prefix)/${PKGMANDIR}/man1
 MANEXT = @MANEXT@
 #######################################
 
@@ -32,6 +33,7 @@
     rexp/rexp3.c 
 
 
+all: mawk_and_test
 mawk_and_test :  mawk  mawk_test  fpe_test
 
 mawk : $(O)  rexp/.done
@@ -74,10 +76,10 @@
 
 MAWKMAN = $(MANDIR)/mawk.$(MANEXT)
 install :  mawk
-	cp mawk $(BINDIR)
-	chmod  0755  $(BINDIR)/mawk
-	cp  man/mawk.1  $(MAWKMAN)
-	chmod  0644  $(MAWKMAN)
+	${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}${BINDIR}
+	${BSD_INSTALL_PROGRAM} mawk ${DESTDIR}$(BINDIR)
+	${BSD_INSTALL_MAN_DIR} ${DESTDIR}${MANDIR}
+	${BSD_INSTALL_MAN} man/mawk.1 ${DESTDIR}$(MAWKMAN)
 
 clean :
 	rm -f *.o rexp/*.o rexp/.done test/mawk core test/core mawk