From b305339694a56762272c7bfc1bd10dc4cd3e891e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 20 Nov 2013 19:32:17 -0500 Subject: [PATCH] Build patch from the MacPorts project - obey $(PREFIX) convention. --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 743d4df..094c581 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,12 @@ VERS=3.12 CFLAGS = -O +PREFIX = /usr + all: ascii ascii.1 ascii: ascii.c splashscreen.h nametable.h - $(CC) -DREVISION=$(VERS) ascii.c -o ascii + $(CC) $(CFLAGS) -DREVISION=$(VERS) ascii.c -o ascii splashscreen.h: splashscreen sed splashscreen.h -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/.*/P("&");/' @@ -30,12 +32,12 @@ splint: nametable.h splashscreen.h splint -I. -DREVISION=$(VERS) $(SPLINTOPTS) ascii.c install: ascii ascii.1 - cp ascii $(DESTDIR)/usr/bin/ascii - cp ascii.1 $(DESTDIR)/usr/share/man/man1 + cp ascii $(DESTDIR)$(PREFIX)/bin/ascii + cp ascii.1 $(DESTDIR)$(PREFIX)/share/man/man1 uninstall: - rm $(DESTDIR)/usr/bin/ascii - rm $(DESTDIR)/usr/share/man/man1/ascii.1 + rm $(DESTDIR)$(PREFIX)/bin/ascii + rm $(DESTDIR)$(PREFIX)/share/man/man1/ascii.1 SOURCES = README COPYING control Makefile ascii.c ascii.xml splashscreen nametable ascii.cgi -- 2.43.0