https://github.com/kholtman/afio/pull/16 --- Makefile.orig +++ Makefile @@ -83,6 +83,7 @@ CC=gcc CFLAGS += $(CFLAGS1) $1 $2 $3 $4 $5 $6 $7 $8 $9 $a $b $c $d $e $(e2) $f $g $I LDFLAGS += CPPFLAGS += +PREFIX = /usr/local afio : afio.o compfile.o exten.o match.o $M $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \ @@ -95,8 +96,8 @@ clean: cd regtest; /bin/sh regtest.clean install: afio - cp afio /usr/local/bin - cp afio.1 /usr/share/man/man1 + cp afio $(DESTDIR)$(PREFIX)/bin + cp afio.1 $(DESTDIR)$(PREFIX)/share/man/man1 # generate default list of -E extensions from manpage # note: on sun, I had to change awk command below to nawk or gawk