$OpenBSD: patch-Makefile,v 1.1.1.1 2013/11/08 18:17:14 jung Exp $
--- Makefile.orig	Tue May 28 23:47:33 2013
+++ Makefile	Sat Oct 19 16:54:16 2013
@@ -6,10 +6,10 @@ include config.mk
 SRC = sltar.c
 OBJ = ${SRC:.c=.o}
 
-all: options ${TARGET}
+all: options sltar
 
 options:
-	@echo ${TARGET} build options:
+	@echo sltar build options:
 	@echo "CFLAGS   = ${CFLAGS}"
 	@echo "LDFLAGS  = ${LDFLAGS}"
 	@echo "CC       = ${CC}"
@@ -17,40 +17,36 @@ options:
 ${OBJ}: config.mk
 
 %.o: %.c
-	@echo CC $@
-	@${CC} -c ${CFLAGS} $<
+	${CC} -c ${CFLAGS} $<
 
-${TARGET}: ${OBJ}
-	@echo CC -o $@
-	@${CC} -o $@ ${OBJ} ${LDFLAGS}
+sltar: ${OBJ}
+	${CC} -o $@ ${OBJ} ${LDFLAGS}
 
 clean:
 	@echo cleaning
-	@rm -f -- ${OBJ} ${TARGET} ${TARGET}-${VERSION}.tar.gz
+	@rm -f -- ${OBJ} sltar sltar-${VERSION}.tar.gz
 
 dist: clean sltar
 	@echo creating dist tarball
-	@mkdir -p ${TARGET}-${VERSION}
+	@mkdir -p sltar-${VERSION}
 	@cp -R LICENSE Makefile config.mk \
-		${TARGET}.1 ${SRC} ${TARGET}-${VERSION}
-	@./sltar c ${TARGET}-${VERSION} > ${TARGET}-${VERSION}.tar
-	@gzip ${TARGET}-${VERSION}.tar
-	@rm -rf ${TARGET}-${VERSION}
+		sltar.1 ${SRC} sltar-${VERSION}
+	@./sltar c sltar-${VERSION} > sltar-${VERSION}.tar
+	@gzip sltar-${VERSION}.tar
+	@rm -rf sltar-${VERSION}
 
 install: all
-	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
-	@mkdir -p ${DESTDIR}${PREFIX}/bin
-	@cp -f ${TARGET} ${DESTDIR}${PREFIX}/bin
-	@chmod 755 ${DESTDIR}${PREFIX}/bin/${TARGET}
-	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
-	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
-	@sed "s/VERSION/${VERSION}/g" < ${TARGET}.1 > ${DESTDIR}${MANPREFIX}/man1/${TARGET}.1
-	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/${TARGET}.1
+	${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin
+	${BSD_INSTALL_PROGRAM} sltar ${DESTDIR}${PREFIX}/bin
+	${BSD_INSTALL_MAN_DIR} ${DESTDIR}${MANPREFIX}/man1
+	sed "s/VERSION/${VERSION}/g" < sltar.1 > sltar.1.tmp
+	mv sltar.1.tmp sltar.1
+	${BSD_INSTALL_MAN} sltar.1 ${DESTDIR}${MANPREFIX}/man1
 
 uninstall:
 	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
-	@rm -f ${DESTDIR}${PREFIX}/bin/${TARGET}
+	@rm -f ${DESTDIR}${PREFIX}/bin/sltar
 	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
-	@rm -f ${DESTDIR}${MANPREFIX}/man1/${TARGET}.1
+	@rm -f ${DESTDIR}${MANPREFIX}/man1/sltar.1
 
 .PHONY: all options clean dist install uninstall
