timekeeper

[Abandoned unfinished] CGI web application in C for time tracking. (My first, just a learning project)
Log | Files | Refs | README

commit 08f2ce50d02f0cd21e613cf554dcc851a68c4f8a
parent f75a467711364a5eac72a2d7946ba07e1194c204
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Sun, 24 Mar 2024 08:07:12 -0700

Update Makefile

- Install into "timekeeper" instead of "timekeeper.primus.lan"
- Make a separate target for managing kfcgi(8) called install-run
- Simplify and shorten install and uninstall targets

Diffstat:
MMakefile | 24+++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile @@ -2,7 +2,7 @@ name = timekeeper cc = ${CC} cflags = ${CFLAGS} -O0 -Wall -Wextra -I/usr/local/include lddflags = ${LDDFLAGS} -static -L/usr/local/lib -lkcgi -lkcgihtml -lz -lsqlbox -lsqlite3 -lm -lpthread -prefix = /var/www/htdocs/${name}.primus.lan +prefix = /var/www/htdocs/${name} datadir = /var/www/tmp pages = pages/index.c pages/login.c pages/logout.c pages/account.c \ @@ -27,22 +27,20 @@ clean: rm -f ${name} ${name}.o ${obj} install: ${name} - mkdir -p ${prefix}/scripts - cp scripts/* ${prefix}/scripts - mkdir -p ${prefix}/css - cp css/* ${prefix}/css - cp -r frags ${datadir} + cp -r scripts css frags ${prefix} + cp -af ${name} ${prefix} - # Otherwise 'Text file is busy' +install-run-pre: pkill kfcgi || true - cp -af ${name} ${prefix} - kfcgi -n 1 -N 1 -u www -U www -- /htdocs/timekeeper.primus.lan/timekeeper + +install-run-post: + kfcgi -n 1 -N 1 -u www -U www -- /htdocs/${name}/${name} + +install-run: install-run-pre install install-run-post uninstall: - rm -rf ${prefix}/css - rm -rf ${prefix}/scripts - rm -rf ${datadir}/frags + rm -rf ${prefix}/css ${prefix}/scripts ${prefix}/frags rm -f ${prefix}/${name} -.PHONY: clean install uninstall +.PHONY: all clean install uninstall install-run-pre install-run-post install-run .SUFFIX: .c .o