@echo "LDFLAGS = $(LDFLAGS)"
@echo "CC = $(CC)"
+vimb: $(SUBDIRS:%=%.subdir-all)
+
+%.subdir-all:
+ $(MAKE) $(MFLAGS) -C $*
+
+%.subdir-clean:
+ $(MAKE) $(MFLAGS) -C $* clean
+
install: vimb
@# binary
install -d $(BINPREFIX)
@# extension
install -d $(EXTPREFIX)
install -m 644 $(SRCDIR)/webextension/$(EXTTARGET) $(EXTPREFIX)/$(EXTTARGET)
+ install -d $(DESTDIR)$(MANDIR)/man1
+ @sed -e "s!VERSION!$(VERSION)!g" \
+ -e "s!PREFIX!$(PREFIX)!g" \
+ -e "s!DATE!`date +'%m %Y'`!g" $(DOCDIR)/vimb.1 > $(DESTDIR)$(MANDIR)/man1/vimb.1
uninstall:
- $(RM) $(BINPREFIX)/vimb $(EXTPREFIX)/$(EXTTARGET)
-
-vimb: $(SUBDIRS:%=%.subdir-all)
-
-%.subdir-all:
- $(MAKE) $(MFLAGS) -C $*
-
-%.subdir-clean:
- $(MAKE) $(MFLAGS) -C $* clean
+ $(RM) $(BINPREFIX)/vimb $(DESTDIR)$(MANDIR)/man1/vimb.1 $(EXTPREFIX)/$(EXTTARGET)
clean: $(SUBDIRS:%=%.subdir-clean)
-runsandbox: sandbox
- sandbox/usr/bin/vimb
-
sandbox:
make RUNPREFIX=$(CURDIR)/sandbox/usr PREFIX=/usr DESTDIR=./sandbox install
-.PHONY: all options clean install uninstall sandbox
+runsandbox: sandbox
+ sandbox/usr/bin/vimb
+
+.PHONY: all options clean install uninstall sandbox sandbox-clean