aboutsummaryrefslogtreecommitdiffstats
path: root/songmanagement/doc/Makefile
blob: bfb4596ca0bd10cef3dab48a30daa834bcbc6428 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
MKDIR  ?= mkdir -p
RM     ?= rm -f
RM_REC ?= $(RM) -r

PASDOC ?= pasdoc$(EXEEXT)

DOCDIR   ?= ./pasdoc
SRCDIR   := ../src
INCLUDE  := -I$(SRCDIR)
DEFINES  := -DPASDOC
SRCFILES := $(SRCDIR)/base/*.pas \
            $(SRCDIR)/screens/*.pas \
            $(SRCDIR)/menu/*.pas \
			$(SRCDIR)/media/*.pas 

.PHONY: all
all: doc

.PHONY: doc
doc: clean
	$(MKDIR) $(DOCDIR)
# pasdoc does not return a meaningful exit code (e.g. an error code on success) so always return true
	$(PASDOC) --staronly --ignore-leading=* $(INCLUDE) $(DEFINES) --output=$(DOCDIR) $(SRCFILES); true
# check if doc was created
	@test -f $(DOCDIR)/index.html

.PHONY: clean
clean:
	$(RM) $(DOCDIR)/*.html $(DOCDIR)/*.css $(DOCDIR)/*.gif
	-rmdir $(DOCDIR)