From c4bdaedd56551731796969ca8663c75907e29274 Mon Sep 17 00:00:00 2001 From: b Date: Thu, 10 Aug 2023 21:45:17 +0000 Subject: [PATCH] use config tool as submodule --- .gitmodules | 3 +++ config | 1 + makefile | 22 +++++++++++++--------- makefile.1.mak | 22 +++++++++++++--------- settings-release.txt | 5 ----- settings.txt | 1 - 6 files changed, 30 insertions(+), 24 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 b3fb84a..15bf9ea 100644 --- a/makefile +++ b/makefile @@ -22,6 +22,7 @@ TARGET = release # when want to change target run this first: # make -B TARGET=target_name makefile endif +PERL = perl CC =gcc @@ -47,8 +48,8 @@ CONFIGFILE = settings-$(TARGET).txt settings.txt # The configuration tool # http://bicyclesonthemoon.info/git/botm-config -CONFIGURE = /botm/bin/config/configure.pl -CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE) +CONFIGURE = $(PERL) ./configure.pl +CONFIGURE_CMD = $(CONFIGURE) $(CONFIGFILE) STANDALONE=\ @@ -171,9 +172,12 @@ param.png all: $(BIN) $(WWW) enhance.conf -makefile: makefile.1.mak $(CONFIGFILE) +makefile: makefile.1.mak $(CONFIGFILE) configure.pl $(CONFIGURE_CMD) < makefile.1.mak > makefile +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 + enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG) $(CC) $(CF) -o enhance enhance.c core.c $(C_SUBTOOL) $(L_IL) @@ -181,13 +185,13 @@ enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG) $(STANDALONE): %: standalone-%.c %.c %.h core.c core.h $(H_PNG) $(CC) $(CF) -o $@ standalone-$*.c $*.c core.c $(L_IL) -$(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c +$(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c configure.pl $(CONFIGURE) subtool=$* settings-subtool.txt --in standalone.c --out $@ -$(H_SUBTOOL): %.h: settings-subtool.txt subtool.h +$(H_SUBTOOL): %.h: settings-subtool.txt subtool.h configure.pl $(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@ -$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) +$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE) $(CGI): %: %.c online-core.c online-core.h $(H_PNG) @@ -199,10 +203,10 @@ $(H_PNG): %.h: %.png f2h f2h: f2h.c $(CC) $(CF) -o f2h f2h.c -$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE) +$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE) configure.pl $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > $*.htm -index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE) +index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE) configure.pl $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm @@ -228,7 +232,7 @@ cp_www: $(WWW) | mktree install: all cp_bin cp_www cp_conf clean: - $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI) + $(RM) -f enhance configure.pl $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI) PHONY: all clean install setuid mktree cp_bin cp_www diff --git a/makefile.1.mak b/makefile.1.mak index aa6a766..65a80a7 100644 --- a/makefile.1.mak +++ b/makefile.1.mak @@ -22,6 +22,7 @@ TARGET = debug ###MAKE_TARGET: # when want to change target run this first: # make -B TARGET=target_name makefile endif +PERL = perl ###MAKE_CC: CC=gcc @@ -47,8 +48,8 @@ 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 = $(PERL) ./configure.pl +CONFIGURE_CMD = $(CONFIGURE) $(CONFIGFILE) STANDALONE=\ @@ -171,9 +172,12 @@ param.png all: $(BIN) $(WWW) enhance.conf -makefile: makefile.1.mak $(CONFIGFILE) +makefile: makefile.1.mak $(CONFIGFILE) configure.pl $(CONFIGURE_CMD) < makefile.1.mak > makefile +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 + enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG) $(CC) $(CF) -o enhance enhance.c core.c $(C_SUBTOOL) $(L_IL) @@ -181,13 +185,13 @@ enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG) $(STANDALONE): %: standalone-%.c %.c %.h core.c core.h $(H_PNG) $(CC) $(CF) -o $@ standalone-$*.c $*.c core.c $(L_IL) -$(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c +$(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c configure.pl $(CONFIGURE) subtool=$* settings-subtool.txt --in standalone.c --out $@ -$(H_SUBTOOL): %.h: settings-subtool.txt subtool.h +$(H_SUBTOOL): %.h: settings-subtool.txt subtool.h configure.pl $(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@ -$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) +$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE) $(CGI): %: %.c online-core.c online-core.h $(H_PNG) @@ -199,10 +203,10 @@ $(H_PNG): %.h: %.png f2h f2h: f2h.c $(CC) $(CF) -o f2h f2h.c -$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE) +$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE) configure.pl $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > $*.htm -index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE) +index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE) configure.pl $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm @@ -228,7 +232,7 @@ cp_www: $(WWW) | mktree install: all cp_bin cp_www cp_conf clean: - $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI) + $(RM) -f enhance configure.pl $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI) PHONY: all clean install setuid mktree cp_bin cp_www diff --git a/settings-release.txt b/settings-release.txt index 42c9e50..a24fe6e 100644 --- a/settings-release.txt +++ b/settings-release.txt @@ -6,11 +6,6 @@ name: enhance # 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 - useragent: ENHANCE!ment tool (http://1190.bicyclesonthemoon.info/enhance) title_bluenh: ENHANCE! diff --git a/settings.txt b/settings.txt index 5cccada..fc883ae 100644 --- a/settings.txt +++ b/settings.txt @@ -51,7 +51,6 @@ CONF_reveal = $_bin_reveal_cgi_path CONF_t-1 = $_bin_t-1_cgi_path -MAKE_CONFIGURE = CONFIGURE = $configure MAKE_TARGET = TARGET = $target MAKE_CAT = CAT =$cat -- 2.30.2