2014-03-06 21:32:24 +00:00
|
|
|
ifneq ($(shell echo),)
|
|
|
|
CMD_EXE = 1
|
|
|
|
endif
|
|
|
|
|
2015-05-05 11:46:26 +00:00
|
|
|
.PHONY: all mostlyclean clean install zip doc html info
|
2014-02-04 23:20:43 +00:00
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
|
2014-03-29 22:23:33 +00:00
|
|
|
htmldir = $(prefix)/share/doc/cc65$(DESTPACKAGE_SUFFIX)/html
|
|
|
|
infodir = $(prefix)/share/info
|
|
|
|
|
2014-03-06 21:32:24 +00:00
|
|
|
ifdef CMD_EXE
|
|
|
|
|
2016-06-19 16:55:00 +00:00
|
|
|
doc clean install zip:
|
2014-03-06 21:32:24 +00:00
|
|
|
|
|
|
|
else # CMD_EXE
|
2014-02-04 23:20:43 +00:00
|
|
|
|
2014-02-05 19:55:17 +00:00
|
|
|
SGMLS := $(wildcard *.sgml)
|
|
|
|
|
2014-02-05 21:30:28 +00:00
|
|
|
../html/coding.html ../html/index.html: \
|
|
|
|
TOC_LEVEL = 0
|
|
|
|
|
|
|
|
TOC_LEVEL = 2
|
|
|
|
|
2014-03-29 22:23:33 +00:00
|
|
|
INSTALL = install
|
|
|
|
|
2016-06-19 16:55:00 +00:00
|
|
|
doc: html info
|
|
|
|
|
|
|
|
html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png)
|
|
|
|
|
|
|
|
info: $(addprefix ../info/,$(SGMLS:.sgml=.info))
|
|
|
|
|
|
|
|
../html ../info:
|
|
|
|
@mkdir $@
|
|
|
|
|
|
|
|
../html/%.html: %.sgml header.html | ../html
|
|
|
|
@cd ../html && linuxdoc -B html -s 0 -T $(TOC_LEVEL) -H ../doc/header.html ../doc/$<
|
|
|
|
|
|
|
|
../html/doc.%: doc.% | ../html
|
|
|
|
cp $< ../html
|
|
|
|
|
|
|
|
../info/%.info: %.sgml | ../info
|
|
|
|
@cd ../info && linuxdoc -B info ../doc/$<
|
|
|
|
|
2014-03-06 21:32:24 +00:00
|
|
|
clean:
|
|
|
|
$(RM) -r ../html ../info
|
2014-02-05 19:55:17 +00:00
|
|
|
|
2014-03-29 22:23:33 +00:00
|
|
|
install:
|
|
|
|
$(if $(prefix),,$(error variable `prefix' must be set))
|
|
|
|
ifeq ($(wildcard ../html),../html)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(htmldir)
|
2016-05-29 14:19:03 +00:00
|
|
|
$(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir)
|
2014-03-29 22:23:33 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(wildcard ../info),../info)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(infodir)
|
2016-05-29 14:19:03 +00:00
|
|
|
$(INSTALL) -m0644 ../info/*.* $(DESTDIR)$(infodir)
|
2014-03-29 22:23:33 +00:00
|
|
|
endif
|
|
|
|
|
2014-03-08 23:19:57 +00:00
|
|
|
zip:
|
2016-05-13 12:28:58 +00:00
|
|
|
ifneq "$(wildcard ../html)" ""
|
2014-03-09 00:20:39 +00:00
|
|
|
@cd .. && zip cc65 html/*.*
|
2016-05-13 12:28:58 +00:00
|
|
|
endif
|
2014-03-08 23:19:57 +00:00
|
|
|
|
2014-03-06 21:32:24 +00:00
|
|
|
endif # CMD_EXE
|
2016-06-19 16:55:00 +00:00
|
|
|
|
|
|
|
all mostlyclean:
|