mirror of
https://github.com/nasa/trick.git
synced 2025-02-20 17:22:52 +00:00
Merge pull request #516 from nasa/MakeInstallWarning
Updated 'make install' to handle Trick compilation.
This commit is contained in:
commit
0b9fbe1762
13
Makefile
13
Makefile
@ -343,7 +343,20 @@ ${ER7_HEADERS} : ${PREFIX}/include/% : trick_source/%
|
||||
install -m 0644 $? $@
|
||||
|
||||
install: ${ER7_HEADERS}
|
||||
@if [ ! -d ${TRICK_LIB_DIR} ]; then \
|
||||
make; \
|
||||
fi
|
||||
|
||||
@if [ ${PREFIX} = "/usr/local" ]; then \
|
||||
if [[ $EUID -ne 0 ]]; then \
|
||||
echo -e "\n\e[31mInstalling Trick to /usr/local, the default installation location, requires super user privileges."; \
|
||||
echo -e "Please log in as a super user to continue.\e[0m\n"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
cp -r bin include $(notdir ${TRICK_LIB_DIR}) libexec share ${PREFIX}
|
||||
@echo -e "\n\e[32mTrick has been installed successfully to ${PREFIX}.\e[0m\n"
|
||||
|
||||
uninstall:
|
||||
rm -f ${PREFIX}/bin/trick-CP
|
||||
|
Loading…
x
Reference in New Issue
Block a user