This allows to easily install the browser into a own directory with
`make DESTDIR=/install/dir install`.
Also all internal used directory names are defined without the trailing
slashes.
@$(MAKE) $(MFLAGS) -C doc man
install: $(TARGET)
- install -d $(BINDIR)
- install -m 755 $(TARGET) $(BINDIR)
+ install -d $(DESTDIR)$(BINDIR)
+ install -m 755 $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
@$(MAKE) $(MFLAGS) -C doc install
uninstall:
- $(RM) $(BINDIR)$(TARGET)
+ $(RM) $(DESTDIR)$(BINDIR)/$(TARGET)
@$(MAKE) $(MFLAGS) -C doc uninstall
clean:
VERSION = 0.1.8
PROJECT = vimb
-PREFIX ?= /usr/local/
-BINDIR ?= $(PREFIX)bin/
-MANDIR ?= $(PREFIX)share/man/
+PREFIX ?= /usr/local
+BINDIR ?= $(PREFIX)/bin
+MANDIR ?= $(PREFIX)/share/man
#----------------compile options---------------------
include ../config.mk
-MANDIR1 = $(MANDIR)man1/
+MANDIR1 = $(MANDIR)/man1
MAN1 = $(PROJECT).1
all: man
-e "s/PROJECT/$(PROJECT)/g" < $< > $@
install: man
- @echo install manual page
- install -d $(MANDIR1)
- install -m 644 $(MAN1) $(MANDIR1)$(MAN1)
+ install -d $(DESTDIR)$(MANDIR1)
+ install -m 644 $(MAN1) $(DESTDIR)$(MANDIR1)/$(MAN1)
uninstall:
- $(RM) $(MANDIR1)$(MAN1)
+ $(RM) $(DESTDIR)$(MANDIR1)/$(MAN1)
clean:
$(RM) *.1