]> git.sur5r.net Git - cc65/commitdiff
Added doc install target.
authorOliver Schmidt <ol.sc@web.de>
Sat, 29 Mar 2014 22:23:33 +0000 (23:23 +0100)
committerOliver Schmidt <ol.sc@web.de>
Sat, 29 Mar 2014 22:25:47 +0000 (23:25 +0100)
doc/Makefile

index 159c300210a95c6591d88f8b7928ea51b10ebc19..02ed6b1d3c6119770e55d1d9d7aa2d2237658d0c 100644 (file)
@@ -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/*.*