- Timestamp:
- 08/09/2017 01:55:55 PM (7 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- dd08e14
- Parents:
- 200fbde
- Location:
- BLFS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/Makefile
r200fbde r506120ee 26 26 # Those directories and files will be created and populated by make: 27 27 # directory of the book sources: 28 LFS_XML = $(TOPDIR)/lfs-xml 28 29 BLFS_XML = $(TOPDIR)/blfs-xml 29 30 # contains the REV used in the preceding call: … … 38 39 BOOK_XML = $(TOPDIR)/book.xml 39 40 41 LFSTMP = $(LFS_XML)/tmp 40 42 RENDERTMP = $(BLFS_XML)/tmp 43 LFS_FULL = $(LFSTMP)/lfs-full.xml 41 44 BLFS_FULL = $(RENDERTMP)/blfs-full.xml 42 45 … … 58 61 endef 59 62 63 LFS-SVN = svn://svn.linuxfromscratch.org/LFS/trunk/BOOK 60 64 SVN = svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK 61 65 … … 64 68 find $(BLFS_XML) -name \*.xml; \ 65 69 fi)) 70 ALLXMLLFS:= $(filter-out $(LFSTMP)/%, \ 71 $(shell if [ -d $(LFS_XML) ]; then \ 72 find $(LFS_XML) -name \*.xml; \ 73 fi)) 66 74 ALLXSL := $(filter-out $(RENDERTMP)/%, \ 67 75 $(shell if [ -d $(BLFS_XML) ]; then \ 68 76 find $(BLFS_XML) -name \*.xsl; \ 77 fi)) 78 ALLXSLLFS := $(filter-out $(LFSTMP)/%, \ 79 $(shell if [ -d $(LFS_XML) ]; then \ 80 find $(LFS_XML) -name \*.xsl; \ 69 81 fi)) 70 82 … … 98 110 $(Q)xsltproc --nonet -o $@ $(XSLDIR)/gen_config.xsl $(PACK_LIST) 99 111 100 $(PACK_LIST): $(XSLDIR)/gen_pkg_list.xsl $(XSLDIR)/specialCases.xsl $(TRACKFILE) 112 $(PACK_LIST): $(XSLDIR)/gen_pkg_list.xsl $(XSLDIR)/specialCases.xsl $(TRACKFILE) $(LFS_FULL) 101 113 $(Q)xsltproc --stringparam installed-packages $(TRACKFILE) \ 114 --stringparam lfs-full $(LFS_FULL) \ 102 115 -o $@.tmp $(XSLDIR)/gen_pkg_list.xsl $(BLFS_FULL) 103 116 $(Q)xmllint --postvalid --format -o $@ $@.tmp … … 138 151 ifneq ($(REV),$(REV1)) 139 152 $(BLFS_FULL): FORCE 140 endif 153 $(LFS_FULL): FORCE 154 endif 155 $(LFS_FULL): $(LFS_XML) $(LFS_XML)/general.ent $(ALLXMLLFS) $(ALLXSLLFS) 156 @echo "Processing LFS bootscripts..." 157 $(Q)cd $(LFS_XML) && bash process-scripts.sh 158 $(Q)[ -d $(LFSTMP) ] || mkdir -p $(LFSTMP) 159 @echo "Adjusting LFS for revision $(REV)..." 160 $(Q)xsltproc --nonet --xinclude \ 161 --stringparam profile.revision $(REV) \ 162 --output $(LFSTMP)/lfs-prof.xml \ 163 $(LFS_XML)/stylesheets/lfs-xsl/profile.xsl \ 164 $(LFS_XML)/index.xml 165 @echo "Validating the LFS book..." 166 $(Q)xmllint --nonet --noent --postvalid \ 167 -o $@ $(LFSTMP)/lfs-prof.xml 168 $(Q)rm -f $(LFS_XML)/appendices/*.script 169 $(Q)cd $(LFS_XML) && ./aux-file-data.sh $@ 170 $(Q)echo $(REV) > $(REVFILE) 171 141 172 $(BLFS_FULL): $(BLFS_XML) $(BLFS_XML)/general.ent $(ALLXML) $(ALLXSL) 142 173 $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP) 143 @echo "Adjusting for revision $(REV)..."174 @echo "Adjusting BLFS for revision $(REV)..." 144 175 $(Q)xsltproc --nonet --xinclude \ 145 176 --stringparam profile.revision $(REV) \ … … 147 178 $(BLFS_XML)/stylesheets/lfs-xsl/profile.xsl \ 148 179 $(BLFS_XML)/index.xml 149 @echo "Validating the book..."180 @echo "Validating the BLFS book..." 150 181 $(Q)xmllint --nonet --noent --postvalid \ 151 182 -o $@ $(RENDERTMP)/blfs-prof.xml … … 154 185 all: update $(BOOK_XML) 155 186 156 update: $(BLFS_XML) 187 update: $(BLFS_XML) $(LFS_XML) 157 188 @echo Updating the book sources 189 $(Q)cd $(LFS_XML) && svn up 158 190 $(Q)cd $(BLFS_XML) && svn up 159 191 192 $(LFS_XML): 193 @echo Getting the LFS book sources... 194 $(Q)svn co $(LFS-SVN) $@ 195 160 196 $(BLFS_XML): 161 @echo Getting the book sources...197 @echo Getting the BLFS book sources... 162 198 $(Q)svn co $(SVN) $@ 163 199 -
BLFS/xsl/gen_pkg_list.xsl
r200fbde r506120ee 6 6 installed packages in the tracking file (stringparam 7 7 'installed-packages') --> 8 <!-- Extract also a list of LFS packages from stringparam lfs-full --> 8 9 9 10 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 10 11 version="1.0"> 11 12 13 <xsl:param name="lfs-full" select="'./lfs-xml/lfs-full.xml'"/> 12 14 <xsl:param name="installed-packages" select="'../lib/instpkg.xml'"/> 13 15 … … 23 25 <xsl:template match="/"> 24 26 <princList> 25 <xsl:text>

</xsl:text> 27 <xsl:text>

 </xsl:text> 28 <list> 29 <xsl:attribute name="id">lfs</xsl:attribute> 30 <xsl:text>
 </xsl:text> 31 <name>LFS Packages</name> 32 <xsl:text>
 </xsl:text> 33 <sublist> 34 <xsl:attribute name="id">lfs-6</xsl:attribute> 35 <xsl:text>
 </xsl:text> 36 <name>LFS Chapter 6</name> 37 <xsl:apply-templates 38 select='document($lfs-full)// 39 chapter[@id="chapter-building-system"]/ 40 sect1/sect1info'/> 41 <xsl:text>
 </xsl:text> 42 </sublist> 43 <sublist> 44 <xsl:attribute name="id">lfs-8</xsl:attribute> 45 <xsl:text>
 </xsl:text> 46 <name>LFS Chapter 8</name> 47 <xsl:apply-templates select='document($lfs-full)//chapter[@id="chapter-bootable"]/sect1/sect1info[./productname="linux"]'/> 48 <xsl:text>
 </xsl:text> 49 </sublist> 50 <sublist> 51 <xsl:attribute name="id">lfs-9</xsl:attribute> 52 <xsl:text>
 </xsl:text> 53 <name>LFS Chapter 9</name> 54 <xsl:apply-templates select='document($lfs-full)//sect1[@id="ch-finish-theend"]//userinput[starts-with(string(),"echo")]'/> 55 <xsl:text>
 </xsl:text> 56 </sublist> 57 <xsl:text>

 </xsl:text> 58 </list> 26 59 <!-- How to have blfs-bootscripts versionned? Do not know, so 27 60 avoid it (TODO ?) --> 28 61 <xsl:apply-templates select="//part[not(@id='introduction')]"/> 29 62 </princList> 63 </xsl:template> 64 65 <xsl:template match="userinput"> 66 <!-- Only used in lFS chapter 9, to retrieve book version --> 67 <package> 68 <name>LFS-Release</name> 69 <xsl:element name="version"> 70 <xsl:copy-of select="substring-after(substring-before(string(),' >'),'echo ')"/> 71 </xsl:element> 72 <xsl:if 73 test="document($installed-packages)//package[name='LFS-Release']"> 74 <xsl:text>
 </xsl:text> 75 <xsl:element name="inst-version"> 76 <xsl:value-of 77 select="document( 78 $installed-packages 79 )//package[name='LFS-Release']/version"/> 80 </xsl:element> 81 </xsl:if> 82 </package> 83 </xsl:template> 84 85 <xsl:template match="sect1info"> 86 <xsl:text> </xsl:text> 87 <xsl:choose> 88 <!-- Never update linux headers --> 89 <xsl:when test="./productname='linux' 90 and ancestor::chapter[@id='chapter-building-system']"/> 91 <!-- Gcc version is taken from BLFS --> 92 <xsl:when test="./productname='gcc'"/> 93 <!-- Shadow version is taken from BLFS --> 94 <xsl:when test="./productname='shadow'"/> 95 <!-- Dbus version is taken from BLFS --> 96 <xsl:when test="./productname='dbus'"/> 97 <!-- Systemd version is taken from BLFS --> 98 <xsl:when test="./productname='systemd'"/> 99 <xsl:otherwise> 100 <package><xsl:text>
 </xsl:text> 101 <xsl:element name="name"> 102 <xsl:value-of select="./productname"/> 103 </xsl:element> 104 <xsl:text>
 </xsl:text> 105 <xsl:element name="version"> 106 <xsl:value-of select="./productnumber"/> 107 </xsl:element> 108 <xsl:if 109 test="document($installed-packages)//package[name=current()/productname]"> 110 <xsl:text>
 </xsl:text> 111 <xsl:element name="inst-version"> 112 <xsl:value-of 113 select="document( 114 $installed-packages 115 )//package[name=current()/productname]/version"/> 116 </xsl:element> 117 </xsl:if> 118 </package> 119 </xsl:otherwise> 120 </xsl:choose> 121 <!-- No deps for now: a former version is always installed --> 30 122 </xsl:template> 31 123
Note:
See TracChangeset
for help on using the changeset viewer.