1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 10:47:59 +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
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
@@ -107,4 +107,5 @@ $(JAR): 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`)
DOCLANG = $(shell basename `pwd` | $(AWK) -F- '{ print ($$1 ~ /^[a-z][a-z]$$/) ? $$1 : "en" }')
ADC_SRC_FILES = $(wildcard *.txt)
ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html)
ADC_DEPS = $(wildcard asciidoc.conf lang-$(DOCLANG).conf)
SRC_FILES = $(wildcard *.txt)
FILES = $(SRC_FILES:%.txt=%.html)
DEPS = $(wildcard asciidoc.conf lang-$(DOCLANG).conf)
DOC_FILES = $(ADC_FILES) version.html
DOC_FILES = $(FILES) version.html
.SILENT:
@@ -50,14 +50,17 @@ check-asciidoc:
@$(ASCIIDOC) --version | $(AWK) '{ exit $$2 !~ /^8\.2\./ }' || \
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)/$@"
# NOTE: asciidoc doesn't source the conf file implicitly when processing stdin
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]\
/' ../../NEWS | ${ASCIIDOC} -f asciidoc.conf -a doctitle=version.html -o version.html -
heading:Version{nbsp}information[version-information]' \
-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)/$@"
$(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)
{
let doc = window.content.document;
let elemTagName = elem.localName.toLowerCase();
if (elemTagName == "frame" || elemTagName == "iframe")
{
elem.contentWindow.focus();
return;
}
else if (elemTagName == "input" && elem.type == "file")
if (elem instanceof HTMLFrameElement || elem instanceof HTMLIFrameElement)
return void elem.contentWindow.focus();
else if (elem instanceof HTMLInputElement && elem.type == "file")
{
openUploadPrompt(elem);
buffer.lastInputField = elem;
@@ -1069,14 +1065,17 @@ function Buffer() //{{{
elem.focus();
let x = 0;
let y = 0;
// for imagemap
if (elemTagName == "area")
[x, y] = elem.getAttribute("coords").split(",").map(Number);
if (elem instanceof HTMLAreaElement)
{
try
{
let [x, y] = elem.getAttribute("coords").split(",").map(parseFloat);
let evt = events.create(doc, "mouseover", { screenX: x, screenY: y });
elem.dispatchEvent(evt);
elem.dispatchEvent(events.create(doc, "mouseover", { screenX: x, screenY: y }));
}
catch (e) {}
}
},
/**
@@ -1197,11 +1196,10 @@ function Buffer() //{{{
options.withContext(function () {
options.setPref("browser.tabs.loadInBackground", true);
["mousedown", "mouseup", "click"].forEach(function (event) {
let evt = events.create(doc, event, {
elem.dispatchEvent(events.create(doc, event, {
screenX: offsetX, screenY: offsetY,
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
function waitForPageLoaded() events.waitForPageLoad();
function waitForPageLoad() events.waitForPageLoad();
// load all macros
// setTimeout needed since io. is loaded after events.
@@ -1011,7 +993,7 @@ function Events() //{{{
break;
// Stop feeding keys if page loading failed.
if (modes.isReplaying && !waitForPageLoaded())
if (modes.isReplaying && !waitForPageLoad())
break;
}
}
@@ -1560,7 +1542,7 @@ function Events() //{{{
input.pendingArgMap = null;
if (key != "<Esc>" && key != "<C-[>")
{
if (modes.isReplaying && !waitForPageLoaded())
if (modes.isReplaying && !waitForPageLoad())
return;
map.execute(null, input.count, key);
}
@@ -1593,7 +1575,7 @@ function Events() //{{{
}
else
{
if (modes.isReplaying && !waitForPageLoaded())
if (modes.isReplaying && !waitForPageLoad())
return void killEvent();
let ret = map.execute(null, input.count);
@@ -1771,10 +1753,25 @@ function Events() //{{{
}
catch (e) {}
liberator.registerObserver("shutdown", function () {
self.destroy();
});
liberator.registerObserver("shutdown", function () { 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("keydown", wrapListener("onKeyUpOrDown"), true);
window.addEventListener("keyup", wrapListener("onKeyUpOrDown"), true);

View File

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