# Makefile for NcDialog_API Texinfo Help  -  Invoke using "gmake"
# Mahlon R. Smith
# Tools: makeinfo
# 
# 24-Jul-2025

# This variable is defined for technical reasons
# (see 'make' documentation for more information)
.RECIPEPREFIX = >

# Dependencies for build:
TEXI_FILES = Ch00_NcDialogAPI.texi \
             Ch01_Introduction.texi Ch02_OperationalOverview.texi \
             Ch03_YourFirstApplication.texi Ch04_NCursesEngine.texi \
             Ch05_NcWindowMeta-layer.texi \
             Ch06_NcDialogClassDefinition.texi \
             Ch06w_WaylandCB.texi \
             Ch07_gStringTextTool.texi \
             Ch08_ApplicationExamples.texi Ch09_Installation.texi \
             Ch10_TechnicalSupport.texi gpl-3.0.texi fdl-1.3.texi \
             texi_macros.texi \
             same_author.texi \
             applycss_response.txt


ncdialogapi.info: $(TEXI_FILES)
> makeinfo --fill-column=78 --no-split Ch00_NcDialogAPI.texi
> makeinfo --fill-column=78 --html --no-split Ch00_NcDialogAPI.texi

# TEMP - FOR DEBUGGING ONLY - FORCE OUTPUT, EVEN WITH ERRORS
#> makeinfo --force --fill-column=78 --no-split NcDialog_API.texi

# Delete existing targets (if any) and rebuild.
.PHONY: all
all:
> rm ncdialogapi.info ncdialogapi.html
> makeinfo --fill-column=78 --no-split Ch00_NcDialogAPI.texi
> makeinfo --fill-column=78 --html --no-split Ch00_NcDialogAPI.texi
> ./applycss

# Generate HTML output, and apply post-processing using 'idpp'.
.PHONY: htmldoc
htmldoc:
> rm ncdialogapi.html
> makeinfo --fill-column=78 --html --no-split Ch00_NcDialogAPI.texi
> ./applycss


# For stand-alone gString InfoDoc (.info and .html output)
.PHONY: gsdoc
gsdoc: gsBase.texi Ch07_gStringTextTool.texi \
              gpl-3.0.texi fdl-1.3.texi
> makeinfo --fill-column=78 --no-split gsBase.texi
> makeinfo --fill-column=78 --html --no-split gsBase.texi
> idpp -cV gstring.html

# For stand-alone Wayclip InfoDoc (.info and .html output)
.PHONY: wcdoc
wcdoc: wcBase.texi Ch06w_WaylandCB.texi Ch07_gStringTextTool.texi \
              gpl-3.0.texi fdl-1.3.texi
> makeinfo --fill-column=78 --no-split wcBase.texi
> makeinfo --fill-column=78 --html --no-split wcBase.texi
> idpp -cV waylandcb.html
