]> git.cameronkatri.com Git - cgit.git/commitdiff
Makefile: add support for DESTDIR
authorChris Pickel <sfiera@macports.org>
Sat, 8 Sep 2007 09:34:11 +0000 (11:34 +0200)
committerLars Hjemli <hjemli@gmail.com>
Sat, 8 Sep 2007 09:34:27 +0000 (11:34 +0200)
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Makefile

index 2fbdf6734973818f3b6670d50c6058f652a92a03..d95a5a3129ac2b967befdd45f77a7648c0eb3857 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -49,15 +49,15 @@ git:
        cd git && $(MAKE) libgit.a
 
 install: all
-       mkdir -p $(CGIT_SCRIPT_PATH)
-       install cgit $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
-       install cgit.css $(CGIT_SCRIPT_PATH)/cgit.css
-       rm -rf $(CACHE_ROOT)/*
+       mkdir -p $(DESTDIR)$(CGIT_SCRIPT_PATH)
+       install cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
+       install cgit.css $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.css
+       rm -rf $(DESTDIR)$(CACHE_ROOT)/*
 
 uninstall:
-       rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
-       rm -f $(CGIT_SCRIPT_PATH)/cgit.css
-       rm -rf $(CACHE_ROOT)
+       rm -f $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
+       rm -f $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.css
+       rm -rf $(DESTDIR)$(CACHE_ROOT)
 
 clean:
        rm -f cgit VERSION *.o