1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-19 04:35:46 +01:00

Petty makefile changes.

This commit is contained in:
Kris Maglione
2009-06-06 23:40:17 -04:00
parent f33100d579
commit 83d7e30b5d
5 changed files with 51 additions and 55 deletions

View File

@@ -7,7 +7,7 @@ BASE = $(TOP)/../common
LOCALEDIR = locale LOCALEDIR = locale
DOC_SRC_FILES = $(wildcard $(LOCALEDIR)/*/*.txt) DOC_SRC_FILES = $(wildcard $(LOCALEDIR)/*/*.txt)
LOCALES = $(foreach locale,$(wildcard $(LOCALEDIR)/*),$(word 2,$(subst /, ,$(locale)))) LOCALES = $(shell ls $(LOCALEDIR))
MAKE_JAR = VERSION="$(VERSION)" DATE="$(BUILD_DATE)" sh $(BASE)/make_jar.sh MAKE_JAR = VERSION="$(VERSION)" DATE="$(BUILD_DATE)" sh $(BASE)/make_jar.sh
@@ -107,4 +107,5 @@ $(JAR): doc
#### doc (see Makefile.doc) #### doc (see Makefile.doc)
doc: $(foreach localetgt,$(LOCALES:%=%.doc),$(addprefix $(LOCALEDIR)/,$(localetgt))) ; doc: $(LOCALES:%=$(LOCALEDIR)/%.doc) ;

View File

@@ -8,11 +8,11 @@ AWK = awk
LOCALE = $(shell basename `pwd`) LOCALE = $(shell basename `pwd`)
DOCLANG = $(shell basename `pwd` | $(AWK) -F- '{ print ($$1 ~ /^[a-z][a-z]$$/) ? $$1 : "en" }') DOCLANG = $(shell basename `pwd` | $(AWK) -F- '{ print ($$1 ~ /^[a-z][a-z]$$/) ? $$1 : "en" }')
ADC_SRC_FILES = $(wildcard *.txt) SRC_FILES = $(wildcard *.txt)
ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html) FILES = $(SRC_FILES:%.txt=%.html)
ADC_DEPS = $(wildcard asciidoc.conf lang-$(DOCLANG).conf) DEPS = $(wildcard asciidoc.conf lang-$(DOCLANG).conf)
DOC_FILES = $(ADC_FILES) version.html DOC_FILES = $(FILES) version.html
.SILENT: .SILENT:
@@ -50,14 +50,17 @@ check-asciidoc:
@$(ASCIIDOC) --version | $(AWK) '{ exit $$2 !~ /^8\.2\./ }' || \ @$(ASCIIDOC) --version | $(AWK) '{ exit $$2 !~ /^8\.2\./ }' || \
echo >&2 "Warning: asciidoc versions other than 8.2.x are unsupported" echo >&2 "Warning: asciidoc versions other than 8.2.x are unsupported"
version.html: ../../NEWS $(BASE)/Makefile.doc $(ADC_DEPS) version.html: ../../NEWS $(BASE)/Makefile.doc $(DEPS)
@echo "DOC locale/$(LOCALE)/$@" @echo "DOC locale/$(LOCALE)/$@"
# NOTE: asciidoc doesn't source the conf file implicitly when processing stdin # NOTE: asciidoc doesn't source the conf file implicitly when processing stdin
sed -e '1i\ sed -e '1i\
heading:Version{nbsp}information[version-information]' -e '/^[0-9]/d' -e '/^ \+\* version /s/.*version \+\([0-9.]\+\).*/section:Version{nbsp}\1[version-\1]\ heading:Version{nbsp}information[version-information]' \
/' ../../NEWS | ${ASCIIDOC} -f asciidoc.conf -a doctitle=version.html -o version.html - -e '/^[0-9]/d' \
-e '/^ \+\* version /s/.*version \+\([0-9.]\+\).*/section:Version{nbsp}\1[version-\1]\
/' ../../NEWS | \
${ASCIIDOC} -f asciidoc.conf -a doctitle=version.html -o version.html -
$(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) $(FILES): %.html: %.txt $(BASE)/Makefile.doc $(DEPS)
@echo "DOC locale/$(LOCALE)/$@" @echo "DOC locale/$(LOCALE)/$@"
$(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(DOCLANG) -a doctitle="$(shell basename $@)" -o $@ $< $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(DOCLANG) -a doctitle="$$(basename $@)" -o $@ $<

View File

@@ -1054,13 +1054,9 @@ function Buffer() //{{{
focusElement: function (elem) focusElement: function (elem)
{ {
let doc = window.content.document; let doc = window.content.document;
let elemTagName = elem.localName.toLowerCase(); if (elem instanceof HTMLFrameElement || elem instanceof HTMLIFrameElement)
if (elemTagName == "frame" || elemTagName == "iframe") return void elem.contentWindow.focus();
{ else if (elem instanceof HTMLInputElement && elem.type == "file")
elem.contentWindow.focus();
return;
}
else if (elemTagName == "input" && elem.type == "file")
{ {
openUploadPrompt(elem); openUploadPrompt(elem);
buffer.lastInputField = elem; buffer.lastInputField = elem;
@@ -1069,14 +1065,17 @@ function Buffer() //{{{
elem.focus(); elem.focus();
let x = 0;
let y = 0;
// for imagemap // for imagemap
if (elemTagName == "area") if (elem instanceof HTMLAreaElement)
[x, y] = elem.getAttribute("coords").split(",").map(Number); {
try
{
let [x, y] = elem.getAttribute("coords").split(",").map(parseFloat);
let evt = events.create(doc, "mouseover", { screenX: x, screenY: y }); elem.dispatchEvent(events.create(doc, "mouseover", { screenX: x, screenY: y }));
elem.dispatchEvent(evt); }
catch (e) {}
}
}, },
/** /**
@@ -1197,11 +1196,10 @@ function Buffer() //{{{
options.withContext(function () { options.withContext(function () {
options.setPref("browser.tabs.loadInBackground", true); options.setPref("browser.tabs.loadInBackground", true);
["mousedown", "mouseup", "click"].forEach(function (event) { ["mousedown", "mouseup", "click"].forEach(function (event) {
let evt = events.create(doc, event, { elem.dispatchEvent(events.create(doc, event, {
screenX: offsetX, screenY: offsetY, screenX: offsetX, screenY: offsetY,
ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey
}); }));
elem.dispatchEvent(evt);
}); });
}); });
}, },

View File

@@ -562,26 +562,8 @@ function Events() //{{{
} }
} }
function wrapListener(method)
{
return function (event) {
try
{
self[method](event);
}
catch (e)
{
if (e.message == "Interrupted")
liberator.echoerr("Interrupted");
else
liberator.echoerr("Processing " + event.type + " event: " + (e.echoerr || e));
liberator.reportError(e);
}
};
}
// return true when load successful, or false otherwise // return true when load successful, or false otherwise
function waitForPageLoaded() events.waitForPageLoad(); function waitForPageLoad() events.waitForPageLoad();
// load all macros // load all macros
// setTimeout needed since io. is loaded after events. // setTimeout needed since io. is loaded after events.
@@ -1011,7 +993,7 @@ function Events() //{{{
break; break;
// Stop feeding keys if page loading failed. // Stop feeding keys if page loading failed.
if (modes.isReplaying && !waitForPageLoaded()) if (modes.isReplaying && !waitForPageLoad())
break; break;
} }
} }
@@ -1560,7 +1542,7 @@ function Events() //{{{
input.pendingArgMap = null; input.pendingArgMap = null;
if (key != "<Esc>" && key != "<C-[>") if (key != "<Esc>" && key != "<C-[>")
{ {
if (modes.isReplaying && !waitForPageLoaded()) if (modes.isReplaying && !waitForPageLoad())
return; return;
map.execute(null, input.count, key); map.execute(null, input.count, key);
} }
@@ -1593,7 +1575,7 @@ function Events() //{{{
} }
else else
{ {
if (modes.isReplaying && !waitForPageLoaded()) if (modes.isReplaying && !waitForPageLoad())
return void killEvent(); return void killEvent();
let ret = map.execute(null, input.count); let ret = map.execute(null, input.count);
@@ -1771,10 +1753,25 @@ function Events() //{{{
} }
catch (e) {} catch (e) {}
liberator.registerObserver("shutdown", function () { liberator.registerObserver("shutdown", function () { self.destroy(); });
self.destroy();
});
function wrapListener(method)
{
return function (event) {
try
{
self[method](event);
}
catch (e)
{
if (e.message == "Interrupted")
liberator.echoerr("Interrupted");
else
liberator.echoerr("Processing " + event.type + " event: " + (e.echoerr || e));
liberator.reportError(e);
}
};
}
window.addEventListener("keypress", wrapListener("onKeyPress"), true); window.addEventListener("keypress", wrapListener("onKeyPress"), true);
window.addEventListener("keydown", wrapListener("onKeyUpOrDown"), true); window.addEventListener("keydown", wrapListener("onKeyUpOrDown"), true);
window.addEventListener("keyup", wrapListener("onKeyUpOrDown"), true); window.addEventListener("keyup", wrapListener("onKeyUpOrDown"), true);

View File

@@ -4,6 +4,3 @@ VERSION = 0.2pre
NAME = xulmus NAME = xulmus
include ../common/Makefile.common include ../common/Makefile.common
foo:
echo $$SHELL