$NetBSD: patch-aa,v 1.5 2025/02/13 06:25:39 dholland Exp $

Configure for pkgsrc.
Add a .WAIT so the post-build message comes out right.

Work around a bmake problem (PR 59073) by using $< and $@ instead of $*.

--- Makefile.in.orig	2025-02-13 05:40:19.401064526 +0000
+++ Makefile.in
@@ -16,7 +16,7 @@ DEFINES=$(AUTODEFS) -DHAVE_FORK -DUNIX -
 CFLAGS=$(DEFINES) -Wall -Wno-char-subscripts @CFLAGS@
 LIBS=$(AUTOLIBS)
 
-all: compile banner
+all: compile .WAIT banner
 
 compile: $(APPL)
 
@@ -34,9 +34,8 @@ banner:
 	@echo "        do not something criminal during the installation;   "
 	@echo "     2. \`su' to root;                                       "
 	@echo "     3. Run \`make install' to install Binkd.                "
-	@echo "     4. Edit $(PREFIX)/etc/$(APPL).conf-dist and RENAME it or"
-	@echo "        MOVE it somewhere (so another \`make install' will   "
-	@echo "        not overwrite it during your next Binkd upgrade)     "
+	@echo "     4. Create @sysconfdir@/$(APPL).conf, using the files in "
+	@echo "        $(PREFIX)/share/examples/$(APPL)."
 	@echo
 	@echo " If you want to put the files into some other directory just "
 	@echo " run \`configure --prefix=/another/path' and go to step 1.   "
@@ -53,8 +52,8 @@ install: compile .version
 	ln -s $(PREFIX)/sbin/$(APPL)-`cat .version` $(PREFIX)/sbin/$(APPL)
 	./mkinstalldirs $(PREFIX)/man/man8
 	$(INSTALL) -m 644 $(APPL).8 $(PREFIX)/man/man8/$(APPL).8
-	./mkinstalldirs $(PREFIX)/etc
-	$(INSTALL) -m 644 $(APPL).cfg $(PREFIX)/etc/$(APPL).conf-dist
+	./mkinstalldirs $(PREFIX)/share/examples/$(APPL)
+	$(INSTALL) -m 644 $(APPL).cfg $(PREFIX)/share/examples/$(APPL)/$(APPL).conf
 
 clean:
 	rm -f *.[bo] unix/*.[bo] ntlm/*.[bo] *.BAK *.core *.obj *.err 
@@ -71,7 +70,7 @@ realclean: cleanall
 
 .c.o:
 	@echo Compiling $*.c...
-	@$(CC) -c $(CFLAGS) -o $*.o $*.c
+	@$(CC) -c $(CFLAGS) -o $@ $<
 
 binkd.txt: binkd.8
 	@groff -Tascii -mman binkd.8 | perl -npe 's/.\010//g' >binkd.txt
