summary refs log tree commit diff
path: root/bin/Makefile
blob: f44d30268c2c4485ea10866f255cdf3a7809dfa2 (plain) (blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
PREFIX ?= ~/.local
MANDIR ?= ${PREFIX}/share/man

LIBS_PREFIX ?= /usr/local
CFLAGS += -I${LIBS_PREFIX}/include
LDFLAGS += -L${LIBS_PREFIX}/lib

CFLAGS += -Wall -Wextra -Wpedantic -Wno-gnu-case-range

BINS += beef
BINS += bibsort
BINS += bit
BINS += c
BINS += dehtml
BINS += dtch
BINS += git-comment
BINS += glitch
BINS += hilex
BINS += htagml
BINS += modem
BINS += mtags
BINS += nudge
BINS += order
BINS += pbd
BINS += pngo
BINS += psf2png
BINS += ptee
BINS += quick
BINS += scheme
BINS += shotty
BINS += sup
BINS += title
BINS += up
BINS += when
BINS += xx

BSD += ever

GAMES += freecell

TLS += downgrade
TLS += relay

MANS = ${BINS:%=man1/%.1}
MANS.BSD = ${BSD:%=man1/%.1}
MANS.GAMES = ${GAMES:%=man6/%.6}
MANS.TLS = ${TLS:%=man1/%.1}

LDLIBS.downgrade = -ltls
LDLIBS.dtch = -lutil
LDLIBS.fbclock = -lz
LDLIBS.freecell = -lcurses
LDLIBS.glitch = -lz
LDLIBS.modem = -lutil
LDLIBS.pngo = -lz
LDLIBS.ptee = -lutil
LDLIBS.relay = -ltls
LDLIBS.scheme = -lm
LDLIBS.title = -lcurl
LDLIBS.typer = -ltls

ALL ?= meta any

-include config.mk

all: ${ALL}

meta: .gitignore tags

any: ${BINS}

bsd: ${BSD}

games: ${GAMES}

tls: ${TLS}

IGNORE = *.o *.html
IGNORE += ${BINS} ${BSD} ${GAMES} ${TLS}
IGNORE += scheme.h tags htmltags

.gitignore: Makefile
	echo config.mk '${IGNORE}' | tr ' ' '\n' | sort > $@

tags: *.[chly]
	ctags -w *.[chly]

clean:
	rm -f ${IGNORE}

install: ${ALL:%=install-%}

install-meta:
	install -d ${PREFIX}/bin ${MANDIR}/man1

install-any: install-meta ${BINS} ${MANS}
	install ${BINS} ${PREFIX}/bin
	install -m 644 ${MANS} ${MANDIR}/man1

install-bsd: install-meta ${BSD} ${MANS.BSD}
	install ${BSD} ${PREFIX}/bin
	install -m 644 ${MANS.BSD} ${MANDIR}/man1

install-games: install-meta ${GAMES} ${MANS.GAMES}
	install ${GAMES} ${PREFIX}/bin
	install -m 644 ${MANS.GAMES} ${MANDIR}/man6

install-tls: install-meta ${TLS} ${MANS.TLS}
	install ${TLS} ${PREFIX}/bin
	install -m 644 ${MANS.TLS} ${MANDIR}/man1

uninstall:
	rm -f ${BINS:%=${PREFIX}/bin/%} ${MANS:%=${MANDIR}/%}
	rm -f ${BSD:%=${PREFIX}/bin/%} ${MANS.BSD:%=${MANDIR}/%}
	rm -f ${GAMES:%=${PREFIX}/bin/%} ${MANS.GAMES:%=${MANDIR}/%}
	rm -f ${TLS:%=${PREFIX}/bin/%} ${MANS.TLS:%=${MANDIR}/%}

.SUFFIXES: .pl

.c:
	${CC} ${CFLAGS} ${LDFLAGS} $< ${LDLIBS.$@} -o $@

.o:
	${CC} ${LDFLAGS} $< ${LDLIBS.$@} -o $@

.pl:
	cp -f $< $@
	chmod a+x $@

OBJS.hilex = c11.o hilex.o make.o mdoc.o sh.o

hilex: ${OBJS.hilex}
	${CC} ${LDFLAGS} ${OBJS.$@} ${LDLIBS.$@} -o $@

${OBJS.hilex}: hilex.h

fbatt.o fbclock.o: scheme.h

psf2png.o scheme.o: png.h

scheme.h: scheme
	./scheme -c > $@

include html.mk
[client 172.21.1.6] 'git <command> > [<revision>...] -- [<file>...]', referer: > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/ > [Tue Jun 10 17:45:32 2014] [error] [client 172.21.1.6] Premature end > of script headers: cgit, referer: > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/ The cache will kick in, so if you search for the same string again, it'll show an empty range, so you have to change the bogus strings each time. This is because we just pass the arguments straight to Git's revision parsing machinery which die()s if it cannot parse an argument, printing the above to stderr and exiting. The patch below makes it a bit friendlier by just ignoring unhandled arguments, but I can't see an easy way to report errors when we can't parse revision arguments without losing the flexibility of supporting all of the revision specifiers supported by Git. Reported-by: Konstantin Ryabitsev <mricon@kernel.org> 2014-06-28git: update for git 2.0Christian Hesse prefixcmp() and suffixcmp() have been remove, functionality is now provided by starts_with() and ends_with(). Retrurn values have been changed, so instead of just renaming we have to fix logic. Everything else looks just fine. 2014-04-17remove trailing whitespaces from source filesChristian Hesse 2014-04-12git: update to 1.9.2Christian Hesse Everything works just bumping the version in Makefile and commit hash in submodule. No code changes required. 2014-04-05Fix cgit_parse_url when a repo url is contained in another repo urlJulian Maurice For example, if I have two repos (remove-suffix is enabled): /foo /foo/bar http://cgit/foo/bar/ is interpreted as "repository 'foo', command 'bar'" instead of "repository 'foo/bar'" 2014-03-20Makefile: use more reliable git tarball mirrorJason A. Donenfeld 2014-03-20git: update to 1.9.1Christian Hesse