Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ else
POST = strip mm$(E)
endif

# PREFIX is the base directory under which to install the binary and man
# INSTALL_PREFIX is the base directory under which to install the binary and man
# page; generally either /usr/local or /usr (or perhaps /opt...).
# It can be changed when make is run (e.g. 'make INSTALL_PREFIX=/tmp/pkg install'
# (or when using 'uninstall', respectively))

PREFIX = /usr/local
INSTALL_PREFIX = /usr/local

#--------------------------------------------------------------
# Defaults are for the standard curses setup:
Expand Down Expand Up @@ -74,7 +76,7 @@ ifeq ($(SYS),DOS)
c:\djgpp\bin\cwsdstub.exe+mm mm.exe; del mm
endif

HELPDIR = $(PREFIX)/man/man1
HELPDIR = $(INSTALL_PREFIX)/man/man1
O = o

.SUFFIXES: .cc
Expand Down Expand Up @@ -107,10 +109,19 @@ clean:
$(RM) *.o
$(RM) mm$(E)

install::
install -c -s mm $(PREFIX)/bin
install -c -m 644 mm.1 $(HELPDIR)
$(RM) $(HELPDIR)/mmail.1
install:
install -D -s mm -t $(INSTALL_PREFIX)/bin
install -D -m 644 mm.1 -t $(HELPDIR)
if test -f $(HELPDIR)/mmail.1; then \
$(RM) $(HELPDIR)/mmail.1; \
fi
ln $(HELPDIR)/mm.1 $(HELPDIR)/mmail.1

uninstall:
for file in $(INSTALL_PREFIX)/bin/mm $(HELPDIR)/mm.1 $(HELPDIR)/mmail.1; do \
if test -f $$file; then \
$(RM) $$file; \
fi; \
done

include depend