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 32 33 34 35 36 37 38
|
CC=gcc
CFLAGS = -Wall -Werror -O3
all: ent ent.1
ent: ent.o iso8859.o randtest.o
$(CC) $(CFLAGS) $(LDFLAGS) ent.o iso8859.o randtest.o -o ent -lm
ent.c: iso8859.h randtest.h
clean:
rm -f *.o ent ent.1 test/actual
.PHONY: test
test: ent
./ent entitle.gif >test/actual
./ent -c entitle.gif >test/actual
./ent -fc entitle.gif >>test/actual
./ent -b entitle.gif >>test/actual
./ent -bc entitle.gif >>test/actual
./ent -t entitle.gif >>test/actual
./ent -ct entitle.gif >>test/actual
./ent -ft entitle.gif >>test/actual
./ent -bt entitle.gif >>test/actual
./ent -bct entitle.gif >>test/actual
diff -s test/expected test/actual
%.1: %.1.txt
asciidoc -b docbook -d manpage $<
docbook2x-man $*.1.xml
mv $*.1 $*.1.pre
cat $*.1.pre | sed "s/-b /\\\\-b/" | \
sed "s/-c /\\\\-c/" | \
sed "s/-f /\\\\-f/" | \
sed "s/-t /\\\\-t/" | \
sed "s/-u /\\\\-u/" | \
sed "s/ -b/ \\\\-b/" > $*.1
rm -f $*.1.xml $*.1.pre
|