Index: .gitignore
===================================================================
--- .gitignore	(revision 3443abb60a3ad31e0c3058f9ad55e859d6f25cab)
+++ .gitignore	(revision bd90b9b7476860532e8ee3d8e16bc848846e1f5d)
@@ -1,3 +1,4 @@
 lfs-bootscripts-*.tar.xz
+conditional.ent
 version.ent
 appendices/*.script
Index: Makefile
===================================================================
--- Makefile	(revision 3443abb60a3ad31e0c3058f9ad55e859d6f25cab)
+++ Makefile	(revision bd90b9b7476860532e8ee3d8e16bc848846e1f5d)
@@ -190,5 +190,5 @@
 
 version:
-	$(Q)./git-version.sh
+	$(Q)./git-version.sh $(REV)
 
 #dump-commands: validate
Index: general.ent
===================================================================
--- general.ent	(revision 3443abb60a3ad31e0c3058f9ad55e859d6f25cab)
+++ general.ent	(revision bd90b9b7476860532e8ee3d8e16bc848846e1f5d)
@@ -1,4 +1,8 @@
+<!-- Automatically generated by git-version.sh -->
+<!ENTITY % conditional-entities SYSTEM "conditional.ent">
+%conditional-entities;
+
 <!-- version info automatically generated by git
-     comment the following two lines for release -->
+     comment out the following two lines for release -->
 <!ENTITY % version-entities SYSTEM "version.ent">
 %version-entities;
@@ -7,6 +11,10 @@
      for releases (including -rc) -->
 <!--
+<![ %sysv; [
 <!ENTITY version         "10.2-rc1">
-<!ENTITY versiond        "10.2-systemd-rc1">
+]]>
+<![ %systemd; [
+<!ENTITY version         "10.2-systemd-rc1">
+]]>
 <!ENTITY releasedate     "August 26th, 2021">
 <!ENTITY copyrightdate   "1999-2021">
@@ -14,15 +22,18 @@
 <!-- jhalfs needs a literal dash, not &ndash; -->
 
+<![ %sysv; [
 <!ENTITY short-version   "svn">  <!-- Used below in &blfs-book; 
                                       Change to x.y for release but not -rc releases -->
 <!ENTITY generic-version "development"> <!-- Use "development"  or "x.y[-pre{x}]" -->
-
-<!ENTITY short-versiond  "systemd">  <!--Change to stable-systemd for release  -->
-<!ENTITY generic-versiond "systemd"> 
+]]>
+<![ %systemd; [
+<!ENTITY short-version  "systemd">  <!--Change to stable-systemd for release  -->
+<!ENTITY generic-version "systemd"> 
+]]>
 
 <!ENTITY lfs-root        "https://www.linuxfromscratch.org/">
 <!ENTITY blfs-root       "&lfs-root;blfs/">
 <!ENTITY blfs-book       "&blfs-root;view/&short-version;/">
-<!ENTITY blfs-systemd-book "&blfs-root;view/&short-versiond;/">
+<!ENTITY blfs-book       "&blfs-root;view/&short-version;/">
 <!ENTITY faq-root        "&lfs-root;faq/">
 <!ENTITY hints-root      "&lfs-root;hints/downloads/files/">
@@ -35,10 +46,10 @@
 <!ENTITY secadv          "&lfs-root;lfs/advisories/">
 <!ENTITY min-kernel      "3.2">
-
+<!--
 <!ENTITY patches-rootd   "&lfs-root;patches/lfs/&generic-versiond;/">
 <!ENTITY downloads-rootd "&lfs-root;lfs/downloads/&generic-versiond;/">
 <!ENTITY test-resultsd   "&lfs-root;lfs/build-logs/&generic-versiond;/">
 <!ENTITY erratad         "&lfs-root;lfs/errata/&generic-versiond;/">
-
+-->
 <!ENTITY lfs-ticket-root "https://wiki.linuxfromscratch.org/lfs/ticket/">
 
Index: git-version.sh
===================================================================
--- git-version.sh	(revision 3443abb60a3ad31e0c3058f9ad55e859d6f25cab)
+++ git-version.sh	(revision bd90b9b7476860532e8ee3d8e16bc848846e1f5d)
@@ -1,9 +1,27 @@
 #!/bin/sh
+
+if [ "$1" = sysv ]; then
+	SYSV="INCLUDE"
+	SYSTEMD="IGNORE "
+elif [ "$1" = systemd ]; then
+	SYSV="IGNORE "
+	SYSTEMD="INCLUDE"
+else
+	echo You must provide either \"sysv\" or \"systemd\" as argument
+	exit 1
+fi
+
+echo "<!ENTITY % sysv    \"$SYSV\">"     >  conditional.ent
+echo "<!ENTITY % systemd \"$SYSTEMD\">"  >> conditional.ent
 
 if ! git status > /dev/null; then
 	# Either it's not a git repository, or git is unavaliable.
 	# Just workaround.
-	echo "<!ENTITY version           \"unknown\">"         >  version.ent
-	echo "<!ENTITY versiond          \"unknown-systemd\">" >> version.ent
+	echo "<![ %sysv; ["                                    >  version.ent
+	echo "<!ENTITY version           \"unknown\">"         >> version.ent
+	echo "]]>"                                             >> version.ent
+	echo "<![ %systemd; ["                                 >> version.ent
+	echo "<!ENTITY version           \"unknown-systemd\">" >> version.ent
+	echo "]]>"                                             >> version.ent
 	echo "<!ENTITY releasedate       \"unknown\">"         >> version.ent
 	echo "<!ENTITY copyrightdate     \"1999-2021\">"       >> version.ent
@@ -42,6 +60,10 @@
 fi
 
-echo "<!ENTITY version           \"$version\">"            >  version.ent
-echo "<!ENTITY versiond          \"$versiond\">"           >> version.ent
+echo "<![ %sysv; ["                                        >  version.ent
+echo "<!ENTITY version           \"$version\">"            >> version.ent
+echo "]]>"                                                 >> version.ent
+echo "<![ %systemd; ["                                     >> version.ent
+echo "<!ENTITY version          \"$versiond\">"            >> version.ent
+echo "]]>"                                                 >> version.ent
 echo "<!ENTITY releasedate       \"$full_date\">"          >> version.ent
 echo "<!ENTITY copyrightdate     \"1999-$year\">"          >> version.ent
