diff --git a/autogen.sh b/autogen.sh index 97b7c05f..a0eabf83 100755 --- a/autogen.sh +++ b/autogen.sh @@ -11,16 +11,16 @@ BUILDDIR=build command -v meson 2> /dev/null if [ $? != 0 ]; then - echo "*** No meson found, please install it ***" + echo "*** 'meson' not found, please install it ***" exit 1 fi # we could remove build/ but let's avoid rm -rf risks... if test -d ${BUILDDIR}; then - meson --reconfigure ${BUILDDIR} $@ + meson setup --reconfigure ${BUILDDIR} $@ || exit 1 else - meson ${BUILDDIR} $@ + meson setup ${BUILDDIR} $@ || exit 1 fi -echo "*** Now run 'ninja -C ${BUILDDIR}' to build mu" -echo "*** Or check the Makefile for some useful targets" +echo "*** Now run either 'ninja -C ${BUILDDIR}' or 'make' to build mu" +echo "*** Check the Makefile for other useful targets" diff --git a/build-aux/date.py b/build-aux/date.py index 7cb0c067..d93b13d0 100755 --- a/build-aux/date.py +++ b/build-aux/date.py @@ -1,9 +1,15 @@ -#!/bin/env python -#The MacOS 'date' is not quite up to GNU standards +#!/usr/bin/env python3 + +""" +Script to get date strings, since the MacOS 'date' is not quite up to GNU +standards + +E.g.. + date.py 2023-10-14 "The year-month is %y %m" +""" + import sys from datetime import datetime + date=datetime.strptime(sys.argv[1],'%Y-%m-%d') print(date.strftime(sys.argv[2])) -# -# ./date.py 2023-10-14 "The year-month is %y %m" -# diff --git a/meson.build b/meson.build index ef0e3891..f5e9ccb8 100644 --- a/meson.build +++ b/meson.build @@ -103,7 +103,7 @@ build_aux = join_paths(meson.current_source_dir(), 'build-aux') ################################################################################ # derived date values (based on 'mu-date'); used in docs # we can't use the 'date' because MacOS 'date' is incompatible with GNU's. -pdate=join_paths(build_aux, 'date.py') +pdate=find_program(join_paths(build_aux, 'date.py')) env = environment() env.set('LANG', 'C') mu_day_month_year = run_command(pdate, mu_date, '%d %B %Y',