💾 Archived View for anachronauts.club › cgi-bin › repos › cgi › guide.git › tree › trunk › GNUmakefi… captured on 2022-01-08 at 13:44:11. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-05)

-=-=-=-=-=-=-

guide.git

git @ anachronauts.club

summary

tree

log

refs

guide.git/GNUmakefile | 912 bytes

view raw

 1 .PHONY: all clean install package package-install
 2 
 3 PREFIX := /usr/local
 4 DATADIR := $(PREFIX)/share
 5 MANDIR := $(DATADIR)/man
 6 STAGE := stage
 7 PKGDIR := out
 8 
 9 all: text-gemini.5.gz anachronauts.7.gz gemini.7.gz
10 
11 clean:
12 	-rm *.gz install.log
13 	-rm -r $(STAGE)
14 
15 %.gz: %.scd suffix.txt
16 	cat $^ | scdoc | gzip > $@
17 
18 install: all
19 	install -d -Minstall.log $(MANDIR)/man5
20 	install -Minstall.log text-gemini.5.gz $(MANDIR)/man5
21 	install -d -Minstall.log $(MANDIR)/man7
22 	install -Minstall.log anachronauts.7.gz gemini.7.gz $(MANDIR)/man7
23 
24 package:
25 	-rm install.log
26 	-rm -r $(STAGE)
27 	$(MAKE) PREFIX=$(STAGE)$(PREFIX) install
28 	cat MANIFEST > $(STAGE)/+MANIFEST
29 	echo prefix $(PREFIX) >> $(STAGE)/+MANIFEST
30 	awk '/type=file/ { print substr($1, index($1, "$(PREFIX)")) }' install.log > $(STAGE)/plist
31 	mkdir -p $(PKGDIR)
32 	pkg create -o "$(PKGDIR)" -r "$(STAGE)" -M "$(STAGE)/+MANIFEST" -p "$(STAGE)/plist"
33 	pkg repo "$(PKGDIR)"