diff --git a/share/Makefile.dynamic b/share/Makefile.dynamic
index b3d8db7e64f4cba93b38ccd7bd7df5a6bdaabcf0..95ae1346a4989d7e6932f4cdb29967e8afaa80f1 100644
--- a/share/Makefile.dynamic
+++ b/share/Makefile.dynamic
@@ -248,9 +248,9 @@ endif # PLUGIN_ENABLE <> no
 ##########
 
 .PHONY: merlin_plugin
-merlin_plugin::
+merlin_plugin:
 #create Merlin file for external plug-in
-	$(PRINT_MAKING) $@
+	$(PRINT_MAKING) .merlin
 	echo "FLG -c $(FLAGS) $(FRAMAC_USER_MERLIN_FLAGS)" > .merlin
 	echo "B $(FRAMAC_LIBDIR)" >> .merlin
 	echo "B $(FRAMAC_LIBDIR)/plugins" >> .merlin
@@ -260,6 +260,12 @@ merlin_plugin::
 	for PKG in $(MERLIN_PACKAGES); do echo PKG $$PKG >> .merlin; done
 	for DIR in $(patsubst %/,%,$(sort $(dir $(PLUGIN_ML_SRC) $(PLUGIN_TESTS_LIB)))); do echo S $$DIR>> .merlin; echo B $$DIR >> .merlin; done
 
+# To allow completion of .merlin file
+.PHONY: merlin
+merlin:: merlin_plugin
+
+.merlin: merlin
+
 ############
 # Cleaning #
 ############