;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ludovic Courtès ;;; Copyright © 2015 Joshua S. Grant ;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu) #:use-module (guix i18n) #:use-mo
aboutsummaryrefslogtreecommitdiff
#!/bin/sh
# Create the build system.

set -e -x

# Generate stubs for translations.
langs=`find po/doc -type f -name 'guix-manual*.po' \
        | sed -e 's,.*/guix-manual\.,,;s,\.po$,,'`
for lang in ${langs}; do
    if [ ! -e "doc/guix.${lang}.texi" ]; then
	echo "@setfilename guix.${lang}.info" > "doc/guix.${lang}.texi"
	echo "@include version-${lang}.texi" >> "doc/guix.${lang}.texi"
	# Ensure .po file is newer.
	touch "po/doc/guix-manual.${lang}.po"
    fi
done
langs=`find po/doc -type f -name 'guix-cookbook*.po' \
        | sed -e 's,.*/guix-cookbook\.,,;s,\.po$,,'`
for lang in ${langs}; do
    if [ ! -e "doc/guix-cookbook.${lang}.texi" ]; then
	echo "@setfilename guix-cookbook.${lang}.info" > "doc/guix-cookbook.${lang}.texi"
	# Ensure .po file is newer.
	touch "po/doc/guix-cookbook.${lang}.po"
    fi
done

autoreconf -vfi

# Replace Automake's build-aux/mdate-sh with build-aux/mdate-from-git, our
# own, reproducible version.
chmod +w build-aux/mdate-sh
rm -f build-aux/mdate-sh
ln -s mdate-from-git.scm build-aux/mdate-sh
f you get the line @code{location: gnu/packages/bar.scm:174:2}, add @code{bar} to the @code{use-package-modules} form."))))) ((package _ ...) (condition (&fix-hint (hint (format #f (G_ "\ Try adding @code{(use-package-modules ~a)}.") (basename (location-file (package-location package)) ".scm")))))))) (define (service-module-hint module) (define last-name (match module ((_ ... last) last))) (match (lookup-service-types last-name) (() (condition (&fix-hint (hint (format #f (G_ "\ You may use @command{guix system search ~a} to search for a service matching @code{~a}. If you get the line @code{location: gnu/services/foo.scm:188:2}, add @code{foo} to the @code{use-service-modules} form.") last-name last-name))))) ((package _ ...) (condition (&fix-hint (hint (format #f (G_ "\ Try adding @code{(use-service-modules ~a)}.") (basename (location-file (service-type-location package)) ".scm")))))))) (define-syntax-rule (try-use-modules hint modules ...) (eval-when (expand load eval) (%try-use-modules '(modules ...) (source-properties->location (current-source-location)) hint))) (define-syntax-rule (use-package-modules module ...) (try-use-modules package-module-hint (gnu packages module) ...)) (define-syntax-rule (use-service-modules module ...) (try-use-modules service-module-hint (gnu services module) ...)) (define-syntax-rule (use-system-modules module ...) (try-use-modules (const #f) ;no hint (gnu system module) ...)) ;;; gnu.scm ends here