--- a/doc/manpages/conf.py
+++ b/doc/manpages/conf.py
@@ -91,7 +91,7 @@
 
 # extract version information, installation location, other stuff we need to
 # use when building final documents
-val = re.compile('^S\["([^"]+)"\]="(.*)"$')
+val = re.compile(r'^S\["([^"]+)"\]="(.*)"$')
 try:
     with open("../../config.status", "r") as cfgstatus:
         for ln in cfgstatus.readlines():
--- a/doc/user/conf.py
+++ b/doc/user/conf.py
@@ -94,7 +94,7 @@
 
 # extract version information, installation location, other stuff we need to
 # use when building final documents
-val = re.compile('^S\["([^"]+)"\]="(.*)"$')
+val = re.compile(r'^S\["([^"]+)"\]="(.*)"$')
 try:
     with open("../../config.status", "r") as cfgstatus:
         for ln in cfgstatus.readlines():
--- a/python/makefile.py
+++ b/python/makefile.py
@@ -52,7 +52,7 @@
                 "grep",
                 "-l",
                 "-P",
-                "^#\s*include.*_clippy.c",
+                "^#\\s*include.*_clippy.c",
                 "--",
                 "**.c",
             ]
@@ -91,7 +91,7 @@
 autoderp = "#AUTODERP# "
 out_lines = []
 bcdeps = []
-make_rule_re = re.compile("^([^:\s]+):\s*([^:\s]+)\s*($|\n)")
+make_rule_re = re.compile(r"^([^:\s]+):\s*([^:\s]+)\s*($|\n)")
 
 while lines:
     line = lines.pop(0)
