1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00
cc65/doc/Makefile

65 lines
1.2 KiB
Makefile
Raw Normal View History

2014-03-06 22:32:24 +01:00
ifneq ($(shell echo),)
CMD_EXE = 1
endif
2014-03-09 00:19:57 +01:00
.PHONY: all mostlyclean clean install zip doc html info gh-pages
2014-02-05 00:20:43 +01:00
.SUFFIXES:
2014-03-29 23:23:33 +01:00
htmldir = $(prefix)/share/doc/cc65$(DESTPACKAGE_SUFFIX)/html
infodir = $(prefix)/share/info
all mostlyclean:
2014-03-06 22:32:24 +01:00
ifdef CMD_EXE
2014-03-29 23:23:33 +01:00
clean install zip doc:
2014-03-06 22:32:24 +01:00
else # CMD_EXE
2014-02-05 00:20:43 +01:00
2014-02-05 20:55:17 +01:00
SGMLS := $(wildcard *.sgml)
../html/coding.html ../html/index.html: \
TOC_LEVEL = 0
TOC_LEVEL = 2
2014-03-29 23:23:33 +01:00
INSTALL = install
2014-03-06 22:32:24 +01:00
clean:
$(RM) -r ../html ../info
2014-02-05 20:55:17 +01:00
2014-03-29 23:23:33 +01:00
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
2014-03-09 00:19:57 +01:00
zip:
2014-03-09 01:20:39 +01:00
@cd .. && zip cc65 html/*.*
2014-03-09 00:19:57 +01:00
2014-02-27 23:37:36 +01:00
doc: html info
2014-02-05 20:55:17 +01:00
html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png)
2014-02-27 23:37:36 +01:00
info: $(addprefix ../info/,$(SGMLS:.sgml=.info))
../html ../info:
@mkdir $@
2014-02-05 00:20:43 +01:00
2014-02-09 22:57:38 +01:00
../html/%.html: %.sgml header.html | ../html
2014-02-09 22:50:01 +01:00
@cd ../html && linuxdoc -B html -s 0 -T $(TOC_LEVEL) -H ../doc/header.html ../doc/$<
../html/doc.%: doc.% | ../html
cp $< ../html
2014-02-04 21:31:35 +01:00
2014-02-27 23:37:36 +01:00
../info/%.info: %.sgml | ../info
@cd ../info && linuxdoc -B info ../doc/$<
2014-03-06 22:32:24 +01:00
endif # CMD_EXE