From ad470e81aa0aa0a6fcae0917075e264d33d3cb5f Mon Sep 17 00:00:00 2001 From: b Date: Sat, 6 Jun 2026 17:04:52 +0000 Subject: [PATCH] config is now external dependency, not submodule --- .gitmodules | 3 --- config | 1 - makefile | 22 +++++++++++----------- makefile.1.mak | 22 +++++++++++----------- settings-again.txt | 3 ++- settings-bsta.txt | 3 ++- settings-debug.txt | 3 ++- settings.txt | 4 +++- 8 files changed, 31 insertions(+), 30 deletions(-) delete mode 160000 config diff --git a/.gitmodules b/.gitmodules index 7c416db..8299156 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "config"] - path = config - url = ../../botm/config [submodule "exec"] path = exec url = ../../botm/exec diff --git a/config b/config deleted file mode 160000 index 352e86f..0000000 --- a/config +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 352e86fd3d4afab9adb6c340d236f501f3d91560 diff --git a/makefile b/makefile index 2388b5e..c289948 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,6 @@ # "makefile" is automatically generated from "makefile.1.mak" # -# Copyright (C) 2016, 2017, 2023, 2024 Balthasar Szczepański +# Copyright (C) 2016, 2017, 2023, 2024, 2026 Balthasar Szczepański # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -22,6 +22,7 @@ TARGET = debug # make -B TARGET=target_name makefile endif PERL = perl +CONFIGURE = botm-config CC =/usr/bin/gcc CF =-g -Wall @@ -33,6 +34,8 @@ PERL =/usr/bin/perl RM =/usr/bin/rm SUDO =/usr/bin/sudo +CONFIGURE = $(PERL) /botm/bin/config-1.3/configure.pl + BIN_PATH = /botm/bin/test-bsta DATA_PATH = /botm/data/test-bsta DATA_WORDS_PATH = /botm/data/test-bsta/words @@ -48,7 +51,7 @@ CONFIGFILE = settings-$(TARGET).txt settings.txt DEFAULT_CONFIGFILE = settings-$(DEFAULT_TARGET).txt settings.txt # The configuration tool -CONFIGURE_CMD = $(PERL) ./configure.pl --do $(CONFIGFILE) +CONFIGURE_CMD = $(CONFIGURE) --do $(CONFIGFILE) # keep these 2 lists in the same order!: GENERATE_FROM=\ @@ -152,17 +155,14 @@ timer.js all: $(BIN) setuid exec -makefile: makefile.1.mak $(CONFIGFILE) configure.pl +makefile: makefile.1.mak $(CONFIGFILE) $(CONFIGURE_CMD) --in makefile.1.mak --out makefile -configure.pl: $(CONFIGFILE) config/configure.1.pl - $(PERL) config/configure.1.pl --do target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl - -$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl +$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) $(CONFIGURE_CMD) --v --in $(GENERATE_FROM) --out $(TO_GENERATE) -$(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt configure.pl - $(PERL) configure.pl --do path=$(BIN_PATH) target=$*.pl io_path=$(LOG_PATH) stderr=$*-stderr.log exec/settings.txt --in exec/exec.c --out $*.c +$(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt + $(CONFIGURE) --do path=$(BIN_PATH) target=$*.pl io_path=$(LOG_PATH) stderr=$*-stderr.log exec/settings.txt --in exec/exec.c --out $*.c $(CC) $(CF) -o $@ $*.c exec: $(EXEC) @@ -203,8 +203,8 @@ install: all cp_bin cp_lib cp_www cp_conf cp_cron clean: - $(RM) -f configure.pl $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c) - $(PERL) config/configure.1.pl --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile + $(RM) -f $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c) + $(CONFIGURE) --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile PHONY: all clean install setuid exec mktree cp_bin cp_lib cp_www cp_conf cp_cron diff --git a/makefile.1.mak b/makefile.1.mak index 3868561..8cb3534 100644 --- a/makefile.1.mak +++ b/makefile.1.mak @@ -1,6 +1,6 @@ # "makefile" is automatically generated from "makefile.1.mak" # -# Copyright (C) 2016, 2017, 2023, 2024 Balthasar Szczepański +# Copyright (C) 2016, 2017, 2023, 2024, 2026 Balthasar Szczepański # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -22,6 +22,7 @@ TARGET = $(DEFAULT_TARGET) ###MAKE_TARGET: # make -B TARGET=target_name makefile endif PERL = perl +CONFIGURE = botm-config ###MAKE_CC: CC=gcc ###MAKE_CF: CF=-g -Wall @@ -33,6 +34,8 @@ PERL = perl ###MAKE_RM: RM = rm ###MAKE_SUDO: SUDO = sudo +###MAKE_CONFIGURE: CONFIGURE = perl /botm/bin/config-1.3/configure.pl + ###MAKE_BIN_PATH: BIN_PATH = /botm/bin/bsta ###MAKE_DATA_PATH: DATA_PATH = /botm/data/bsta ###MAKE_DATA_WORDS_PATH: DATA_WORDS_PATH = /botm/data/bsta/words @@ -48,7 +51,7 @@ CONFIGFILE = settings-$(TARGET).txt settings.txt DEFAULT_CONFIGFILE = settings-$(DEFAULT_TARGET).txt settings.txt # The configuration tool -CONFIGURE_CMD = $(PERL) ./configure.pl --do $(CONFIGFILE) +CONFIGURE_CMD = $(CONFIGURE) --do $(CONFIGFILE) # keep these 2 lists in the same order!: GENERATE_FROM=\ @@ -152,17 +155,14 @@ timer.js all: $(BIN) setuid exec -makefile: makefile.1.mak $(CONFIGFILE) configure.pl +makefile: makefile.1.mak $(CONFIGFILE) $(CONFIGURE_CMD) --in makefile.1.mak --out makefile -configure.pl: $(CONFIGFILE) config/configure.1.pl - $(PERL) config/configure.1.pl --do target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl - -$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl +$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) $(CONFIGURE_CMD) --v --in $(GENERATE_FROM) --out $(TO_GENERATE) -$(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt configure.pl - $(PERL) configure.pl --do path=$(BIN_PATH) target=$*.pl io_path=$(LOG_PATH) stderr=$*-stderr.log exec/settings.txt --in exec/exec.c --out $*.c +$(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt + $(CONFIGURE) --do path=$(BIN_PATH) target=$*.pl io_path=$(LOG_PATH) stderr=$*-stderr.log exec/settings.txt --in exec/exec.c --out $*.c $(CC) $(CF) -o $@ $*.c exec: $(EXEC) @@ -203,8 +203,8 @@ install: all cp_bin cp_lib cp_www cp_conf cp_cron clean: - $(RM) -f configure.pl $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c) - $(PERL) config/configure.1.pl --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile + $(RM) -f $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c) + $(CONFIGURE) --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile PHONY: all clean install setuid exec mktree cp_bin cp_lib cp_www cp_conf cp_cron diff --git a/settings-again.txt b/settings-again.txt index 2028590..0026ad7 100644 --- a/settings-again.txt +++ b/settings-again.txt @@ -54,7 +54,8 @@ perl : /usr/bin/perl rm : /usr/bin/rm sudo : /usr/bin/sudo -oldlogs: /botm/bin/oldlogs/oldlogs.pl +oldlogs : /botm/bin/oldlogs/oldlogs.pl +configure: /botm/bin/config-1.3/configure.pl CC: /usr/bin/gcc CF: -g -Wall diff --git a/settings-bsta.txt b/settings-bsta.txt index 7b40e3b..e9d554c 100644 --- a/settings-bsta.txt +++ b/settings-bsta.txt @@ -54,7 +54,8 @@ perl : /usr/bin/perl rm : /usr/bin/rm sudo : /usr/bin/sudo -oldlogs: /botm/bin/oldlogs/oldlogs.pl +oldlogs : /botm/bin/oldlogs/oldlogs.pl +configure: /botm/bin/config-1.3/configure.pl CC: /usr/bin/gcc CF: -g -Wall diff --git a/settings-debug.txt b/settings-debug.txt index 3a0f3f9..5631c5f 100644 --- a/settings-debug.txt +++ b/settings-debug.txt @@ -54,7 +54,8 @@ perl : /usr/bin/perl rm : /usr/bin/rm sudo : /usr/bin/sudo -oldlogs: /botm/bin/oldlogs/oldlogs.pl +oldlogs : /botm/bin/oldlogs/oldlogs.pl +configure: /botm/bin/config-1.3/configure.pl CC: /usr/bin/gcc CF: -g -Wall diff --git a/settings.txt b/settings.txt index b0a4433..16f5691 100644 --- a/settings.txt +++ b/settings.txt @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -_version: 1.2.15 +_version: 1.3.0 _SHEBANG: #!$0 @@ -148,6 +148,8 @@ MAKE_LOG_PATH = LOG_PATH = $log_path MAKE_TMP_PATH = TMP_PATH = $tmp_path MAKE_WWW_PATH = WWW_PATH = $www_path +MAKE_CONFIGURE = CONFIGURE = \$(PERL) $configure + PERL_LIB = @_PERL_USE_2(lib, @_PERL_STR($lib_path)) -- 2.30.2