introduces R_MAKE
authorThomas Walker Lynch <xtujpz@reasoningtechnology.com>
Wed, 4 Sep 2024 15:41:18 +0000 (15:41 +0000)
committerThomas Walker Lynch <xtujpz@reasoningtechnology.com>
Wed, 4 Sep 2024 15:41:18 +0000 (15:41 +0000)
developer/executor/env_build
developer/executor/makefile-project.mk

index a631a60..4ec3162 100755 (executable)
@@ -27,7 +27,9 @@
 #
 # Relative paths values are relative to the $REPO_HOME/developer directory, unless
 # for good reason which is obvious or stated in a comment adjacent to the variable.
-
+#
+# This has not yet been split into 'tools'  and 'project'. The redundant build targets
+# should discovered to have already been built.
 
 # Ensure the script is sourced rather than run directly
 if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
@@ -36,8 +38,11 @@ if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
 fi
 
 #--------------------------------------------------------------------------------
-# programs to be built
+# project programs to be built
 # each new executable will also need a custom target in makefile-project.mk
+#
+# Tool programs to be built are not placed in this list.  the makefile-tool.mk
+# file handles them explicitly.
 
 export EXECUTOR_IN_FL="\
   PrintRuleNameList\
index badb939..2c03a04 100644 (file)
@@ -12,78 +12,88 @@ MAKEFLAGS += -r
 
 $(info makefile: $(MAKEFILE_LIST))
 $(info project_MAKECMDGOALS: $(MAKECMDGOALS))
+$(info project_MAKE: $(MAKE))
+R_MAKE = $(MAKE) -$(MAKEFLAGS) -f $(MAKEFILE_LIST)
+
 
 #================================================================================
 # Custom make targets
 #
+#  `make` in this section will be the `executor/make` script, due to `executor`
+#  being first in the path .. debugging .. this should be a variable from
+#  the env_build ...
 
 project: $(EXECUTOR_IN_FPL)
 PrintRuleNameList: $(EXECUTOR_IN_DIR)/PrintRuleNameList
 
-
 #-----------------------------------------------
 # Arithmetic
 
-ANTLR_OUT_Arithmetic_FPL $(shell ANTLR_OUT_FL Arithmetic -path $(ANTLR_OUT_DIR))
+ANTLR_OUT_Arithmetic_FPL:= $(shell ANTLR_OUT_FL Arithmetic -path $(ANTLR_OUT_DIR))
 Arithmetic_Echo:\
-  $(ANTLR_OUT_Arithmetic_FPL)
+  $(ANTLR_OUT_Arithmetic_FPL)\
   $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Echo_PrintVisitor.java
        @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
          echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
          exit 1; \
        fi
-       make $(EXECUTOR_IN_DIR)/Arithmetic_Echo
+       $(R_MAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Echo
 
 Arithmetic_Echo__Test:\
-  $(ANTLR_OUT_Arithmetic_FPL)
+  $(ANTLR_OUT_Arithmetic_FPL)\
   $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Echo_PrintVisitor.java
        @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
          echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
          exit 1; \
        fi
-       $(BIN_MAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Echo__Test
+       $(R_MAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Echo__Test
 
 Arithmetic_Syntax:\
-  $(ANTLR_OUT_Arithmetic_FPL)
+  $(ANTLR_OUT_Arithmetic_FPL)\
   $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Syntax_PrintVisitor.java
        @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
          echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
          exit 1; \
        fi
-       $(BIN_MAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Syntax
+       $(R_MAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Syntax
 
 Arithmetic_Syntax__Test:\
-  $(ANTLR_OUT_Arithmetic_FPL)
+  $(ANTLR_OUT_Arithmetic_FPL)\
   $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Syntax_PrintVisitor.java
        @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
          echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
          exit 1; \
        fi
-       $(BIN_MAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Syntax__Test
+       $(R_MAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Syntax__Test
 
 #-----------------------------------------------
 #  GQL_20240412
 
 ANTLR_OUT_GQL_20240412_FPL := $(shell ANTLR_OUT_FL GQL_20240412 -path $(ANTLR_OUT_DIR))
-GQL_20240412_Syntax: $(ANTLR_OUT_GQL_20240412_FPL) $(JAVA_COMP_IN_PRIMARY_DIR)/GQL_20240412_Syntax_PrintVisitor.java
+GQL_20240412_Syntax:\
+  $(ANTLR_OUT_GQL_20240412_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/GQL_20240412_Syntax_PrintVisitor.java
        @if [ -z "$(ANTLR_OUT_GQL_20240412_FPL)" ]; then \
          echo "variable ANTLR_OUT_GQL_20240412_FPL empty."; \
          exit 1; \
        fi
-       $(BIN_MAKE) $(EXECUTOR_IN_DIR)/GQL_20240412_Syntax
+       $(R_MAKE) $(EXECUTOR_IN_DIR)/GQL_20240412_Syntax
 
-GQL_20240412_Syntax__Test: $(ANTLR_OUT_GQL_20240412_FPL) $(JAVA_COMP_IN_PRIMARY_DIR)/GQL_20240412_Syntax_PrintVisitor.java
+GQL_20240412_Syntax__Test: \
+  $(ANTLR_OUT_GQL_20240412_FPL) \
+  $(JAVA_COMP_IN_PRIMARY_DIR)/GQL_20240412_Syntax_PrintVisitor.java
        @if [ -z "$(ANTLR_OUT_GQL_20240412_FPL)" ]; then \
          echo "variable ANTLR_OUT_GQL_20240412_FPL empty."; \
          exit 1; \
        fi
-       $(BIN_MAKE) $(EXECUTOR_IN_DIR)/GQL_20240412_Syntax__Test
+       $(R_MAKE) $(EXECUTOR_IN_DIR)/GQL_20240412_Syntax__Test
+
 
 TerminalToCategory: 
-       $(BIN_MAKE) $(EXECUTOR_IN_DIR)/TerminalToCategory
+       $(R_MAKE) $(EXECUTOR_IN_DIR)/TerminalToCategory
 
 GrammarSplitter: 
-       $(BIN_MAKE) $(EXECUTOR_IN_DIR)/GrammarSplitter
+       $(R_MAKE) $(EXECUTOR_IN_DIR)/GrammarSplitter
 
 #-----------------------------------------------
 # Compile all the .java files.