Author: pierre
Date: Fri Jul 10 06:26:23 2020
New Revision: 4195
Log:
Prevent users to tick "Rebuild Makefile" if Makefile does not exist
For some reason, beginners tend to tick this at the first pass. Since
it is hard to prevent that in Config.in, use a sanity check in jhalfs.
Modified:
jhalfs/trunk/jhalfs
Modified: jhalfs/trunk/jhalfs
==============================================================================
--- jhalfs/trunk/jhalfs Fri Jul 10 06:24:00 2020 (r4194)
+++ jhalfs/trunk/jhalfs Fri Jul 10 06:26:23 2020 (r4195)
@@ -475,10 +475,16 @@
fi
-# When regenerating the Makefile, we need to know also the
-# canonical book version
# shellcheck disable=SC2034
if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
+# Sanity check: users tend to tick "rebuild Makefile"
+# without generating one first. Check we have one:
+ if [ ! -f $MKFILE ]; then
+ set -e
+ error_message "You cannot \"rebuild Makefile\" without first building one"
+ fi
+# When regenerating the Makefile, we need to know also the
+# canonical book version
case $PROGNAME in
clfs* )
VERSION=$(xmllint --noent "$BOOK/prologue/$ARCH/bookinfo.xml"
2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
--
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page