diff options
Diffstat (limited to '')
-rw-r--r-- | doc/Makefile | 30 | ||||
-rw-r--r-- | src/switches.inc | 5 |
2 files changed, 35 insertions, 0 deletions
diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 00000000..bfb4596c --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,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)
\ No newline at end of file diff --git a/src/switches.inc b/src/switches.inc index 6504ea55..10f5ff56 100644 --- a/src/switches.inc +++ b/src/switches.inc @@ -1,3 +1,6 @@ +// prevent pasdoc from parsing this file +{$IFNDEF PASDOC} + // compiler/IDE dependent config {$IFDEF FPC} {$H+} // use AnsiString instead of ShortString as String-type (default in Delphi) @@ -109,3 +112,5 @@ {$IF Defined(UsePortaudioInput) or Defined(UsePortaudioPlayback)} {$DEFINE UsePortaudio} {$IFEND} + +{$ENDIF PASDOC} |