1 # $NetBSD: Makefile,v 1.31 2021/01/02 03:21:39 nat Exp $
2 # @(#)Makefile 8.3 (Berkeley) 7/24/94
4 SUBDIR= adventure arithmetic atc \
5 backgammon banner battlestar bcd boggle \
6 caesar canfield cgram ching colorbars countmail cribbage \
7 dm factor fish gomoku \
8 hack hals_end hangman hunt larn mille monop morse number \
9 phantasia pig pom ppt primes quiz \
10 rain random robots rogue sail snake testpat tetris trek \
11 wargames warp worm worms wtf wump
12 TOPTARGETS= all clean install
19 export ROOT PREFIX LOCALSTATEDIR SYSCONFDIR
21 $(TOPTARGETS): $(SUBDIR)
24 +$(MAKE) -C $@ $(MAKECMDGOALS)
27 @echo "#define PREFIX \"$(PREFIX)\"" > config.h
28 @echo "#define LOCALSTATEDIR \"$(LOCALSTATEDIR)\"" >> config.h
29 @echo "#define SYSCONFDIR \"$(SYSCONFDIR)\"" >> config.h
33 cd ~/Documents/NetBSD; \
34 git format-patch -o $$TEMP $(shell cat upstream-commit) games; \
35 git rev-list HEAD -1 games/ > $(ROOT)/upstream-commit; \
37 for patch in $$TEMP/*.patch; do \
38 if [ "$$(filterdiff -x '*/Makefile' --strip=1 $$patch --clean)" = "" ]; then \
39 echo "Skipping $$(basename $$patch) because it's empty"; \
41 filterdiff -x '*/Makefile' --strip=1 $$patch | git am; \
48 .PHONY: $(TOPTARGETS) $(SUBDIR) update