Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 806be77

Browse files
author
Nicolas Cornu
authored
Use DESTDIR instead of DEST_DIR just like with cmake (#439)
1 parent 52a586b commit 806be77

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

extra/nrnivmodl-core.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ params_MODS_PATH="."
2626
params_BUILD_TYPE="@COMPILE_LIBRARY_TYPE@"
2727

2828
# prefix for common options : make sure to rename these if options are changed.
29-
MAKE_OPTIONS="MECHLIB_SUFFIX MOD2CPP_BINARY MOD2CPP_RUNTIME_FLAGS DEST_DIR INCFLAGS LINKFLAGS MODS_PATH VERBOSE BUILD_TYPE"
29+
MAKE_OPTIONS="MECHLIB_SUFFIX MOD2CPP_BINARY MOD2CPP_RUNTIME_FLAGS DESTDIR INCFLAGS LINKFLAGS MODS_PATH VERBOSE BUILD_TYPE"
3030

3131
# parse CLI args
3232
while getopts "n:m:a:d:i:l:Vp:b:h" OPT; do
@@ -42,7 +42,7 @@ while getopts "n:m:a:d:i:l:Vp:b:h" OPT; do
4242
params_MOD2CPP_RUNTIME_FLAGS="$OPTARG";;
4343
d)
4444
# destination install directory
45-
params_DEST_DIR="$OPTARG";;
45+
params_DESTDIR="$OPTARG";;
4646
i)
4747
# extra include flags
4848
params_INCFLAGS="$OPTARG";;
@@ -134,7 +134,7 @@ for param in $MAKE_OPTIONS; do
134134
done
135135

136136
# if -d (deploy) provided, call "make install"
137-
if [ "$params_DEST_DIR" ]; then
137+
if [ "$params_DESTDIR" ]; then
138138
make_params+=("install")
139139
fi
140140

extra/nrnivmodl_core_makefile.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ COMMA_OP =,
1212
MECHLIB_SUFFIX =
1313
MODS_PATH = .
1414
OUTPUT_DIR = @CMAKE_HOST_SYSTEM_PROCESSOR@
15-
DEST_DIR =
15+
DESTDIR =
1616
TARGET_LIB_TYPE = $(BUILD_TYPE)
1717

1818
# CoreNEURON installation directories
@@ -132,7 +132,7 @@ mod_ispc_objs = $(addprefix $(MOD_OBJS_DIR)/,$(addsuffix .obj,$(basename $(mod_i
132132
# We use $ORIGIN (@loader_path in OSX)
133133
ORIGIN_RPATH := $(if $(filter Darwin,$(OS_NAME)),@loader_path,$$ORIGIN)
134134
SONAME_OPTION := -Wl,$(if $(filter Darwin,$(OS_NAME)),-install_name${COMMA_OP}@rpath/,-soname${COMMA_OP})$(notdir ${COREMECH_LIB_PATH})
135-
LIB_RPATH = $(if $(DEST_DIR),$(DEST_DIR)/lib,$(ORIGIN_RPATH))
135+
LIB_RPATH = $(if $(DESTDIR),$(DESTDIR)/lib,$(ORIGIN_RPATH))
136136

137137
# All objects used during build
138138
ALL_OBJS = $(MOD_FUNC_OBJ) $(DIMPLIC_OBJ) $(mod_cpp_objs) $(mod_ispc_objs)
@@ -233,9 +233,9 @@ $(MOD_OBJS_DIR):
233233

234234
# install binary and libraries
235235
install: $(SPECIAL_EXE) coremech_lib_target
236-
install -d $(DEST_DIR)/bin $(DEST_DIR)/lib
237-
install ${COREMECH_LIB_PATH} $(DEST_DIR)/lib
238-
install $(SPECIAL_EXE) $(DEST_DIR)/bin
236+
install -d $(DESTDIR)/bin $(DESTDIR)/lib
237+
install ${COREMECH_LIB_PATH} $(DESTDIR)/lib
238+
install $(SPECIAL_EXE) $(DESTDIR)/bin
239239

240240
.PHONY: build_always
241241

0 commit comments

Comments
 (0)