From 180caeba0a954020879c2e3f1c2cb9bf848a6d6f Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sat, 29 Mar 2014 23:23:33 +0100 Subject: [PATCH] Added doc install target. --- doc/Makefile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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/*.* -- 2.39.5