Skip to content

Commit

Permalink
Merge pull request #110 from PRUNERS/devel
Browse files Browse the repository at this point in the history
Fixes and updates for the v2.0 release -> ready for v2.0-alpha.2
  • Loading branch information
mikebentley15 authored Jan 27, 2018
2 parents bc5e774 + 2a8e65e commit fd7e7a5
Show file tree
Hide file tree
Showing 74 changed files with 3,840 additions and 1,986 deletions.
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@ DEPS := $(SOURCE:.cpp=.d)

# Install variables

SCRIPT_DIR = scripts/flitcli
DATA_DIR = data
CONFIG_DIR = $(SCRIPT_DIR)/config
DOC_DIR = documentation
SCRIPT_DIR := scripts/flitcli
DATA_DIR := data
CONFIG_DIR := $(SCRIPT_DIR)/config
DOC_DIR := documentation
LITMUS_TESTS += $(wildcard litmus-tests/tests/*.cpp)
LITMUS_TESTS += $(wildcard litmus-tests/tests/*.h)

INSTALL_FLIT_CONFIG = $(PREFIX)/share/flit/scripts/flitconfig.py

CAT := $(if $(filter $(OS),Windows_NT),type,cat)
VERSION := $(shell $(CAT) $(CONFIG_DIR)/version.txt)

.PHONY : all
all: $(TARGET)

Expand All @@ -56,6 +59,7 @@ help:
@echo " to install to a different directory. The default"
@echo " PREFIX value is /usr."
@echo ' exe: "make install PREFIX=$$HOME/installs/usr"'
@echo " check Run tests for FLiT framework (requires $(TARGET))"
@echo " clean Clean the intermediate build artifacts from building"
@echo " $(TARGET)"
@echo " distclean Run clean and then also remove $(TARGET)"
Expand All @@ -72,10 +76,14 @@ $(SRCDIR)/%.o: $(SRCDIR)/%.cpp Makefile
.PRECIOUS: src/%.d
-include $(SOURCE:%.cpp=%.d)

check: $(TARGET)
$(MAKE) check --directory tests

.PHONY: clean
clean:
rm -f $(OBJ)
rm -f $(DEPS)
$(MAKE) clean --directory tests

.PHONY: veryclean distclean
veryclean: distclean
Expand Down Expand Up @@ -106,6 +114,7 @@ install: $(TARGET)
install -m 0644 $(DATA_DIR)/main.cpp $(PREFIX)/share/flit/data/
install -m 0644 $(DATA_DIR)/tests/Empty.cpp $(PREFIX)/share/flit/data/tests/
install -m 0644 $(DATA_DIR)/db/tables-psql.sql $(PREFIX)/share/flit/data/db/
install -m 0644 $(CONFIG_DIR)/version.txt $(PREFIX)/share/flit/config/
install -m 0644 $(CONFIG_DIR)/flit-default.toml.in $(PREFIX)/share/flit/config/
install -m 0644 $(LITMUS_TESTS) $(PREFIX)/share/flit/litmus-tests/
@echo "Generating $(INSTALL_FLIT_CONFIG)"
Expand All @@ -119,6 +128,7 @@ install: $(TARGET)
@echo "import os" >> $(INSTALL_FLIT_CONFIG)
@echo >> $(INSTALL_FLIT_CONFIG)
@echo "all = [" >> $(INSTALL_FLIT_CONFIG)
@echo " 'version'," >> $(INSTALL_FLIT_CONFIG)
@echo " 'script_dir'," >> $(INSTALL_FLIT_CONFIG)
@echo " 'doc_dir'," >> $(INSTALL_FLIT_CONFIG)
@echo " 'lib_dir'," >> $(INSTALL_FLIT_CONFIG)
Expand All @@ -143,6 +153,10 @@ install: $(TARGET)
@echo "# default configuration for flit init" >> $(INSTALL_FLIT_CONFIG)
@echo "config_dir = '$(abspath $(PREFIX))/share/flit/config'" >> $(INSTALL_FLIT_CONFIG)
@echo >> $(INSTALL_FLIT_CONFIG)
@echo "# current version" >> $(INSTALL_FLIT_CONFIG)
@echo "with open(os.path.join(config_dir, 'version.txt'), 'r') as version_file:" >> $(INSTALL_FLIT_CONFIG)
@echo " version = version_file.read().strip()" >> $(INSTALL_FLIT_CONFIG)
@echo >> $(INSTALL_FLIT_CONFIG)
@echo "# default data files such as Makefile.in and main.cpp" >> $(INSTALL_FLIT_CONFIG)
@echo "data_dir = '$(abspath $(PREFIX))/share/flit/data'" >> $(INSTALL_FLIT_CONFIG)
@echo >> $(INSTALL_FLIT_CONFIG)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Contents:
* [FLiT Configuration File](documentation/flit-configuration-file.md)
* [Available Compiler Flags](documentation/available-compiler-flags.md)
* [Writing Test Cases](documentation/writing-test-cases.md)
* [Test Executable](documentation/test-executable.md)
* [Database Structure](documentation/database-structure.md)
* [Analyze Results](documentation/analyze-results.md)
* **Extra Tools**
Expand Down
Loading

0 comments on commit fd7e7a5

Please sign in to comment.