$OpenBSD: patch-Makefile,v 1.7 2018/04/11 13:31:08 sthen Exp $

# XXX N.B. if we get waitid() and want to enable parallel,
# it conflicts with sysutils/parallel

Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -1,4 +1,5 @@
-BINS=isutf8 ifdata ifne pee sponge mispipe lckdo parallel errno
+BINS=isutf8 ifdata ifne pee sponge mispipe lckdo errno
+#parallel - wants waitid()
 PERLSCRIPTS=vidir vipe ts combine zrun chronic
 MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 chronic.1 mispipe.1 lckdo.1 parallel.1 errno.1
 CFLAGS?=-O2 -g -Wall
@@ -20,7 +21,7 @@ clean:
 		is_utf8/*.o is_utf8/isutf8
 
 isutf8: is_utf8/*.c is_utf8/*.h
-	$(MAKE) -C is_utf8/
+	$(MAKE) -C is_utf8/ CC="${CC}" CFLAGS="${CFLAGS}"
 	cp is_utf8/isutf8 .
 
 install:
@@ -28,8 +29,8 @@ install:
 	$(INSTALL_BIN) $(BINS) $(DESTDIR)$(PREFIX)/bin
 	install $(PERLSCRIPTS) $(DESTDIR)$(PREFIX)/bin
 
-	mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
-	install $(MANS) $(DESTDIR)$(PREFIX)/share/man/man1
+	mkdir -p $(DESTDIR)$(PREFIX)/man/man1
+	install $(MANS) $(DESTDIR)$(PREFIX)/man/man1
 
 check: isutf8
 	./is_utf8/test.sh
