# ============================================================================
# Copyright (c) 2019-2026 XMLmind Software. All rights reserved.
#
# Author: Hussein Shafie
#
# This file is part of the XMLmind Web Help Compiler project.
# For conditions of distribution and use, see the accompanying LEGAL.txt file.
# ============================================================================

WHC=java -jar ../../lib/whc.jar

# Same text color as wh_resources/xmlmind_styles.css.
CUSTOMIZE=-p --navigation-color "\#15141A" \
	-p user-css wh_resources/xmlmind.css \
	-p favicon wh_resources/favicon.png \
	-p user-header wh_resources/header.html \
	-p user-footer wh_resources/footer.html \
	-p user-resources wh_resources/header_footer_files

# ----------------------------------------------------------------------------
all: css wh wh2 wh3

css:
	cat wh_resources/xmlmind_styles.css \
		wh_resources/header_footer.css > wh_resources/xmlmind.css

wh:
	rm -rf ../../doc/manual/*
#
	$(WHC) -toc toc.xml -index index.xml \
		$(CUSTOMIZE) \
		../../doc/manual/ *.html
	cp -p ../../doc/manual/what_is_it.html ../../doc/manual/index.html
#
	cp -p -r images toc.xml index.xml schema wh_resources out \
		getting_started.bat getting_started.sh ../../doc/manual/

wh2:
	rm -rf ../../doc/manual2/*
#
	$(WHC) -p layout simple -toc toc.xml \
		$(CUSTOMIZE) \
		../../doc/manual2/ *.html
	cp -p ../../doc/manual2/what_is_it.html ../../doc/manual2/index.html
#
	cp -p -r images toc.xml index.xml schema wh_resources out \
		getting_started.bat getting_started.sh ../../doc/manual2/

wh3:
	rm -rf ../../doc/manual3/*
#
	$(WHC) -p layout corporate -toc toc.xml -index index.xml \
		$(CUSTOMIZE) \
		../../doc/manual3/ *.html
	cp -p ../../doc/manual3/what_is_it.html ../../doc/manual3/index.html
#
	cp -p -r images toc.xml index.xml schema wh_resources out \
		getting_started.bat getting_started.sh ../../doc/manual3/

# ----------------------------------------------------------------------------
clean:
	rm -f *~ */*~ */*/*~
	rm -rf out/*

distclean: clean

realclean: distclean
	rm -rf ../../doc/manual/*
	rm -rf ../../doc/manual2/*
	rm -rf ../../doc/manual3/*

