• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1nlohmann_json.docset: Info.plist docSet.sql
2	$(MAKE) clean
3	mkdir -p nlohmann_json.docset/Contents/Resources/Documents/
4	cp info.plist nlohmann_json.docset/Contents
5	# build and copy documentation
6	$(MAKE) build -C ../mkdocs
7	cp -r ../mkdocs/site/* nlohmann_json.docset/Contents/Resources/Documents
8	# patch CSS to hide navigation items
9	echo "\n\nheader, footer, navi, div.md-sidebar--primary, nav.md-tabs--active, a.md-content__button { display: none; }" >> nlohmann_json.docset/Contents/Resources/Documents/assets/stylesheets/main.b5d04df8.min.css
10	# fix spacing
11	echo "\n\ndiv.md-sidebar div.md-sidebar--secondary, div.md-main__inner { top: 0; margin-top: 0 }" >> nlohmann_json.docset/Contents/Resources/Documents/assets/stylesheets/main.b5d04df8.min.css
12	# remove "JSON for Modern C++" from page titles
13	find nlohmann_json.docset/Contents/Resources/Documents -type f -exec gsed -i 's| - JSON for Modern C++</title>|</title>|' {} +
14	# clean up
15	rm nlohmann_json.docset/Contents/Resources/Documents/hooks.py
16	rm nlohmann_json.docset/Contents/Resources/Documents/sitemap.*
17	# generate index
18	sqlite3 nlohmann_json.docset/Contents/Resources/docSet.dsidx < docSet.sql
19
20clean:
21	rm -fr nlohmann_json.docset
22