From owner-dev-commits-doc-all@freebsd.org Thu May 13 14:43:44 2021 Return-Path: Delivered-To: dev-commits-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B1B064460D for ; Thu, 13 May 2021 14:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FgvYD3Xr1z3Gkx; Thu, 13 May 2021 14:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C58B20B12; Thu, 13 May 2021 14:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14DEhiO2059895; Thu, 13 May 2021 14:43:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14DEhiwp059894; Thu, 13 May 2021 14:43:44 GMT (envelope-from git) Date: Thu, 13 May 2021 14:43:44 GMT Message-Id: <202105131443.14DEhiwp059894@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Sofian Brabez Subject: git: e7edca45ba - main - documentation/Makefile: add requirements target MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sbz X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e7edca45ba9fd90eee1fce4eaa596fb5e89e9c95 Auto-Submitted: auto-generated X-BeenThere: dev-commits-doc-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the doc repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2021 14:43:44 -0000 The branch main has been updated by sbz (ports committer): URL: https://cgit.FreeBSD.org/doc/commit/?id=e7edca45ba9fd90eee1fce4eaa596fb5e89e9c95 commit e7edca45ba9fd90eee1fce4eaa596fb5e89e9c95 Author: Sofian Brabez AuthorDate: 2021-05-07 14:02:37 +0000 Commit: Sofian Brabez CommitDate: 2021-05-13 14:36:35 +0000 documentation/Makefile: add requirements target Add the requirements target in order to prompt the user to install the needed dependencies to be able to run `make run` successfully. Reviewed by: ygy, debdrup, imp Approved by: ygy (doc) Differential Revision: https://reviews.freebsd.org/D30161 --- documentation/Makefile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/documentation/Makefile b/documentation/Makefile index 840e306fd4..b9fa304050 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -15,12 +15,19 @@ MAINTAINER=carlavilla@FreeBSD.org -PYTHON_CMD = /usr/local/bin/python3 -HUGO_CMD = /usr/local/bin/hugo +LOCALBASE?= /usr/local + +PYTHON_CMD = ${LOCALBASE}/bin/python3 +HUGO_CMD = ${LOCALBASE}/bin/hugo LANGUAGES = en,es,pt-br,de,ja,zh-cn,zh-tw,ru,el,hu,it,mn,nl,pl,fr RUBYLIB = ../shared/lib .export RUBYLIB +RUN_DEPENDS= ${PYTHON_CMD} \ + ${HUGO_CMD} \ + ${LOCALBASE}/bin/asciidoctor \ + ${LOCALBASE}/bin/rougify + .ifndef HOSTNAME .HOST+=localhost .else @@ -29,12 +36,20 @@ RUBYLIB = ../shared/lib .ORDER: all run +.ORDER: requirements .ORDER: starting-message generate-books-toc .ORDER: starting-message build .ORDER: generate-books-toc build -all: starting-message generate-books-toc build -run: starting-message generate-books-toc run-local +all: requirements starting-message generate-books-toc build +run: requirements starting-message generate-books-toc run-local + +requirements: +.for dep in ${RUN_DEPENDS} +.if !exists(${dep}) + @(echo ${dep} not found, please run 'pkg install docproj'; exit 1) +.endif +.endfor starting-message: .PHONY @echo ---------------------------------------------------------------