mirror of https://github.com/djcb/mu.git
build: path improvements
Use correct paths in date.py Fix some build warnings
This commit is contained in:
parent
51ecf46d81
commit
48cb83b427
10
autogen.sh
10
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"
|
||||
|
|
|
@ -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"
|
||||
#
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue