Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Commit

Permalink
Always use Linux version of test_coding_rules
Browse files Browse the repository at this point in the history
Because only Linux version of this tool is fully functional (while the
MSW one just exits with an error), always use it, even in the build
targeting MSW.

This is enough to make concinnity checks to work in any build.
  • Loading branch information
vadz committed Sep 11, 2021
1 parent cb43f1b commit 5e49ea1
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,23 @@ uninstall:

# Custom tools built from source.

TEST_CODING_RULES := $(build_dir)/test_coding_rules$(EXEEXT)
# Always build host (i.e. Linux) version of this tool, as it depends on PCRE
# library only available on POSIX systems and it is preferable to run it on
# the host, rather than the target, system in any case.
#
# Note that this implies that the tool binary doesn't need to use EXEEXT and
# that PERFORM should _not_ be used when running it.
host_triplet := x86_64-pc-linux-gnu
host_exec_prefix := $(prefix)/$(LMI_COMPILER)_$(host_triplet)
host_build_dir := $(host_exec_prefix)/build/$(build_type)
host_localbindir := $(prefix)/local/$(LMI_COMPILER)_$(host_triplet)/bin

TEST_CODING_RULES := $(host_build_dir)/test_coding_rules

.PHONY: custom_tools
custom_tools:
@$(MAKE) test_coding_rules$(EXEEXT)
@$(INSTALL) -c -m 0775 $(TEST_CODING_RULES) $(localbindir)
@$(MAKE) LMI_TRIPLET=$(host_triplet) test_coding_rules
@$(INSTALL) -c -m 0775 $(TEST_CODING_RULES) $(host_localbindir)

################################################################################

Expand Down Expand Up @@ -501,7 +512,7 @@ check_concinnity: source_clean custom_tools
|| $(ECHO) "... in file $$z"; \
done;
@$(ECHO) " Miscellaneous problems:"
@cd $(prefascicle_dir) && $(PERFORM) $(TEST_CODING_RULES) *
@cd $(prefascicle_dir) && $(TEST_CODING_RULES) *

################################################################################

Expand Down

0 comments on commit 5e49ea1

Please sign in to comment.