aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in60
-rwxr-xr-xwrite_makefile.sh4
2 files changed, 53 insertions, 11 deletions
diff --git a/Makefile.in b/Makefile.in
index 0a02a79..67f2c9c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -15,19 +15,30 @@ SHELL = /bin/sh
VPATH = <<VPATH>>
version = <<VERSION>>
-extension_files = background/ common/ content/ html/ licenses/ copyright \
- icons/haketilo16.png icons/haketilo32.png icons/haketilo48.png \
- icons/haketilo64.png icons/haketilo128.png
+extension_files = background/ common/ content/ html/ licenses/ \
+ copyright default_settings.json manifest.json
+
+metafiles = build.sh configure Makefile.in process_html_file.sh README.txt \
+ re-generate_icons.sh shell_utils.sh upload_amo.sh write_makefile.sh
# Configuration goes here
# The default target: placed up here
default: $(default_target)
-.PHONY: clean mozilla chromium \
+.PHONY: mozilla chromium \
all build_all build_all.zip all_zip \
- default build zip
+ default build zip \
+ install install-html install-dvi install-pdf install-ps uninstall \
+ install-strip clean distclean mostlyclean maintainer-clean TAGS info \
+ dvi html pdf ps dist check installcheck installdirs
+
+# core files
+icons/haketilo16.png: icons/haketilo.svg
+ cd "$(srcdir)" && ./re-generate_icons.sh
+# Use haketilo16.png as an "index" for all the icon PNGs
+# browser-specific targets
all: mozilla chromium
mozilla: build_mozilla build_mozilla.zip
chromium: build_chromium build_chromium.zip
@@ -38,22 +49,53 @@ build_all/: build_mozilla/ build_chromium/
zip: build_$(default_target).zip
build_all.zip all_zip: build_mozilla.zip build_chromium.zip
-build_% build_%/: $(extension_files)
+build_% build_%/: $(extension_files) icons/haketilo16.png
$(srcdir)/build.sh $* $(srcdir) $(UPDATE_URL)
build_%.zip: build_%/
cd $< && zip -q -r ../$@ *
-clean:
- rm -rf build_mozilla build_chromium
- rm -f build_mozilla.zip build_chromium.zip
+# helper targets
+clean mostlyclean:
+ rm -rf build_mozilla build_chromium haketilo-$(version)
+ rm -f build_mozilla.zip build_chromium.zip haketilo-$(version).tar.gz
distclean: clean
rm -f Makefile config.status record.conf
+maintainer-clean: distclean
+ @echo 'This command is intended for maintainers to use; it'
+ @echo 'deletes files that may need special tools to rebuild.'
+ rm -f "$(srcdir)"/icons/*.png
+
+dist: $(extension_files) $(metafiles) icons/haketilo16.png
+ test -d haketilo-$(version) || mkdir haketilo-$(version)
+ for file in $(extension_files) $(metafiles) icons/; do \
+ cp -R "$(srcdir)"/$$file haketilo-$(version); \
+ done
+ tar cf haketilo-$(version).tar haketilo-$(version)
+ gzip haketilo-$(version).tar
+
# Files for constructing the makefile
Makefile: config.status Makefile.in record.conf
./config.status
config.status: write_makefile.sh
cp "$(srcdir)"/write_makefile.sh config.status
+
+# Unused GNU-specified targets
+install install-strip:
+install-html:
+install-dvi:
+install-pdf:
+install-ps:
+uninstall:
+TAGS:
+info:
+dvi:
+html:
+pdf:
+ps:
+check:
+installcheck:
+installdirs:
diff --git a/write_makefile.sh b/write_makefile.sh
index 6aca660..d5c0fa9 100755
--- a/write_makefile.sh
+++ b/write_makefile.sh
@@ -14,10 +14,10 @@
# CC0 1.0 Universal License for more details.
if [ ! -e record.conf ]; then
- echo Record of configuration "'record.conf'" does not exist. >&2
+ echo "Record of configuration 'record.conf' does not exist." >&2
exit 1
elif [ "$(head -n 1 record.conf | cut -c -9)x" != "srcdir = x" ]; then
- echo Record of configuration "'record.conf'" is invalid. >&2
+ echo "Record of configuration 'record.conf' is invalid." >&2
exit 2
fi