From 34986b88da278acd12da0fb0c0af30ba83afd4bc Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Wed, 7 Mar 2012 21:38:18 +0000 Subject: [PATCH] Add the version parameter of bump.xsl to Makefile Separates first install of instpkg.xml from subsequent updates due to new packages present in TRACK_DIR --- BLFS/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/BLFS/Makefile b/BLFS/Makefile index 12e09c3..7ce68b3 100644 --- a/BLFS/Makefile +++ b/BLFS/Makefile @@ -69,19 +69,21 @@ $(TRACKFILE): $(TRACKING_DIR) $(Q)if ! [ -f $@ ]; then \ echo Initializing $(TRACKFILE) && \ echo '$(INITIAL_TRACK)' > $@ && \ - $(MAKE) $(PACK_LIST) && \ - for track in $(TRACKING_DIR)/*-*; do \ - if [ -f $track ]; then \ + $(MAKE) $(PACK_LIST); \ + fi + @for track in $(TRACKING_DIR)/*-*; do \ + if [ -f $$track ]; then \ pack=$$(echo $$track | sed 's@.*/\(.*\)-[0-9c].*@\1@') && \ + version=$$(echo $$track | sed 's@.*-\([0-9c].*\)@\1@') && \ xsltproc --stringparam packages $(PACK_LIST) \ --stringparam package $$pack \ + --stringparam version $$version \ -o track.tmp $(XSLDIR)/bump.xsl $@ && \ sed -i 's@PACKDESC@$(TOPDIR)/packdesc.dtd@' track.tmp && \ xmllint --format --postvalid track.tmp > $@; \ fi; \ done; \ - rm -f track.tmp; \ - fi + rm -f track.tmp $(TRACKING_DIR): @echo Creating $(TRACKING_DIR)