* [PATCH] Silence error if globals.h doesn't exist
@ 2015-01-30 16:14 Giuseppe Scrivano
2015-01-30 16:35 ` Andreas Schwab
0 siblings, 1 reply; 6+ messages in thread
From: Giuseppe Scrivano @ 2015-01-30 16:14 UTC (permalink / raw)
To: emacs-devel
a trivial fix, introduced by commit "d703a4dce564ede122f5c307889e4bd0e3f3e75c"
Just "run make clean && make" to see the error while building.
Regards,
Giuseppe
From 04619422fd84beb5abf63f3a990aaba38937b889 Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 30 Jan 2015 17:09:37 +0100
Subject: [PATCH] Silence error if globals.h doesn't exist
---
src/ChangeLog | 4 ++++
src/Makefile.in | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 2130312..735ebb2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-30 Giuseppe Scrivano <gscrivano@gnu.org>
+
+ * Makefile.in (globals.h): Redirect 'cmp' stderr to /dev/null.
+
2015-01-30 Eli Zaretskii <eliz@gnu.org>
* dired.c (read_dirent): Accept an additional argument
diff --git a/src/Makefile.in b/src/Makefile.in
index 2ac34f5..cd661fb 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -498,7 +498,7 @@ gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
$(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) >$@
globals.h: gl-stamp
- $(AM_V_GEN)cmp $< $@ >/dev/null || cp $< $@
+ $(AM_V_GEN)cmp $< $@ >/dev/null 2>&1 || cp $< $@
$(ALLOBJS): globals.h
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Silence error if globals.h doesn't exist
2015-01-30 16:14 [PATCH] Silence error if globals.h doesn't exist Giuseppe Scrivano
@ 2015-01-30 16:35 ` Andreas Schwab
2015-01-30 18:45 ` Giuseppe Scrivano
2015-01-31 3:32 ` Paul Eggert
0 siblings, 2 replies; 6+ messages in thread
From: Andreas Schwab @ 2015-01-30 16:35 UTC (permalink / raw)
To: Giuseppe Scrivano; +Cc: emacs-devel
Giuseppe Scrivano <gscrivano@gnu.org> writes:
> diff --git a/src/Makefile.in b/src/Makefile.in
> index 2ac34f5..cd661fb 100644
> --- a/src/Makefile.in
> +++ b/src/Makefile.in
> @@ -498,7 +498,7 @@ gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
> $(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) >$@
>
> globals.h: gl-stamp
> - $(AM_V_GEN)cmp $< $@ >/dev/null || cp $< $@
> + $(AM_V_GEN)cmp $< $@ >/dev/null 2>&1 || cp $< $@
That should use move-if-change.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Silence error if globals.h doesn't exist
2015-01-30 16:35 ` Andreas Schwab
@ 2015-01-30 18:45 ` Giuseppe Scrivano
2015-01-31 3:32 ` Paul Eggert
1 sibling, 0 replies; 6+ messages in thread
From: Giuseppe Scrivano @ 2015-01-30 18:45 UTC (permalink / raw)
To: Andreas Schwab; +Cc: emacs-devel
Andreas Schwab <schwab@linux-m68k.org> writes:
> Giuseppe Scrivano <gscrivano@gnu.org> writes:
>
>> diff --git a/src/Makefile.in b/src/Makefile.in
>> index 2ac34f5..cd661fb 100644
>> --- a/src/Makefile.in
>> +++ b/src/Makefile.in
>> @@ -498,7 +498,7 @@ gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
>> $(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) >$@
>>
>> globals.h: gl-stamp
>> - $(AM_V_GEN)cmp $< $@ >/dev/null || cp $< $@
>> + $(AM_V_GEN)cmp $< $@ >/dev/null 2>&1 || cp $< $@
>
> That should use move-if-change.
thanks for the review, is OK something like the following?
From 52192756b0969a6f646c5b67206b5192edd153f7 Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 30 Jan 2015 17:09:37 +0100
Subject: [PATCH] Silence error if globals.h doesn't exist
---
src/ChangeLog | 4 ++++
src/Makefile.in | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 2130312..735ebb2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-30 Giuseppe Scrivano <gscrivano@gnu.org>
+
+ * Makefile.in (globals.h): Redirect 'cmp' stderr to /dev/null.
+
2015-01-30 Eli Zaretskii <eliz@gnu.org>
* dired.c (read_dirent): Accept an additional argument
diff --git a/src/Makefile.in b/src/Makefile.in
index 2ac34f5..45cc2f4 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -498,7 +498,7 @@ gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
$(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) >$@
globals.h: gl-stamp
- $(AM_V_GEN)cmp $< $@ >/dev/null || cp $< $@
+ $(AM_V_GEN)${top_srcdir}/build-aux/move-if-change $< $@
$(ALLOBJS): globals.h
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Silence error if globals.h doesn't exist
2015-01-30 16:35 ` Andreas Schwab
2015-01-30 18:45 ` Giuseppe Scrivano
@ 2015-01-31 3:32 ` Paul Eggert
2015-01-31 8:16 ` Andreas Schwab
1 sibling, 1 reply; 6+ messages in thread
From: Paul Eggert @ 2015-01-31 3:32 UTC (permalink / raw)
To: Andreas Schwab, Giuseppe Scrivano; +Cc: emacs-devel
Andreas Schwab wrote:
> That should use move-if-change.
No, because move-if-change would remove gl-stamp, and the time stamp of the
resulting globals.h would be older than the current time. Neither objection is
fatal, but other things being equal it's typically better for ordinary 'make'
actions to not remove files named as Makefile targets, and to have these files'
time stamps be when the files were created.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Silence error if globals.h doesn't exist
2015-01-31 3:32 ` Paul Eggert
@ 2015-01-31 8:16 ` Andreas Schwab
2015-01-31 12:41 ` Giuseppe Scrivano
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2015-01-31 8:16 UTC (permalink / raw)
To: Paul Eggert; +Cc: Giuseppe Scrivano, emacs-devel
Paul Eggert <eggert@cs.ucla.edu> writes:
> Andreas Schwab wrote:
>> That should use move-if-change.
>
> No, because move-if-change would remove gl-stamp,
You need to rearrange the rules first, of course. But reimplementing it
badly is never the right thing to do.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Silence error if globals.h doesn't exist
2015-01-31 8:16 ` Andreas Schwab
@ 2015-01-31 12:41 ` Giuseppe Scrivano
0 siblings, 0 replies; 6+ messages in thread
From: Giuseppe Scrivano @ 2015-01-31 12:41 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Paul Eggert, emacs-devel
Andreas Schwab <schwab@linux-m68k.org> writes:
> Paul Eggert <eggert@cs.ucla.edu> writes:
>
>> Andreas Schwab wrote:
>>> That should use move-if-change.
>>
>> No, because move-if-change would remove gl-stamp,
>
> You need to rearrange the rules first, of course. But reimplementing it
> badly is never the right thing to do.
the cost of that would be to use an additional temporary file, right?
The solution with cmp and cp looks cleaner to me.
Regards,
Giuseppe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-31 12:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-30 16:14 [PATCH] Silence error if globals.h doesn't exist Giuseppe Scrivano
2015-01-30 16:35 ` Andreas Schwab
2015-01-30 18:45 ` Giuseppe Scrivano
2015-01-31 3:32 ` Paul Eggert
2015-01-31 8:16 ` Andreas Schwab
2015-01-31 12:41 ` Giuseppe Scrivano
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).