diff --git a/Makerules b/Makerules
index 18f5149f7741a65ef3f98fe35a820b4222af5075..62a41e7f44e407e70b888aa7e854e739d24d17c6 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