Centralise the mtools config flag - which makes it impossible to forget to add

pull/4/head
Hamish Coleman 8 years ago
parent c382909865
commit c7ccad9614

@ -88,6 +88,11 @@ list_images:
# had the same offset to this fat filesystem, so hardcode that offset here.
FAT_OFFSET := 71680
# Some versions of mtools need this flag set to allow them to work with the
# dosfs images used by Lenovo - from my tests, it may be that Debian has
# applied some patch
export MTOOLS_SKIP_CHECK=1
#
# Radare didnt seem to let me specify the directory to store the project file,
# so this target hacks around that
@ -158,7 +163,7 @@ $(DEPSDIR)/slice.insert.deps: Makefile
# my mind to it..
#
%.iso.bat: %.iso.orig %.iso.orig.desc autoexec.bat.template
sed -e "s%__DIR%`MTOOLS_SKIP_CHECK=1 mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |cut -d/ -f3`%; s%__FL2%`MTOOLS_SKIP_CHECK=1 mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |cut -d/ -f4`%; s%__DESC%`cat $<.desc`%" autoexec.bat.template >$@.tmp
sed -e "s%__DIR%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |cut -d/ -f3`%; s%__FL2%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |cut -d/ -f4`%; s%__DESC%`cat $<.desc`%" autoexec.bat.template >$@.tmp
mv $@.tmp $@
# helper to write the ISO onto a cdrw
@ -181,7 +186,7 @@ $(DEPSDIR)/slice.insert.deps: Makefile
# If we ever want a copy of the dosflash.exe, just get it from the iso image
%.dosflash.exe.orig: %.iso.orig
MTOOLS_SKIP_CHECK=1 mcopy -i $^@@$(FAT_OFFSET) ::FLASH/DOSFLASH.EXE $@
mcopy -i $^@@$(FAT_OFFSET) ::FLASH/DOSFLASH.EXE $@
## Use the system provided geteltorito script, if there is one
#GETELTORITO := $(shell if type geteltorito >/dev/null; then echo geteltorito; else echo ./geteltorito; fi)
@ -206,6 +211,7 @@ mec-tools/Makefile:
git submodule update --init --remote
mec-tools/mec_encrypt: mec-tools/Makefile
git submodule update
make -C mec-tools
# using function calls to build rules with actions is kind of a hack,
@ -220,7 +226,7 @@ endef
# $1 = FL2 filename
# $2 = ISO image
define rule_iso
$(2): $(1) $(2).bat ; ./slice.insert $(1).slice $(1) $(2) && MTOOLS_SKIP_CHECK=1 mcopy -o -i $(2)@@$(FAT_OFFSET) $(2).bat ::AUTOEXEC.BAT
$(2): $(1) $(2).bat ; ./slice.insert $(1).slice $(1) $(2) && mcopy -o -i $(2)@@$(FAT_OFFSET) $(2).bat ::AUTOEXEC.BAT
endef
#

Loading…
Cancel
Save