Skip to content

Commit

Permalink
Makefile changes to support multiple installable directories
Browse files Browse the repository at this point in the history
  • Loading branch information
permcody committed Feb 21, 2022
1 parent 2859121 commit 8bb357a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions framework/app.mk
Expand Up @@ -25,7 +25,6 @@ $INSTALLABLE_DIRS$(STACK) := $(INSTALLABLE_DIRS)

# install target related stuff
share_install_dir := $(share_dir)/$(APPLICATION_NAME)
tests_install_dir := $(share_install_dir)/test
docs_install_dir := $(share_install_dir)/doc

#
Expand Down Expand Up @@ -411,10 +410,10 @@ $(app_EXEC): $(app_LIBS) $(mesh_library) $(main_object) $(app_test_LIB) $(depend
@$(codesign)

###### install stuff #############

INSTALLABLE_DIRS ?= test/tests
docs_dir := $(APPLICATION_DIR)/doc
bindst = $(bin_install_dir)/$(notdir $(app_EXEC))
binlink = $(tests_install_dir)/$(notdir $(app_EXEC))
binlink = $(share_install_dir)/$(notdir $(app_EXEC))

lib_install_targets = $(foreach lib,$(applibs),$(dir $(lib))install_lib_$(notdir $(lib)))
ifneq ($(app_test_LIB),)
Expand All @@ -429,6 +428,7 @@ install_$(APPLICATION_NAME)_tests: all
do \
base_dir=$$(basename $$dir); \
rm -rf $(share_install_dir)/$$base_dir; \
mkdir -p $(share_install_dir)/$$base_dir; \
cp -R $(APPLICATION_DIR)/$$dir $(share_install_dir)/$$base_dir; \
if [ -e $(APPLICATION_DIR)/testroot ]; \
then \
Expand All @@ -455,7 +455,7 @@ install_lib_%: % all
@for lib in $(libpaths); do $(call patch_relink,$(libdst),$$lib,$$(basename $$lib)); done

$(binlink): all install_$(APPLICATION_NAME)_tests
@ln -s ../../../bin/$(notdir $(app_EXEC)) $@
ln -sf ../../bin/$(notdir $(app_EXEC)) $@

install_$(APPLICATION_NAME)_docs:
ifeq ($(MOOSE_SKIP_DOCS),)
Expand Down
2 changes: 1 addition & 1 deletion test/Makefile
Expand Up @@ -22,7 +22,7 @@ APPLICATION_NAME := moose_test
BUILD_EXEC := yes
BUILD_TEST_OBJECTS_LIB := no
GEN_REVISION := no
INSTALLABLE_DIRS := tests examples
INSTALLABLE_DIRS := tests
include $(FRAMEWORK_DIR)/app.mk

###############################################################################
Expand Down

0 comments on commit 8bb357a

Please sign in to comment.