[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] top/maint.mk (indent): Run twice to produce idempotent results.
From: |
Simon Josefsson |
Subject: |
[PATCH] top/maint.mk (indent): Run twice to produce idempotent results. |
Date: |
Thu, 29 Apr 2010 08:47:24 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
I've pushed this. It appears to be a well known problem that GNU Indent
is not idempotent when run once on code, but it appears to be idempotent
when run twice. This is a maintainer target, so performance should not
be a significant factor (and running indent on even large projects is
quite fast anyway).
/Simon
---
ChangeLog | 4 ++++
top/maint.mk | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 65d06ef..db345d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-29 Simon Josefsson <address@hidden>
+
+ * top/maint.mk (indent): Run twice to produce idempotent results.
+
2010-04-28 Bruno Haible <address@hidden>
getdate: Generate getdate.c in the source directory.
diff --git a/top/maint.mk b/top/maint.mk
index ed41389..6389c38 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1127,10 +1127,12 @@ refresh-po:
echo 'address@hidden' >> $(PODIR)/LINGUAS && \
ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >>
$(PODIR)/LINGUAS
+ # Running indent once is not idempotent, but running it twice is.
INDENT_SOURCES ?= $(C_SOURCES)
.PHONY: indent
indent:
indent $(INDENT_SOURCES)
+ indent $(INDENT_SOURCES)
# If you want to set UPDATE_COPYRIGHT_* environment variables,
# put the assignments in this variable.
--
1.7.0.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] top/maint.mk (indent): Run twice to produce idempotent results.,
Simon Josefsson <=