diff --git a/scripts/make-packaging-target.py b/scripts/make-packaging-target.py
index 1bd31819bcdd403a3a311a0f74077b81bdecc2fa..37bcf94be786b976dee312eeb5804e8422fc7f4e 100755
--- a/scripts/make-packaging-target.py
+++ b/scripts/make-packaging-target.py
@@ -23,11 +23,10 @@
 
 import argparse
 
-target_template = """\
-##
-## Distro: %(distribution)s
-##
-
+template_header = """\
+# -*- mode: makefile -*-
+# This file was auto-generated by: scripts/make-packaging-target.py.
+#
 # We don't simply use jami-packaging-distro as the docker image name because
 # we want to be able to build multiple versions of the same distro at the
 # same time and it could result in race conditions on the machine as we would
@@ -35,6 +34,13 @@ target_template = """\
 #
 # This does not impact caching as the docker daemon does not care about the image
 # names, just about the contents of the Dockerfile.
+"""
+
+target_template = """\
+##
+## Distro: %(distribution)s
+##
+
 PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME:=jami-packaging-%(distribution)s$(RING_PACKAGING_IMAGE_SUFFIX)
 PACKAGE_%(distribution)s_DOCKER_IMAGE_FILE:=.docker-image-$(PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME)
 DOCKER_EXTRA_ARGS =
@@ -313,6 +319,7 @@ def parse_args():
 def main():
     parsed_args = parse_args()
 
+    print(template_header)
     if parsed_args.generate:
         run_generate(parsed_args)
     elif parsed_args.generate_all: