2021-11-21 10:23:21 +01:00
|
|
|
.PHONY : all help clean veryclean librewolf-patches check librewolf
|
2021-11-19 18:41:54 +01:00
|
|
|
|
2021-11-20 10:51:32 +01:00
|
|
|
|
2021-12-29 06:05:25 +01:00
|
|
|
version:=$(shell cat ./version)
|
|
|
|
release:=$(shell cat ./release)
|
2021-11-19 18:41:54 +01:00
|
|
|
|
2021-11-19 20:46:23 +01:00
|
|
|
|
|
|
|
## simplistic archive format selection
|
2021-12-29 06:05:25 +01:00
|
|
|
|
|
|
|
#archive_create=tar cfJ
|
|
|
|
#ext=.tar.xz
|
2021-11-20 11:07:22 +01:00
|
|
|
archive_create=tar cfz
|
|
|
|
ext=.tar.gz
|
2021-11-19 20:46:23 +01:00
|
|
|
#archive_create=zip -r9
|
|
|
|
#ext=.zip
|
|
|
|
|
|
|
|
|
2021-12-29 06:05:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
help : README.md
|
2021-12-28 00:55:58 +01:00
|
|
|
|
2021-11-20 11:07:22 +01:00
|
|
|
@echo "use: make [all] [check] [clean] [veryclean]"
|
2021-11-19 18:41:54 +01:00
|
|
|
@echo ""
|
2021-12-29 06:05:25 +01:00
|
|
|
@echo " all - Make librewolf source archive ${version}-${release}."
|
2021-11-20 11:07:22 +01:00
|
|
|
@echo " check - Check if there is a new version of Firefox."
|
2021-11-19 18:41:54 +01:00
|
|
|
@echo ""
|
2021-11-20 11:07:22 +01:00
|
|
|
@echo " clean - Clean everything except the upstream firefox tarball."
|
|
|
|
@echo " veryclean - Clean everything and the firefox tarball."
|
2021-11-21 10:23:21 +01:00
|
|
|
@echo " librewolf - like 'make all' but after that extract and build it."
|
2021-12-29 06:05:25 +01:00
|
|
|
@echo ""
|
2021-11-19 18:41:54 +01:00
|
|
|
|
|
|
|
|
2021-12-29 06:05:25 +01:00
|
|
|
check : README.md
|
2021-12-28 00:55:58 +01:00
|
|
|
@python3 scripts/update-version.py
|
2021-12-29 06:31:33 +01:00
|
|
|
@echo "Current release:" $$(cat ./release)
|
|
|
|
@make --no-print-directory -q README.md
|
2021-11-19 18:41:54 +01:00
|
|
|
|
|
|
|
|
2021-12-29 06:05:25 +01:00
|
|
|
all : librewolf-$(version)-$(release).source$(ext) README.md
|
2021-11-19 20:46:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
clean :
|
2021-12-29 06:05:25 +01:00
|
|
|
rm -rf *~ firefox-$(version) librewolf-$(version) librewolf-$(version)-$(release).source$(ext)
|
2021-11-19 20:46:23 +01:00
|
|
|
|
2021-11-20 10:51:32 +01:00
|
|
|
|
2021-11-19 20:46:23 +01:00
|
|
|
veryclean : clean
|
|
|
|
rm -f firefox-$(version).source.tar.xz
|
2021-11-25 16:21:29 +01:00
|
|
|
rm -rf librewolf-$(version)
|
2021-11-19 20:46:23 +01:00
|
|
|
|
2021-11-20 10:51:32 +01:00
|
|
|
|
2021-11-20 11:07:22 +01:00
|
|
|
firefox-$(version).source.tar.xz :
|
2021-11-19 20:46:23 +01:00
|
|
|
wget -q https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz
|
|
|
|
|
2021-11-20 10:51:32 +01:00
|
|
|
|
2021-12-29 06:05:25 +01:00
|
|
|
librewolf-$(version)-$(release).source$(ext) : firefox-$(version).source.tar.xz ./version ./release scripts/librewolf-patches.py assets/mozconfig assets/patches.txt
|
2021-11-19 20:46:23 +01:00
|
|
|
rm -rf firefox-$(version) librewolf-$(version)
|
|
|
|
tar xf firefox-$(version).source.tar.xz
|
|
|
|
mv firefox-$(version) librewolf-$(version)
|
2021-12-28 01:15:35 +01:00
|
|
|
python3 scripts/librewolf-patches.py $(version)
|
2021-12-29 06:05:25 +01:00
|
|
|
rm -f librewolf-$(version)-$(release).source$(ext)
|
|
|
|
$(archive_create) librewolf-$(version)-$(release).source$(ext) librewolf-$(version)
|
2021-11-19 20:46:23 +01:00
|
|
|
rm -rf librewolf-$(version)
|
2021-11-21 10:23:21 +01:00
|
|
|
|
2021-12-29 06:05:25 +01:00
|
|
|
librewolf-$(version) : librewolf-$(version)-$(release).source$(ext)
|
|
|
|
tar xf librewolf-$(version)-$(release).source$(ext)
|
2021-11-25 16:24:55 +01:00
|
|
|
|
2021-11-25 16:32:03 +01:00
|
|
|
librewolf : librewolf-$(version)
|
2021-12-28 00:55:58 +01:00
|
|
|
(cd librewolf-$(version) && ./mach build && ./mach package)
|
2021-12-29 06:05:25 +01:00
|
|
|
|
|
|
|
README.md : README.md.in ./version ./release
|
2021-12-29 06:17:59 +01:00
|
|
|
@sed "s/__VERSION__/$(version)/g" < $< > tmp
|
|
|
|
@sed "s/__RELEASE__/$(release)/g" < tmp > $@
|
|
|
|
@rm -f tmp
|
2021-12-29 06:05:25 +01:00
|
|
|
|