2021-11-19 14:46:23 -05:00
|
|
|
.PHONY : all help clean veryclean fetch extract librewolf-patches check init
|
2021-11-19 12:41:54 -05:00
|
|
|
|
|
|
|
version_file=./version
|
|
|
|
version:=$(shell cat $(version_file))
|
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
|
|
|
|
## simplistic archive format selection
|
|
|
|
archive_create=tar cfJ
|
|
|
|
ext=.tar.xz
|
|
|
|
#archive_create=tar cfz
|
|
|
|
#ext=.tar.gz
|
|
|
|
#archive_create=zip -r9
|
|
|
|
#ext=.zip
|
|
|
|
|
|
|
|
|
2021-11-19 12:41:54 -05:00
|
|
|
|
|
|
|
help :
|
2021-11-19 14:46:23 -05:00
|
|
|
@echo "use: make [all] [check] [clean] [veryclean] [init]"
|
2021-11-19 12:41:54 -05:00
|
|
|
@echo ""
|
2021-11-19 14:46:23 -05:00
|
|
|
@echo " all - make librewolf source archive ${version}."
|
2021-11-19 12:41:54 -05:00
|
|
|
@echo " check - check if there is a new version of Firefox."
|
|
|
|
@echo ""
|
2021-11-19 13:07:31 -05:00
|
|
|
@echo " clean - clean everything except the upstream firefox tarball."
|
|
|
|
@echo " veryclean - clean everything and the firefox tarball."
|
2021-11-19 12:41:54 -05:00
|
|
|
@echo ""
|
2021-11-19 13:07:31 -05:00
|
|
|
@echo " init - set up local build environment, takes a long time."
|
2021-11-19 12:41:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Keeping ./version up to date.
|
|
|
|
#
|
|
|
|
|
|
|
|
check :
|
|
|
|
@python3 assets/update-version.py
|
|
|
|
|
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
|
|
|
|
|
2021-11-19 12:41:54 -05:00
|
|
|
#
|
2021-11-19 14:46:23 -05:00
|
|
|
# init: run 'bootstrap.py' build environment setup tool on local machine
|
2021-11-19 12:41:54 -05:00
|
|
|
#
|
|
|
|
|
|
|
|
init :
|
|
|
|
wget -q "https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py"
|
|
|
|
python3 bootstrap.py --no-interactive --application-choice=browser
|
|
|
|
rm -rf bootstrap.py mozilla-unified
|
2021-11-19 14:46:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all : librewolf-$(version).source$(ext)
|
|
|
|
|
|
|
|
|
|
|
|
clean :
|
|
|
|
rm -rf *~ firefox-$(version) librewolf-$(version) librewolf-$(version).source$(ext) work
|
|
|
|
|
|
|
|
veryclean : clean
|
|
|
|
rm -f firefox-$(version).source.tar.xz
|
|
|
|
|
|
|
|
fetch :
|
|
|
|
rm -f firefox-$(version).source.tar.xz
|
|
|
|
make firefox-$(version).source.tar.xz
|
|
|
|
|
|
|
|
firefox-$(version).source.tar.xz :
|
|
|
|
wget -q https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz
|
|
|
|
|
|
|
|
# we take this extra step seperatly because it's so important.
|
|
|
|
librewolf-patches :
|
|
|
|
rm -rf work && mkdir -p work
|
|
|
|
python3 assets/librewolf-patches.py $(version)
|
|
|
|
rm -rf work
|
|
|
|
|
|
|
|
librewolf-$(version).source$(ext) : firefox-$(version).source.tar.xz $(version_file) assets/librewolf-patches.py assets/build-librewolf.py assets/mozconfig assets/patches.txt
|
|
|
|
rm -rf firefox-$(version) librewolf-$(version)
|
|
|
|
tar xf firefox-$(version).source.tar.xz
|
|
|
|
mv firefox-$(version) librewolf-$(version)
|
|
|
|
make librewolf-patches
|
|
|
|
rm -f librewolf-$(version).source$(ext)
|
|
|
|
$(archive_create) librewolf-$(version).source$(ext) librewolf-$(version)
|
|
|
|
rm -rf librewolf-$(version)
|