summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-02-27 13:02:48 +0100
committerRicardo Wurmus <rekado@elephly.net>2017-02-27 16:17:32 +0100
commit813a36f62c8c410941efa761662f312f85fc5774 (patch)
tree53c409d80f1fdf455f3bcaf8c80729daa7eda26a
parentf20ba240dd47775111cd8474be94c142cda7eb17 (diff)
Add hack to find stafftab-engraver.scm
-rw-r--r--stafftab.ly11
1 files changed, 8 insertions, 3 deletions
diff --git a/stafftab.ly b/stafftab.ly
index 9063fb4..6c15367 100644
--- a/stafftab.ly
+++ b/stafftab.ly
@@ -1,6 +1,11 @@
-%% TODO: this relative path won't be correct unless make is run from
-%% within one of the song directories
-#(load "../stafftab-engraver.scm")
+%% This is a hack. The relative path works when building, say,
+%% "01-song1", but it fails when building a specific part,
+%% e.g. "01-song1/parts/keys.pdf". With this expression we try one
+%% path first and move on to the next relative path if that happens to
+%% fail. This is really gross, but it works. ¯\_(ツ)_/¯
+#(or (false-if-exception (load "stafftab-engraver.scm"))
+ (false-if-exception (load "../stafftab-engraver.scm"))
+ (load "../../stafftab-engraver.scm"))
%% tunings for 12-string Chapman Stick
\makeDefaultStringTuning #'stick-classic-tuning