From 8c7e2f0998b2462be63370e675a01fc80368ebd8 Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Tue, 1 Oct 2013 08:55:42 +0800 Subject: [PATCH] Update Makefile --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 04a4660..c9f07dc 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ .PHONY: all install clean uninstall +DESTDIR= PREFIX=/usr/local CP=cp @@ -12,14 +13,14 @@ RM=rm -f -v all: install: - $(INSTALL) -Dm0755 danmaku2ass.py "$(PREFIX)/bin/danmaku2ass" - $(MKDIR) "$(PREFIX)/share" - $(CP) -R locale "$(PREFIX)/share/" + $(INSTALL) -Dm0755 danmaku2ass.py "$(DESTDIR)$(PREFIX)/bin/danmaku2ass" + $(MKDIR) "$(DESTDIR)$(PREFIX)/share" + $(CP) -R locale "$(DESTDIR)$(PREFIX)/share/" clean: - $(RM) danmaku2ass.pyo + $(RM) -R __pycache__ uninstall: - $(RM) "$(PREFIX)/bin/danmaku2ass" - $(RM) "$(PREFIX)/share/locale/"*"/LC_MESSAGES/danmaku2ass."* + $(RM) "$(DESTDIR)$(PREFIX)/bin/danmaku2ass" + $(RM) "$(DESTDIR)$(PREFIX)/share/locale/"*"/LC_MESSAGES/danmaku2ass."*