Commit 426c985d authored by Michael Shigorin's avatar Michael Shigorin

syslinux: piggybacking cleanups

Avoid extra files where a variable would suffice; and use the more specific "syslinux.list" rather than a "files.list".
parent 8fbf3585
......@@ -51,8 +51,7 @@ all: prep debug
@### proper text branding should be implemented
@sed -i 's,@mkimage-profiles@,$(IMAGE_NAME),' $(DSTDIR)/*.cfg
@echo $(SYSLINUX_MODULES) > $(DSTDIR)/modules.list
@echo $(SYSLINUX_FILES) > $(DSTDIR)/files.list
@echo $(BOOTLOADER) > $(DSTDIR)/bootloader
@echo $(SYSLINUX_FILES) > $(DSTDIR)/syslinux.list
prep:
@mkdir -p $(DSTDIR)
......
......@@ -7,15 +7,15 @@ MODDIR="/usr/lib/syslinux"
mkdir -p "$WORKDIR/syslinux"
cd "$WORKDIR/syslinux"
# validate just in case (written by ../../generate.mk)
BOOTLOADER="$(cat .in/bootloader)"
case "$BOOTLOADER" in
# validate just in case (see also stage1 Makefile)
case "$GLOBAL_BOOTLOADER" in
isolinux|syslinux) ;;
*) echo "$0: error: weird BOOTLOADER: $BOOTLOADER" >&2; exit 1;;
*) echo "error: weird GLOBAL_BOOTLOADER: \`$GLOBAL_BOOTLOADER'" >&2;
exit 1;;
esac
# copy extra files, if any
SYSLINUX_FILES="$(cat .in/files.list)"
SYSLINUX_FILES="$(cat .in/syslinux.list)"
if [ -n "${SYSLINUX_FILES% }" ]; then
cp -a $SYSLINUX_FILES .
fi
......@@ -30,7 +30,7 @@ if [ -n "$SYSLINUX_MODULES" ]; then
fi
# number ordering sponsored by shell's pathname expansion
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$BOOTLOADER.cfg"
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$GLOBAL_BOOTLOADER.cfg"
# snippets are not going into the actual image
if [ "$DEBUG" != 2 ]; then rm -r .in/; fi
......
......@@ -11,6 +11,7 @@ include $(MKIMAGE_PREFIX)/config.mk
ifndef BOOTLOADER
$(error BOOTLOADER not defined)
endif
GLOBAL_BOOTLOADER := $(BOOTLOADER)
MKI_PACK_RESULTS = data
PROPAGATOR_VERSION = ALT Linux
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment