From: Oliver Schmidt
Date: Sat, 29 Mar 2014 22:23:33 +0000 (+0100)
Subject: Added doc install target.
X-Git-Tag: V2.15~83
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=180caeba0a954020879c2e3f1c2cb9bf848a6d6f;p=cc65
Added doc install target.
---
diff --git a/doc/Makefile b/doc/Makefile
index 159c30021..02ed6b1d3 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,11 +6,14 @@ endif
.SUFFIXES:
-all mostlyclean install:
+htmldir = $(prefix)/share/doc/cc65$(DESTPACKAGE_SUFFIX)/html
+infodir = $(prefix)/share/info
+
+all mostlyclean:
ifdef CMD_EXE
-clean zip doc:
+clean install zip doc:
else # CMD_EXE
@@ -21,9 +24,22 @@ TOC_LEVEL = 0
TOC_LEVEL = 2
+INSTALL = install
+
clean:
$(RM) -r ../html ../info
+install:
+ $(if $(prefix),,$(error variable `prefix' must be set))
+ifeq ($(wildcard ../html),../html)
+ $(INSTALL) -d $(DESTDIR)$(htmldir)
+ $(INSTALL) -m644 ../html/*.* $(DESTDIR)$(htmldir)
+endif
+ifeq ($(wildcard ../info),../info)
+ $(INSTALL) -d $(DESTDIR)$(infodir)
+ $(INSTALL) -m644 ../info/*.* $(DESTDIR)$(infodir)
+endif
+
zip:
@cd .. && zip cc65 html/*.*