]> bicyclesonthemoon.info Git - ott/enhance/blobdiff - makefile.1.mak
debug build target; updated config tool; install script
[ott/enhance] / makefile.1.mak
index 65a80a71fefc7923cb67c277a25376ccce5bae24..923901c9ae1f7e78a72d94afb9362aa3c3ecda0f 100644 (file)
@@ -1,7 +1,6 @@
 # "makefile" is automatically generated from "makefile.1.mak"
-# 07.12.2022
 # 
-# Copyright (C) 2022  Balthasar Szczepański
+# Copyright (C) 2022, 2024  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
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
+
+DEFAULT_TARGET = debug
 ifndef TARGET
-TARGET = debug ###MAKE_TARGET:
+TARGET = $(DEFAULT_TARGET) ###MAKE_TARGET:
 # when want to change target run this first:
 # make -B TARGET=target_name makefile
 endif
@@ -45,10 +46,11 @@ PERL = perl
 
 
 CONFIGFILE = settings-$(TARGET).txt settings.txt
+DEFAULT_CONFIGFILE = settings-$(DEFAULT_TARGET).txt settings.txt
 
 # The configuration tool
 # http://bicyclesonthemoon.info/git/botm-config 
-CONFIGURE = $(PERL) ./configure.pl
+CONFIGURE = $(PERL) ./configure.pl --do
 CONFIGURE_CMD = $(CONFIGURE) $(CONFIGFILE)
 
 
@@ -173,10 +175,10 @@ all: $(BIN) $(WWW) enhance.conf
        
 
 makefile: makefile.1.mak $(CONFIGFILE) configure.pl
-       $(CONFIGURE_CMD) < makefile.1.mak > makefile 
+       $(CONFIGURE_CMD) --in makefile.1.mak --out 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
+       $(PERL) config/configure.1.pl --do 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)
@@ -192,7 +194,7 @@ $(H_SUBTOOL): %.h: settings-subtool.txt subtool.h configure.pl
        $(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@
 
 $(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)  configure.pl
-       $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
+       $(CONFIGURE_CMD) --v --in $(GENERATE_FROM) --out $(TO_GENERATE)
        
 $(CGI): %: %.c online-core.c online-core.h $(H_PNG)
        $(CC) $(CF) -o $@ $*.c online-core.c $(L_CGI)
@@ -204,10 +206,10 @@ f2h: f2h.c
        $(CC) $(CF) -o f2h f2h.c
 
 $(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
+       $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) --out $*.htm
 
 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
+       $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) --out index.htm
 
 
 setuid: $(SETUID)
@@ -230,9 +232,11 @@ cp_www: $(WWW) | mktree
        $(CP) -r $(WWW) $(WWW_PATH)
 
 install: all cp_bin cp_www cp_conf
+       
 
 clean:
        $(RM) -f enhance configure.pl $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
+       $(PERL) config/configure.1.pl --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile
 
 PHONY: all clean install setuid mktree cp_bin cp_www