Skip to content

Commit

Permalink
makefile: add clarification, add uninstall option
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchweaver committed Nov 11, 2022
1 parent ef4f01c commit 523db49
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ all:
echo 'main "$$@"' >>bonsai

install:
@if [ ! -f bonsai ] ; then >&2 echo "Use 'make' first to build the program." ; exit 1 ; fi
mkdir -p ${BONSAI_ROOT}/src
cp -rf ports ${BONSAI_ROOT}/src/
install -D -m 0755 bonsai ${PREFIX}/bin/bonsai
install -D -m 0755 bonsai ${BONSAI_ROOT}/bin/bonsai
ln -sf bonsai ${PREFIX}/bin/bs
ln -sf bonsai ${BONSAI_ROOT}/bin/bs

clean:
rm bonsai

uninstall:
rm ${PREFIX}/bin/bonsai
unlink ${PREFIX}/bin/bs

# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
# SC1090: file sourcing - shellcheck is unaware of sourced pkgfiles
# SC2154: undeclared vars - shellcheck is unaware vars inside pkgfiles
Expand Down

0 comments on commit 523db49

Please sign in to comment.