Blame


1 83f0f95a 2022-09-29 op include config.mk
2 bff58270 2022-09-19 op
3 83f0f95a 2022-09-29 op # -- options --
4 83f0f95a 2022-09-29 op
5 83f0f95a 2022-09-29 op PREFIX = /usr/local
6 83f0f95a 2022-09-29 op SBINDIR = ${PREFIX}/sbin
7 83f0f95a 2022-09-29 op MANDIR = ${PREFIX}/man
8 83f0f95a 2022-09-29 op WWWDIR = /var/www/htdocs
9 83f0f95a 2022-09-29 op
10 83f0f95a 2022-09-29 op # -- build-related variables --
11 83f0f95a 2022-09-29 op
12 b0a6bcf7 2022-09-13 op PROG = galileo
13 3a437097 2023-04-15 op VERSION = 0.4
14 83f0f95a 2022-09-29 op DISTNAME = ${PROG}-${VERSION}
15 b0a6bcf7 2022-09-13 op
16 d358df0e 2022-09-29 op SRCS = galileo.c config.c fcgi.c fragments.c log.c proc.c proxy.c \
17 83f0f95a 2022-09-29 op template/tmpl.c xmalloc.c y.tab.c
18 b0a6bcf7 2022-09-13 op
19 83f0f95a 2022-09-29 op COBJS = ${COMPATS:.c=.o}
20 83f0f95a 2022-09-29 op OBJS = ${SRCS:.c=.o} ${COBJS}
21 bff58270 2022-09-19 op
22 71d4bcee 2022-09-14 op MAN = ${PROG}.conf.5 ${PROG}.8
23 b0a6bcf7 2022-09-13 op
24 83f0f95a 2022-09-29 op # -- public targets --
25 b0a6bcf7 2022-09-13 op
26 83f0f95a 2022-09-29 op all: ${PROG}
27 83f0f95a 2022-09-29 op .PHONY: all clean distclean install uninstall
28 b0a6bcf7 2022-09-13 op
29 92f1d5fb 2023-04-14 op tags: ${SRCS}
30 92f1d5fb 2023-04-14 op ctags ${SRCS}
31 92f1d5fb 2023-04-14 op
32 83f0f95a 2022-09-29 op clean:
33 83f0f95a 2022-09-29 op rm -f *.[do] y.tab.* compat/*.[do] tests/*.[do] fragments.c
34 83f0f95a 2022-09-29 op ${MAKE} -C template clean
35 b0a6bcf7 2022-09-13 op
36 83f0f95a 2022-09-29 op distclean: clean
37 83f0f95a 2022-09-29 op rm -f config.h config.h.old config.mk config.log config.log.old
38 83f0f95a 2022-09-29 op ${MAKE} -C template distclean
39 b0a6bcf7 2022-09-13 op
40 83f0f95a 2022-09-29 op install:
41 83f0f95a 2022-09-29 op mkdir -p ${DESTDIR}${MANDIR}/man5
42 83f0f95a 2022-09-29 op mkdir -p ${DESTDIR}${MANDIR}/man8
43 83f0f95a 2022-09-29 op mkdir -p ${DESTDIR}${SBINDIR}
44 83f0f95a 2022-09-29 op mkdir -p ${DESTDIR}${WWWDIR}
45 83f0f95a 2022-09-29 op ${INSTALL_MAN} galileo.conf.5 ${DESTDIR}${MANDIR}/man5/${PROG}.conf.5
46 83f0f95a 2022-09-29 op ${INSTALL_MAN} galileo.8 ${DESTDIR}${MANDIR}/man8/${PROG}.8
47 83f0f95a 2022-09-29 op ${INSTALL_PROGRAM} ${PROG} ${DESTDIR}${SBINDIR}
48 83f0f95a 2022-09-29 op ${INSTALL_DATA} galileo.css ${DESTDIR}${WWWDIR}
49 b0a6bcf7 2022-09-13 op
50 83f0f95a 2022-09-29 op uninstall:
51 83f0f95a 2022-09-29 op rm ${DESTDIR}${MANDIR}/man5/${PROG}.conf.5
52 83f0f95a 2022-09-29 op rm ${DESTDIR}${MANDIR}/man8/${PROG}.8
53 83f0f95a 2022-09-29 op rm ${DESTDIR}${SBINDIR}/${PROG}
54 83f0f95a 2022-09-29 op rm ${DESTDIR}${WWWDIR}/galileo.css
55 b0d81cea 2022-09-14 op
56 83f0f95a 2022-09-29 op # -- internal build targets --
57 712e0708 2022-09-21 op
58 83f0f95a 2022-09-29 op ${PROG}: ${OBJS}
59 83f0f95a 2022-09-29 op ${CC} -o $@ ${OBJS} ${LIBS} ${LDFLAGS}
60 bff58270 2022-09-19 op
61 811c5804 2022-12-13 op fragments.c: fragments.tmpl
62 83f0f95a 2022-09-29 op ${MAKE} -C template
63 bbf1d288 2022-11-25 op ./template/template -o $@ fragments.tmpl
64 83f0f95a 2022-09-29 op
65 83f0f95a 2022-09-29 op y.tab.c: parse.y
66 83f0f95a 2022-09-29 op ${YACC} -b y parse.y
67 83f0f95a 2022-09-29 op
68 83f0f95a 2022-09-29 op .c.o:
69 83f0f95a 2022-09-29 op ${CC} ${CFLAGS} -c $< -o $@
70 83f0f95a 2022-09-29 op
71 83f0f95a 2022-09-29 op # -- maintainer targets --
72 83f0f95a 2022-09-29 op
73 be7c4e2c 2023-03-18 op PRIVKEY = missing-PRIVKEY
74 6c629180 2022-11-12 op DISTFILES = CHANGES \
75 6c629180 2022-11-12 op Makefile \
76 83f0f95a 2022-09-29 op README \
77 83f0f95a 2022-09-29 op config.c \
78 83f0f95a 2022-09-29 op configure \
79 83f0f95a 2022-09-29 op fcgi.c \
80 83f0f95a 2022-09-29 op fragments.c \
81 83f0f95a 2022-09-29 op fragments.tmpl \
82 83f0f95a 2022-09-29 op galileo.8 \
83 83f0f95a 2022-09-29 op galileo.c \
84 83f0f95a 2022-09-29 op galileo.conf.5 \
85 83f0f95a 2022-09-29 op galileo.css \
86 83f0f95a 2022-09-29 op galileo.h \
87 83f0f95a 2022-09-29 op log.c \
88 83f0f95a 2022-09-29 op log.h \
89 83f0f95a 2022-09-29 op parse.y \
90 83f0f95a 2022-09-29 op proc.c \
91 83f0f95a 2022-09-29 op proc.h \
92 83f0f95a 2022-09-29 op proxy.c \
93 83f0f95a 2022-09-29 op xmalloc.c \
94 83f0f95a 2022-09-29 op xmalloc.h \
95 83f0f95a 2022-09-29 op y.tab.c
96 83f0f95a 2022-09-29 op
97 6c629180 2022-11-12 op .PHONY: release dist
98 6c629180 2022-11-12 op
99 ba0dbc93 2023-04-15 op release:
100 ba0dbc93 2023-04-15 op sed -i -e '/^RELEASE=/s/no/yes/' configure
101 ba0dbc93 2023-04-15 op ${MAKE} ${DISTNAME}.sha256.sig
102 ba0dbc93 2023-04-15 op sed -i -e '/^RELEASE=/s/yes/no/' configure
103 ba0dbc93 2023-04-15 op
104 83f0f95a 2022-09-29 op dist: ${DISTNAME}.sha256
105 83f0f95a 2022-09-29 op
106 6c629180 2022-11-12 op ${DISTNAME}.sha256.sig: ${DISTNAME}.sha256
107 6c629180 2022-11-12 op signify -S -e -m ${DISTNAME}.sha256 -s ${PRIVKEY}
108 6c629180 2022-11-12 op
109 83f0f95a 2022-09-29 op ${DISTNAME}.sha256: ${DISTNAME}.tar.gz
110 83f0f95a 2022-09-29 op sha256 ${DISTNAME}.tar.gz > $@
111 83f0f95a 2022-09-29 op
112 83f0f95a 2022-09-29 op ${DISTNAME}.tar.gz: ${DISTFILES}
113 83f0f95a 2022-09-29 op mkdir -p .dist/${DISTNAME}/
114 83f0f95a 2022-09-29 op ${INSTALL} -m 0644 ${DISTFILES} .dist/${DISTNAME}
115 83f0f95a 2022-09-29 op ${MAKE} -C compat DESTDIR=${PWD}/.dist/${DISTNAME}/compat dist
116 6c629180 2022-11-12 op ${MAKE} -C keys DESTDIR=${PWD}/.dist/${DISTNAME}/keys dist
117 83f0f95a 2022-09-29 op ${MAKE} -C template DESTDIR=${PWD}/.dist/${DISTNAME}/template dist
118 83f0f95a 2022-09-29 op ${MAKE} -C tests DESTDIR=${PWD}/.dist/${DISTNAME}/tests dist
119 83f0f95a 2022-09-29 op cd .dist/${DISTNAME} && chmod 755 configure template/configure
120 83f0f95a 2022-09-29 op cd .dist && tar czf ../$@ ${DISTNAME}
121 83f0f95a 2022-09-29 op rm -rf .dist/
122 83f0f95a 2022-09-29 op
123 83f0f95a 2022-09-29 op .PHONY: ${DISTNAME}.tar.gz
124 83f0f95a 2022-09-29 op
125 83f0f95a 2022-09-29 op # -- dependencies --
126 83f0f95a 2022-09-29 op
127 83f0f95a 2022-09-29 op -include config.d
128 83f0f95a 2022-09-29 op -include fcgi.d
129 83f0f95a 2022-09-29 op -include fragments.d
130 81c76a9a 2023-03-02 op -include galileo.d
131 83f0f95a 2022-09-29 op -include log.d
132 83f0f95a 2022-09-29 op -include proc.d
133 83f0f95a 2022-09-29 op -include proxy.d
134 81c76a9a 2023-03-02 op -include template/tmpl.d
135 83f0f95a 2022-09-29 op -include xmalloc.d
136 81c76a9a 2023-03-02 op -include y.tab.d