File: Makefile

package info (click to toggle)
fortune-mod 1:1.99.1-7
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 12,808 kB
  • ctags: 640
  • sloc: ansic: 1,957; makefile: 240; python: 35; sh: 15
file content (31 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# OCOOKIEDIR must point to the installation directory.

COOKIES := $(subst unrotated/,,$(wildcard unrotated/*))
RECODED := $(addprefix gen/,$(COOKIES))
DAT     := $(addsuffix .dat,$(RECODED))

STRFILE := ../../util/strfile
ROT     := ../../util/rot

.PHONY: all clean install

all: $(RECODED) $(DAT)

$(DAT): gen/%.dat: gen/%
	$(STRFILE) -x $<

$(RECODED): gen/%: unrotated/% | gen
	recode latin1..u8 < $< | $(ROT) > $@

gen:
	mkdir $@

install: all
	install -m 0755 -d $(OCOOKIEDIR)
	install -m 0644 $(RECODED) $(DAT) $(OCOOKIEDIR)
	for i in $(COOKIES) ; do \
	  ln -sf $$i $(OCOOKIEDIR)/$$i.u8 ; \
	done

clean:
	rm -rf gen