--- /dev/null
+[submodule "config"]
+ path = config
+ url = ../../botm/config
--- /dev/null
+Subproject commit 1c21433837c5bc34100f04bbfeb8ce403844e91d
# when want to change target run this first:
# make -B TARGET=target_name makefile
endif
+PERL = perl
CC =gcc
# 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=\
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)
$(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)
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
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
# when want to change target run this first:
# make -B TARGET=target_name makefile
endif
+PERL = perl
###MAKE_CC: CC=gcc
# 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=\
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)
$(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)
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
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
# 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!
CONF_t-1 = $_bin_t-1_cgi_path
-MAKE_CONFIGURE = CONFIGURE = $configure
MAKE_TARGET = TARGET = $target
MAKE_CAT = CAT =$cat