summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJack Rosenthal <jack@rosenth.al>2019-07-08 19:44:16 -0600
committerJack Rosenthal <jack@rosenth.al>2019-07-08 19:44:16 -0600
commit8accc7623ef2a4a11367e1a5d7b01a98686da56d (patch)
treea87625ebfa495a73ec195309f608e01eb324287a /common
parent7a0e2f63a11355cfcaada9b3c4a66a601c87605f (diff)
downloadpentadactyl-8accc7623ef2a4a11367e1a5d7b01a98686da56d.tar.gz
Makefile: cleanup hg usage, realpath, formatting
* We don't use hg, delete the version thingy for that * Delete some sort of hack for systems without the 'realpath' command * Formatting and whitespace Signed-off-by: Jack Rosenthal <jack@rosenth.al>
Diffstat (limited to 'common')
-rw-r--r--common/Makefile22
1 files changed, 3 insertions, 19 deletions
diff --git a/common/Makefile b/common/Makefile
index ec85f276..c1e17b5a 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -19,7 +19,7 @@ OS = $(shell uname -s)
BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S")
BASE = $(TOP)/../common
VERSION ?= $(shell $(SED) -n 's/.*em:version(>|=")(.*)["<].*/\2/p' $(TOP)/install.rdf | sed 1q)
-UUID := $(shell $(SED) -n 's/.*em:id(>|=")(.*)["<].*/\2/p' $(TOP)/install.rdf | sed 1q)
+UUID := $(shell $(SED) -n 's/.*em:id(>|=")(.*)["<].*/\2/p' $(TOP)/install.rdf | sed 1q)
MANGLE := chrome
MOZMILL = mozmill
HOSTAPP_PATH = $(shell which $(HOSTAPP))
@@ -164,28 +164,13 @@ xpi: $(CHROME)
-f $(BASE)/process_config.awk \
"$(TOP)/config.json" >"$(XPI_PATH)/config.json"
- version="$(VERSION)"; \
- hg root >/dev/null 2>&1 && \
- case "$$version" in \
- *pre) version="$$version-hg$$(hg log -r . --template '{rev}')-$$(hg branch)";; \
- esac; \
- $(SED) -e 's/(em:version(>|="))([^"<]+)/\1'"$$version/" \
+ $(SED) -e 's/(em:version(>|="))([^"<]+)/\1$(VERSION)/' \
<"$(TOP)/install.rdf" >"$(XPI_PATH)/install.rdf"
$(MAKE_JAR) "$(XPI)" "$(XPI_BASES)" "$(XPI_DIRS)" "$(XPI_TEXTS)" "$(XPI_BINS)" "$(XPI_FILES)"
rm -r -- $(CHROME)
- @if ! which realpath >/dev/null 2>&1; \
- then realpath() { \
- local IFS="$$(echo)"; \
- local x="$$1"; \
- case "$$x" in \
- /*) ;; \
- *) x=$$(pwd);; \
- esac; \
- }; \
- fi; \
- echo "Built XPI: $$(realpath -s -- $(XPI))"
+ echo "Built XPI: $(shell realpath -s -- $(XPI))"
#### jar
@@ -193,4 +178,3 @@ $(CHROME) $(JAR):
@echo "Packaging chrome..."
$(MAKE_JAR) -r "$(@)" "$(JAR_BASES)" "$(JAR_DIRS)" "$(JAR_TEXTS)" "$(JAR_BINS)" "$(JAR_FILES)"
@echo "SUCCESS: $@"
-