| 1 |
|
| 2 |
SRC = $(shell find lib -name "*.js") |
| 3 |
TM_BUNDLE = editors/Stylus.tmbundle |
| 4 |
|
| 5 |
define DETERMINE_TEXTMATE_BUNDLE_PATH |
| 6 |
cd /tmp && \ |
| 7 |
cp /Applications/TextMate.app/Contents/Info.plist /tmp/textmate-info.plist && \ |
| 8 |
plutil -convert json -r /tmp/textmate-info.plist && \ |
| 9 |
(test `node -e " \ |
| 10 |
var json = $$(cat /tmp/textmate-info.plist | tr "\n" " "); \ |
| 11 |
console.log(json['CFBundleShortVersionString'][0]); \ |
| 12 |
"` -gt 1) && \ |
| 13 |
echo ~/Library/Application\ Support/TextMate/Managed/Bundles || \ |
| 14 |
echo ~/Library/Application\ Support/TextMate/Bundles |
| 15 |
endef |
| 16 |
|
| 17 |
TM_BUNDLE_DEST = $(shell $(DETERMINE_TEXTMATE_BUNDLE_PATH)) |
| 18 |
|
| 19 |
test: |
| 20 |
@npm test |
| 21 |
|
| 22 |
install-bundle: |
| 23 |
mkdir -p "$(TM_BUNDLE_DEST)" |
| 24 |
cp -fr "$(TM_BUNDLE)" "$(TM_BUNDLE_DEST)" |
| 25 |
|
| 26 |
update-bundle: |
| 27 |
cp -fr "$(TM_BUNDLE_DEST)"/Stylus.tmbundle editors |
| 28 |
|
| 29 |
benchmark: |
| 30 |
@node bm.js |
| 31 |
|
| 32 |
.PHONY: test install-bundle update-bundle benchmark |