From a496c26c11fa0d3372e756057bda035172308082 Mon Sep 17 00:00:00 2001 From: b Date: Thu, 10 Aug 2023 21:24:42 +0000 Subject: [PATCH] use config tool as submodule --- .gitmodules | 3 +++ config | 1 + makefile | 14 +++++++++----- makefile.1.mak | 14 +++++++++----- settings-release.txt | 4 ---- 5 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 .gitmodules create mode 160000 config diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b80b8b3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "config"] + path = config + url = ../../botm/config diff --git a/config b/config new file mode 160000 index 0000000..1c21433 --- /dev/null +++ b/config @@ -0,0 +1 @@ +Subproject commit 1c21433837c5bc34100f04bbfeb8ce403844e91d diff --git a/makefile b/makefile index aaef9dc..5d203dc 100644 --- a/makefile +++ b/makefile @@ -29,6 +29,7 @@ TARGET =release # when want to change target run this first: # make -B TARGET=target_name makefile endif +PERL = perl CONFIGFILE = settings-$(TARGET).txt settings.txt @@ -65,8 +66,7 @@ CRON = /etc/cron.d/ottmirror # The configuration tool # http://bicyclesonthemoon.info/git/botm-config -CONFIGURE =/botm/bin/config/configure.pl -CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE) +CONFIGURE_CMD = $(PERL) ./configure.pl $(CONFIGFILE) # keep these 2 lists in the same order!: GENERATE_FROM=\ @@ -228,10 +228,14 @@ $(MEM_POST_PATH) all: $(TO_GENERATE) $(C) $(C_CGI) -makefile: makefile.1.mak $(CONFIGFILE) +makefile: makefile.1.mak $(CONFIGFILE) configure.pl $(CONFIGURE_CMD) < makefile.1.mak > makefile -$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) +configure.pl: $(CONFIGFILE) config/configure.1.pl + $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl + + +$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE) $(C): %: %.c @@ -275,7 +279,7 @@ install: cp_bin cp_www cp_www_desc cp_src cp_conf cp_cron clean: - $(RM) -f $(TO_GENERATE) $(C) $(C_CGI) + $(RM) -f configure.pl $(TO_GENERATE) $(C) $(C_CGI) PHONY: all clean setuid mktree cp_bin co_conf cp_cron cp_src cp_www cp_www_desc install diff --git a/makefile.1.mak b/makefile.1.mak index f1449fa..96a32bf 100644 --- a/makefile.1.mak +++ b/makefile.1.mak @@ -29,6 +29,7 @@ TARGET = debug ###MAKE_TARGET: # when want to change target run this first: # make -B TARGET=target_name makefile endif +PERL = perl CONFIGFILE = settings-$(TARGET).txt settings.txt @@ -65,8 +66,7 @@ CONFIGFILE = settings-$(TARGET).txt settings.txt # The configuration tool # http://bicyclesonthemoon.info/git/botm-config -CONFIGURE = /botm/bin/config/configure.pl ###MAKE_CONFIGURE: -CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE) +CONFIGURE_CMD = $(PERL) ./configure.pl $(CONFIGFILE) # keep these 2 lists in the same order!: GENERATE_FROM=\ @@ -228,10 +228,14 @@ $(MEM_POST_PATH) all: $(TO_GENERATE) $(C) $(C_CGI) -makefile: makefile.1.mak $(CONFIGFILE) +makefile: makefile.1.mak $(CONFIGFILE) configure.pl $(CONFIGURE_CMD) < makefile.1.mak > makefile -$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) +configure.pl: $(CONFIGFILE) config/configure.1.pl + $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl + + +$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE) $(C): %: %.c @@ -275,7 +279,7 @@ install: cp_bin cp_www cp_www_desc cp_src cp_conf cp_cron clean: - $(RM) -f $(TO_GENERATE) $(C) $(C_CGI) + $(RM) -f configure.pl $(TO_GENERATE) $(C) $(C_CGI) PHONY: all clean setuid mktree cp_bin co_conf cp_cron cp_src cp_www cp_www_desc install diff --git a/settings-release.txt b/settings-release.txt index cdfec61..fc6a3ae 100644 --- a/settings-release.txt +++ b/settings-release.txt @@ -6,10 +6,6 @@ name: ottmirror # where TARGET_NAME is the value target: release -# The configuration tool -# http://bicyclesonthemoon.info/git/botm-config -# alternatively, copy configure.pl to source directory. -configure: /botm/bin/config/configure.pl useragent2: bothasar_t (http://1190.bicyclesonthemoon.info/ott/; Time thread mirror bot) useragent3: bothasar_p (http://1190.bicyclesonthemoon.info/ott/; Time thread post bot) -- 2.30.2