include config.mk all: $(TARGET) $(TARGET): @$(MAKE) -C $(SRCDIR) clean: @$(MAKE) clean -C $(SRCDIR) install: all install-man install-data install -Dm 755 $(SRCDIR)/$(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET) install-man: install -Dm 644 $(DOCDIR)/$(MANFILE) $(DESTDIR)$(MAN1DIR)/$(MANFILE) install-data: install -Dm 644 $(SHAREDIR)/hints.js $(DESTDIR)$(DATADIR)/$(REAL_NAME)/scripts/hints.js install -Dm 644 $(SHAREDIR)/selection.js $(DESTDIR)$(DATADIR)/$(REAL_NAME)/scripts/selection.js install -Dm 644 $(SHAREDIR)/plugins.js $(DESTDIR)$(DATADIR)/$(REAL_NAME)/scripts/plugins.js uninstall: uninstall-man uninstall-data @echo "Removing executable from $(subst //,/,$(DESTDIR)$(BINDIR))" @$(RM) $(DESTDIR)$(BINDIR)/$(TARGET) uninstall-man: $(RM) $(DESTDIR)$(MAN1DIR)$(MANFILE) uninstall-data: $(RM) -r $(DESTDIR)$(DATADIR)/$(REAL_NAME) distclean: clean snapshot: @$(MAKE) dist DISTDIR=$(REAL_NAME)-$(BUILDDATE) dist: distclean @echo "Creating tarball." @hg archive -t tgz $(DISTDIR).tar.gz .PHONY: clean all install uninstall dist distclean