diff --git a/Makefile b/Makefile index f713aa8..94077a6 100644 --- a/Makefile +++ b/Makefile @@ -3,29 +3,28 @@ RUST_KOMPILED ::= .build/rust-kompiled RUST_TIMESTAMP ::= $(RUST_KOMPILED)/timestamp SYNTAX_INPUT_DIR ::= tests/syntax SYNTAX_OUTPUT_DIR ::= .build/syntax-output -EXECUTION_INPUT_DIR ::= tests/execution -EXECUTION_OUTPUT_DIR ::= .build/execution-output +PREPROCESSING_INPUT_DIR ::= tests/preprocessing +PREPROCESSING_OUTPUT_DIR ::= .build/preprocessing-output SYNTAX_INPUTS ::= $(wildcard $(SYNTAX_INPUT_DIR)/*.rs) SYNTAX_OUTPUTS ::= $(patsubst $(SYNTAX_INPUT_DIR)/%.rs,$(SYNTAX_OUTPUT_DIR)/%.rs-parsed,$(SYNTAX_INPUTS)) -EXECUTION_INPUTS ::= $(wildcard $(EXECUTION_INPUT_DIR)/*.rs) -EXECUTION_OUTPUTS ::= $(patsubst $(EXECUTION_INPUT_DIR)/%.rs,$(EXECUTION_OUTPUT_DIR)/%.rs.executed.kore,$(EXECUTION_INPUTS)) -INDEXING_OUTPUTS ::= $(patsubst %.rs.executed.kore,%.rs.indexed.kore,$(EXECUTION_OUTPUTS)) -EXECUTION_STATUSES ::= $(patsubst %.rs.executed.kore,%.rs.status,$(EXECUTION_OUTPUTS)) +PREPROCESSING_INPUTS ::= $(wildcard $(PREPROCESSING_INPUT_DIR)/*.rs) +PREPROCESSING_OUTPUTS ::= $(patsubst $(PREPROCESSING_INPUT_DIR)/%.rs,$(PREPROCESSING_OUTPUT_DIR)/%.rs.preprocessed.kore,$(PREPROCESSING_INPUTS)) +PREPROCESSING_STATUSES ::= $(patsubst %.rs.preprocessed.kore,%.rs.status,$(PREPROCESSING_OUTPUTS)) -.PHONY: clean build test syntax-test indexing-test +.PHONY: clean build test syntax-test preprocessing-test clean: rm -r .build build: $(RUST_TIMESTAMP) -test: syntax-test indexing-test +test: syntax-test preprocessing-test syntax-test: $(SYNTAX_OUTPUTS) -indexing-test: $(INDEXING_OUTPUTS) +preprocessing-test: $(PREPROCESSING_OUTPUTS) $(RUST_TIMESTAMP): $(SEMANTICS_FILES) $$(which kompile) rust-semantics/rust.md -o $(RUST_KOMPILED) @@ -34,8 +33,8 @@ $(SYNTAX_OUTPUT_DIR)/%.rs-parsed: $(SYNTAX_INPUT_DIR)/%.rs $(RUST_TIMESTAMP) mkdir -p $(SYNTAX_OUTPUT_DIR) kast --definition $(RUST_KOMPILED) $< --sort Crate > $@.tmp && mv -f $@.tmp $@ -$(EXECUTION_OUTPUT_DIR)/%.rs.indexed.kore: $(EXECUTION_INPUT_DIR)/%.rs $(RUST_TIMESTAMP) - mkdir -p $(EXECUTION_OUTPUT_DIR) +$(PREPROCESSING_OUTPUT_DIR)/%.rs.preprocessed.kore: $(PREPROCESSING_INPUT_DIR)/%.rs $(RUST_TIMESTAMP) + mkdir -p $(PREPROCESSING_OUTPUT_DIR) krun \ $< \ --definition $(RUST_KOMPILED) \ diff --git a/tests/execution/casts-int.rs b/tests/preprocessing/casts-int.rs similarity index 100% rename from tests/execution/casts-int.rs rename to tests/preprocessing/casts-int.rs diff --git a/tests/execution/constants.rs b/tests/preprocessing/constants.rs similarity index 100% rename from tests/execution/constants.rs rename to tests/preprocessing/constants.rs diff --git a/tests/execution/empty.rs b/tests/preprocessing/empty.rs similarity index 100% rename from tests/execution/empty.rs rename to tests/preprocessing/empty.rs diff --git a/tests/execution/function-arguments.rs b/tests/preprocessing/function-arguments.rs similarity index 100% rename from tests/execution/function-arguments.rs rename to tests/preprocessing/function-arguments.rs diff --git a/tests/execution/function-return-type.rs b/tests/preprocessing/function-return-type.rs similarity index 100% rename from tests/execution/function-return-type.rs rename to tests/preprocessing/function-return-type.rs