Blame website/Makefile

Packit 9ff65e
##############################################################################
Packit 9ff65e
#  ocaml-fileutils: files and filenames common operations                    #
Packit 9ff65e
#                                                                            #
Packit 9ff65e
#  Copyright (C) 2003-2014, Sylvain Le Gall                                  #
Packit 9ff65e
#                                                                            #
Packit 9ff65e
#  This library is free software; you can redistribute it and/or modify it   #
Packit 9ff65e
#  under the terms of the GNU Lesser General Public License as published by  #
Packit 9ff65e
#  the Free Software Foundation; either version 2.1 of the License, or (at   #
Packit 9ff65e
#  your option) any later version, with the OCaml static compilation         #
Packit 9ff65e
#  exception.                                                                #
Packit 9ff65e
#                                                                            #
Packit 9ff65e
#  This library is distributed in the hope that it will be useful, but       #
Packit 9ff65e
#  WITHOUT ANY WARRANTY; without even the implied warranty of                #
Packit 9ff65e
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file         #
Packit 9ff65e
#  COPYING for more details.                                                 #
Packit 9ff65e
#                                                                            #
Packit 9ff65e
#  You should have received a copy of the GNU Lesser General Public License  #
Packit 9ff65e
#  along with this library; if not, write to the Free Software Foundation,   #
Packit 9ff65e
#  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA             #
Packit 9ff65e
##############################################################################
Packit 9ff65e
Packit 9ff65e
INKSCAPE=inkscape
Packit 9ff65e
COMPOSITE=composite
Packit 9ff65e
PANDOC=pandoc
Packit 9ff65e
TAR=tar
Packit 9ff65e
CURL=curl
Packit 9ff65e
FAB=fab
Packit 9ff65e
LINKCHECKER=linkchecker
Packit 9ff65e
Packit 9ff65e
# Name of the product.
Packit 9ff65e
NAME = ocaml-fileutils
Packit 9ff65e
API_NAME = fileutils
Packit 9ff65e
Packit 9ff65e
# Determine if we can scrape host.
Packit 9ff65e
ONLINE := $(shell (ping -c 1 forge.ocamlcore.org > /dev/null 2>&1 && echo true) || echo false)
Packit 9ff65e
Packit 9ff65e
# HTML page to scrape for data.
Packit 9ff65e
FORGE_PAGE = "http://forge.ocamlcore.org/frs/?group_id=128"
Packit 9ff65e
Packit 9ff65e
# Dev documetation link.
Packit 9ff65e
DEV_DOC_URL = "file:///$(shell pwd)/dist/ocaml-fileutils-doc-dev.tar.gz"
Packit 9ff65e
Packit 9ff65e
default: all
Packit 9ff65e
Packit 9ff65e
include Makefile.scrape
Packit 9ff65e
include website-tools/Makefile.common
Packit 9ff65e
Packit 9ff65e
GENERATED_HTML=$(patsubst mkd/%.mkd,html/%.html,$(wildcard mkd/*.mkd))
Packit 9ff65e
GENERATED_HTML+= html/index.html
Packit 9ff65e
GENERATED_IMG=html/logo.png
Packit 9ff65e
Packit 9ff65e
all: $(GENERATED_HTML) $(GENERATED_IMG) extract-api-documentation
Packit 9ff65e
Packit 9ff65e
.PHONY: all
Packit 9ff65e
Packit 9ff65e
clean:: distclean
Packit 9ff65e
	-$(RM) $(GENERATED_HTML) $(GENERATED_IMG) mkd/documentation.mkd mkd/index.mkd
Packit 9ff65e
	-$(RM) Makefile.scrape
Packit 9ff65e
Packit 9ff65e
distclean::
Packit 9ff65e
Packit 9ff65e
.PHONY: clean
Packit 9ff65e
Packit 9ff65e
html/%.png: images/%.svg
Packit 9ff65e
	inkscape $(INKSCAPEFLAGS) -e $@ $< > /dev/null
Packit 9ff65e
Packit 9ff65e
#
Packit 9ff65e
# Checkout external modules.
Packit 9ff65e
#
Packit 9ff65e
# Get program from gildor478/website-tools to build everything.
Packit 9ff65e
#
Packit 9ff65e
Packit 9ff65e
GIT_WEBSITE_TOOLS=https://github.com/gildor478/website-tools.git
Packit 9ff65e
checkout-website-tools:
Packit 9ff65e
	if ! test -d website-tools ; then git clone $(GIT_WEBSITE_TOOLS); fi
Packit 9ff65e
	cd website-tools && git pull
Packit 9ff65e
Packit 9ff65e
website-tools/Makefile.common: checkout-website-tools
Packit 9ff65e
Packit 9ff65e
.PHONY: checkout-website-tools
Packit 9ff65e
Packit 9ff65e
test: all