summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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