You've already forked gnatdashboard
mirror of
https://github.com/AdaCore/gnatdashboard.git
synced 2026-02-12 12:30:42 -08:00
Rewrite the Makefile to comply with good practices and conventions (see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html). Change-Id: I123a7fde2b7abdddecc1aa225f32b8b3c82ac45c
55 lines
1.3 KiB
Makefile
55 lines
1.3 KiB
Makefile
# Makefile for GNATdashboard
|
|
|
|
# Command variables
|
|
CP = cp
|
|
MKDIR = install -d
|
|
|
|
# General conventions for Makefiles
|
|
SHELL = /bin/sh
|
|
|
|
.SUFFIXES:
|
|
|
|
# Common prefix for installation directories.
|
|
# NOTE: This directory must exist when you start the install.
|
|
prefix = /usr/local
|
|
datarootdir = $(prefix)/share
|
|
docdir = $(datarootdir)/doc/gnatdashboard
|
|
pdfdir = $(docdir)/pdf
|
|
htmldir = $(docdir)/html
|
|
|
|
mkfile := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|
rootdir := $(patsubst %/,%,$(dir $(mkfile)))
|
|
builddir = $(rootdir)/build
|
|
gnathubdir = $(rootdir)/gnathub
|
|
|
|
MAKE_DOC = $(MAKE) -C docs builddir=$(builddir) GNATHUBDIR=$(gnathubdir)
|
|
|
|
# Generate both HTML and PDF documents
|
|
all: gnathub-api-docs docs-html docs-pdf
|
|
|
|
gnathub-api-docs: docs/Makefile
|
|
$(MAKE_DOC) api-doc
|
|
$(MAKE_DOC) plugins-doc
|
|
|
|
# Generate the HTML documentation
|
|
docs-html: gnathub-api-docs
|
|
$(MAKE_DOC) html
|
|
|
|
# Generate the PDF documentation
|
|
docs-pdf: gnathub-api-docs
|
|
$(MAKE_DOC) latexpdf
|
|
|
|
installdirs:
|
|
$(MKDIR) $(docdir)
|
|
$(MKDIR) $(pdfdir)
|
|
$(MKDIR) $(htmldir)
|
|
|
|
install-html: docs-html installdirs
|
|
(cd $(builddir)/docs && tar cf - html) | \
|
|
(cd $(htmldir) && tar xf - --strip-components 1)
|
|
|
|
install-pdf: docs-pdf installdirs
|
|
$(CP) $(builddir)/docs/latex/GNATdashboard.pdf $(pdfdir)
|
|
|
|
install: install-html install-pdf
|