diff --git a/Makerules b/Makerules
index 31af2cb61d35be98ebdd7a4cd4ad6f236d7130f1..4a3aacb9967ccdc778effa9637a846361843f8aa 100644
--- a/Makerules
+++ b/Makerules
@@ -6,7 +6,7 @@ export TEXINPUTS=.:$(TOP)/tex//:
 FULL:=$(shell basename `pwd`)
 
 # Main file name: only the YYY part
-MAIN:=$(shell echo $(FULL) | cut -d- -f2)
+MAIN:=$(shell echo $(FULL) | cut -d- -f2-)
 
 all: $(MAIN).pdf sync-view