blob: f0d5f249abccf01cc412deb2f86cd1f894807455 (
plain) (
tree)
|
|
#SRC_ZIP_PATH=pristine-private/nasb/historical/nasb.zip
SRC_ZIP_PATH=pristine-private/nasb/NASB-2020-full-07-25-22.zip
MODNAME=NASB
MODNAMEPREV=NASB1995
MODNAMEPATHSEG=nasb
REPO=lockman
SRCNAME=nasb\ 2020\ master\ nocode\ 07-25-22.txt
NOTESNAME=nasb\ 2020\ notes\ master\ nocode\ 07-25-22.txt
all: $(MODNAME).zip
$(MODNAME).zip: modules/texts/ztext/$(MODNAMEPATHSEG)/ot.bzv
zip -r $(MODNAME).zip mods.d modules
modules/texts/ztext/$(MODNAMEPATHSEG)/ot.bzv: combined.osis.xml
mkdir -p modules/texts/ztext/$(MODNAMEPATHSEG)
osis2mod modules/texts/ztext/$(MODNAMEPATHSEG)/ combined.osis.xml -z z -b 4
chmod a+r modules/texts/ztext/$(MODNAMEPATHSEG)/*
combined.osis.xml: src.txt lockosis
./lockosis src.txt notes.txt 2> combined.osis.err > out.xml
xmllint out.xml 2> lint.err > /dev/null
mv out.xml combined.osis.xml
tmp/$(SRCNAME): src.zip
mkdir -p tmp
cd tmp && unzip -uD ../src.zip
cd tmp && touch *
src.txt: tmp/$(SRCNAME)
cd tmp && sed -f ../srcfixes.sed $(SRCNAME) > src-patched.txt
cd tmp && cp src-patched.txt ../src.txt
cd tmp && sed -f ../notes.corrections.sed $(NOTESNAME) > ../notes.txt
src.zip:
scp host.crosswire.org:~swordmod/${SRC_ZIP_PATH} src.zip
$(MODNAME)_previous.zip:
wget "https://crosswire.org/ftpmirror/pub/sword/lockmanpackages/$(MODNAMEPREV).zip" -O $(MODNAME)_previous.zip
tmp/$(MODNAME)_previous.imp: $(MODNAME)_previous.zip generalchanges.sed
cd tmp && rm -rf mods.d modules
cd tmp && unzip -uD ../$(MODNAME)_previous.zip
cd tmp && mod2imp $(MODNAMEPREV) > $(MODNAME)_previous_raw.imp
cd tmp && sed -f ../generalchanges.sed -i $(MODNAME)_previous_raw.imp
cd tmp && sed 's/\([^^]\)\(<[^/]\)/\1\n\2/g' $(MODNAME)_previous_raw.imp > $(MODNAME)_previous.imp
tmp/$(MODNAME).imp: $(MODNAME).zip
cd tmp && rm -rf mods.d modules
cd tmp && unzip -uD ../$(MODNAME).zip
cd tmp && mod2imp $(MODNAME) > $(MODNAME)_raw.imp
cd tmp && sed -f ../generalchanges.sed -i $(MODNAME)_raw.imp
cd tmp && sed 's/\([^^]\)\(<[^/]\)/\1\n\2/g' $(MODNAME)_raw.imp > $(MODNAME).imp
diff: tmp/$(MODNAME).imp tmp/$(MODNAME)_previous.imp
diff -Pu tmp/$(MODNAME)_previous.imp tmp/$(MODNAME).imp > diff; [ $$? -lt 2 ]
deploy: $(MODNAME).zip
scp $(MODNAME).zip host.crosswire.org:/home/ftp/pub/sword/$(REPO)/
clean:
rm -rf combined.osis.* *.o lockosis modules $(MODNAME).zip notes.txt src.txt tmp diff lint.err
distclean: clean
rm -rf src.zip $(MODNAME)_previous.zip
.cpp:
g++ -O0 -g -DHAVESWORD -Wall -Werror `pkg-config --cflags sword` $< -o $@ `pkg-config --libs sword`
|