From 2bf441a5ae7f54effaad484ab8a451c26a560eb3 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 6 Jul 2023 07:14:44 -0900 Subject: [PATCH] webcit-ng makefile now handles changes to webcit.h properly --- webcit-ng/Makefile | 4 ++++ webcit-ng/README.md | 3 --- webcit-ng/server/webcit.h | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/webcit-ng/Makefile b/webcit-ng/Makefile index 7b9e2c299..8c8e317fe 100644 --- a/webcit-ng/Makefile +++ b/webcit-ng/Makefile @@ -4,12 +4,16 @@ LDFLAGS := $(LDFLAGS) SRC := server OBJ := server +HEADERS := $(wildcard $(SRC)/*.h) SOURCES := $(wildcard $(SRC)/*.c) OBJECTS := $(patsubst $(SRC)/%.c, $(OBJ)/%.o, $(SOURCES)) webcit: $(OBJECTS) gcc $(CFLAGS) $(OBJECTS) $(LDFLAGS) -lcitadel -lpthread -lcrypto -lssl -lexpat -o webcit +$(SRC)/%.c: $(HEADERS) + touch $@ + $(OBJ)/%.o: $(SRC)/%.c gcc $(CFLAGS) -I$(SRC) -c $< -o $@ diff --git a/webcit-ng/README.md b/webcit-ng/README.md index a7890dcf9..442d40e31 100644 --- a/webcit-ng/README.md +++ b/webcit-ng/README.md @@ -6,9 +6,6 @@ with as little spaghetti as possible. Please don't mess with this yet. I'm only pushing it upstream so it gets backed up. -Yes, I know the Makefile is built in a way that forces it to recompile everything -when you touch even one file. For the time being this is acceptable. - ## Design goals * Hold as little state as possible * Require NO cleanup. Killing the process lets the OS reclaim all resources. diff --git a/webcit-ng/server/webcit.h b/webcit-ng/server/webcit.h index 32939d286..72f98f7f4 100644 --- a/webcit-ng/server/webcit.h +++ b/webcit-ng/server/webcit.h @@ -1,6 +1,6 @@ // webcit.h - "header of headers" // -// Copyright (c) 1996-2022 by the citadel.org team +// Copyright (c) 1996-2023 by the citadel.org team // // This program is open source software. You can redistribute it and/or // modify it under the terms of the GNU General Public License, version 3. @@ -83,9 +83,9 @@ struct ctdlsession { char room[128]; // What room we are currently in int room_current_view; int room_default_view; - int is_trash_folder; // Nonzero if this room is the user's Trash folder + int is_trash_folder; // nonzero if this room is the user's Trash folder int is_room_aide; // nonzero if the user has aide rights to THIS room - int can_delete_messages; // nonzeri if the user is permitted to delete messages in THIS room + int can_delete_messages; // nonzero if the user is permitted to delete messages in THIS room long last_seen; int new_messages; int total_messages; -- 2.39.2