timekeeper

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

commit 628f2eedbb04e27a99457b96a2072aa690e984f2
parent 08f2ce50d02f0cd21e613cf554dcc851a68c4f8a
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Sun, 24 Mar 2024 08:18:10 -0700

Update DataDir

Move DataDir to /var/timekeeper instead of /tmp as the stuff stored
there should not be pruned, etc.

Also:
- Add config.h to hdr list so the program will be re-compiled if it changes
- Fix frags being installed to ${prefix}

Diffstat:
MMakefile | 10++++++----
Mconfig.h | 2+-
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile @@ -3,14 +3,14 @@ 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} -datadir = /var/www/tmp +datadir = /var/www/var/timekeeper pages = pages/index.c pages/login.c pages/logout.c pages/account.c \ pages/main.c pages/export.c pages/archive.c pages/frag.c hdrsrc = page.c html.c user.c stmt.c key.c times.c menu.c frag.c \ pages/util.c pages/common.c src = ${hdrsrc} ${pages} -hdr = ${hdrsrc:.c=.h} util.h pages/util.h pages/pages.h +hdr = ${hdrsrc:.c=.h} util.h pages/util.h pages/pages.h config.h obj = ${src:.c=.o} all: ${name} @@ -27,7 +27,8 @@ clean: rm -f ${name} ${name}.o ${obj} install: ${name} - cp -r scripts css frags ${prefix} + cp -r scripts css ${prefix} + cp -r frags ${datadir} cp -af ${name} ${prefix} install-run-pre: @@ -39,7 +40,8 @@ install-run-post: install-run: install-run-pre install install-run-post uninstall: - rm -rf ${prefix}/css ${prefix}/scripts ${prefix}/frags + rm -rf ${prefix}/css ${prefix}/scripts + rm -rf ${datadir}/frags rm -f ${prefix}/${name} .PHONY: all clean install uninstall install-run-pre install-run-post install-run diff --git a/config.h b/config.h @@ -1 +1 @@ -#define DataDir "/tmp" +#define DataDir "/var/timekeeper"