Add comments to BLFS/Makefile

Use /bin/echo to write the initial instpkg.xml. Hopefully, the behavior
of /bin/echo is independant on the shell
Add a sudo to a sed in finc_install_blfs (needed in some cases)
This commit is contained in:
Pierre Labastie 2012-03-11 16:37:10 +00:00
parent 81cd513e46
commit 55733136b6
2 changed files with 8 additions and 4 deletions

View file

@ -11,8 +11,11 @@ else
Q = @
endif
# Known behavior
LANG=C
LC_ALL=C
# The right-hand side is updated by jhalfs
TRACKING_DIR = tracking-dir
TOPDIR=$(shell pwd)
BLFS_XML = $(TOPDIR)/blfs-xml
@ -62,13 +65,14 @@ $(PACK_LIST): $(XSLDIR)/gen_pkg_list.xsl $(XSLDIR)/specialCases.xsl $(TRACKFILE)
$(Q)rm $@.tmp
# Beware of the echo '$(INITIAL_TRACK)' command below:
# if default shell is bash, needs echo -e
# if default shell is sh : echo is enough
# if shell is bash or sh linked to bash, needs echo -e
# if shell is dash or sh linked to dash: echo is enough
# Don't ask me why
# So use /bin/echo (needs -e)
$(TRACKFILE): $(TRACKING_DIR)
$(Q)if ! [ -f $@ ]; then \
echo Initializing $(TRACKFILE) && \
echo '$(INITIAL_TRACK)' > $@ && \
/bin/echo -e echo '$(INITIAL_TRACK)' > $@ && \
$(MAKE) $(PACK_LIST); \
fi
@for track in $(TRACKING_DIR)/*-*; do \

View file

@ -31,7 +31,7 @@ sudo make -j1 -C $BUILDDIR$BLFS_ROOT TRACKING_DIR=$BUILDDIR$TRACKING_DIR \
# Because the BLFS Makefile is supposed to be used in chroot (or booted)
# mode, the tracking file has wrong path for DTD. Change it:
sed -i s@$BUILDDIR@@ $BUILDDIR$TRACKING_DIR/instpkg.xml
sudo sed -i s@$BUILDDIR@@ $BUILDDIR$TRACKING_DIR/instpkg.xml
# Manually build a 'configuration' file
if [ "$DEP_LIBXML" = y ]; then