]> code.citadel.org Git - citadel.git/commitdiff
webcit-ng makefile now handles changes to webcit.h properly
authorArt Cancro <ajc@citadel.org>
Thu, 6 Jul 2023 16:14:44 +0000 (07:14 -0900)
committerArt Cancro <ajc@citadel.org>
Thu, 6 Jul 2023 16:14:44 +0000 (07:14 -0900)
webcit-ng/Makefile
webcit-ng/README.md
webcit-ng/server/webcit.h

index 7b9e2c299bcd192d8eed07845f6cb8b99caf8d1d..8c8e317fe952a4d9d156aa8d22846686b628be50 100644 (file)
@@ -4,12 +4,16 @@ LDFLAGS := $(LDFLAGS)
 SRC := server
 OBJ := server
 
 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
 
 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 $@
 
 $(OBJ)/%.o: $(SRC)/%.c
        gcc $(CFLAGS) -I$(SRC) -c $< -o $@
 
index a7890dcf96360184dfdd74e08f77856e6f4a0a05..442d40e31ed46686237c0b8a2088a5d008f1bcda 100644 (file)
@@ -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.
 
 
 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.
 ## Design goals
 * Hold as little state as possible
 * Require NO cleanup.  Killing the process lets the OS reclaim all resources.
index 32939d28622c32e12ee44ba8daabe83a0d6eccd3..72f98f7f48c859c299b2dd8eed5def6622c0b25f 100644 (file)
@@ -1,6 +1,6 @@
 // webcit.h - "header of headers"
 //
 // 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.
 //
 // 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;
        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 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;
        long last_seen;
        int new_messages;
        int total_messages;