From 9e2a2d38f45c45e455df04c20147bca5ebf078ce Mon Sep 17 00:00:00 2001
From: teor <teor@torproject.org>
Date: Tue, 5 Nov 2019 11:56:14 +1000
Subject: [PATCH] Makefile: Fix "make autostyle" for out-of-tree builds

Fixes bug 32370; bugfix on 0.4.1.2-alpha.
---
 Makefile.am      | 8 ++++----
 changes/bug32370 | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)
 create mode 100644 changes/bug32370

diff --git a/Makefile.am b/Makefile.am
index 9866f87f8c..8b2772577f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -488,19 +488,19 @@ version:
 
 .PHONY: autostyle-ifdefs
 autostyle-ifdefs:
-	$(PYTHON) scripts/maint/annotate_ifdef_directives.py $(OWNED_TOR_C_FILES)
+	$(PYTHON) $(top_srcdir)/scripts/maint/annotate_ifdef_directives.py $(OWNED_TOR_C_FILES)
 
 .PHONY: autostyle-ifdefs
 autostyle-operators:
-	$(PERL) scripts/coccinelle/test-operator-cleanup $(OWNED_TOR_C_FILES)
+	$(PERL) $(top_srcdir)/scripts/coccinelle/test-operator-cleanup $(OWNED_TOR_C_FILES)
 
 .PHONY: rectify-includes
 rectify-includes:
-	$(PYTHON) scripts/maint/rectify_include_paths.py
+	$(PYTHON) $(top_srcdir)/scripts/maint/rectify_include_paths.py
 
 .PHONY: update-copyright
 update-copyright:
-	$(PERL) scripts/maint/updateCopyright.pl $(OWNED_TOR_C_FILES)
+	$(PERL) $(top_srcdir)/scripts/maint/updateCopyright.pl $(OWNED_TOR_C_FILES)
 
 .PHONY: autostyle
 autostyle: update-versions rustfmt autostyle-ifdefs rectify-includes
diff --git a/changes/bug32370 b/changes/bug32370
new file mode 100644
index 0000000000..9e450d9612
--- /dev/null
+++ b/changes/bug32370
@@ -0,0 +1,3 @@
+  o Minor bugfixes (build):
+    - Fix "make autostyle" for out-of-tree builds.
+      Fixes bug 32370; bugfix on 0.4.1.2-alpha.
-- 
GitLab