* [PATCH] libcc1: Clean compiler-name.h (PR70173)
@ 2016-04-04 12:36 Segher Boessenkool
2016-04-11 1:44 ` Segher Boessenkool
0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2016-04-04 12:36 UTC (permalink / raw)
To: gcc-patches; +Cc: Segher Boessenkool
Since the file is generated from a Makefile fragment, it needs to be
added to MOSTLYCLEANFILES. The directory itself is still not deleted
(just like the gnattools and gotools directories).
Tested on powerpc64-linux, --enable-languages=all,ada,go,obj-c++ ,
followed by "make distclean". Is this okay for trunk?
Segher
2016-04-04 Segher Boessenkool <segher@kernel.crashing.org>
libcc1/
PR bootstrap/70173
* Makefile.am (MOSTLYCLEANFILES): New, add compiler-name.h .
(compiler-name.h): Shorten recipe so that it fits the line.
* Makefile.in: Regenerate.
---
libcc1/Makefile.am | 3 ++-
libcc1/Makefile.in | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
index 7a274b3..b40820b 100644
--- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am
@@ -44,11 +44,12 @@ cc1lib_LTLIBRARIES = libcc1.la
endif
BUILT_SOURCES = compiler-name.h
+MOSTLYCLEANFILES = compiler-name.h
# Put this in a header so we don't run sed for each compilation. This
# is also simpler to debug as one can easily see the constant.
compiler-name.h: Makefile
- echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > compiler-name.h
+ echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > $@
shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 9e00368..79d39d3 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
@@ -296,6 +296,7 @@ cc1libdir = $(libdir)/$(libsuffix)
@ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
@ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
BUILT_SOURCES = compiler-name.h
+MOSTLYCLEANFILES = compiler-name.h
shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
marshall.cc marshall.hh rpc.hh status.hh
@@ -563,6 +564,7 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
@@ -672,7 +674,7 @@ override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
# Put this in a header so we don't run sed for each compilation. This
# is also simpler to debug as one can easily see the constant.
compiler-name.h: Makefile
- echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > compiler-name.h
+ echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libcc1: Clean compiler-name.h (PR70173)
2016-04-04 12:36 [PATCH] libcc1: Clean compiler-name.h (PR70173) Segher Boessenkool
@ 2016-04-11 1:44 ` Segher Boessenkool
2016-04-11 6:58 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2016-04-11 1:44 UTC (permalink / raw)
To: gcc-patches
Ping?
Segher
On Mon, Apr 04, 2016 at 12:36:32PM +0000, Segher Boessenkool wrote:
> Since the file is generated from a Makefile fragment, it needs to be
> added to MOSTLYCLEANFILES. The directory itself is still not deleted
> (just like the gnattools and gotools directories).
>
> Tested on powerpc64-linux, --enable-languages=all,ada,go,obj-c++ ,
> followed by "make distclean". Is this okay for trunk?
>
>
> Segher
>
>
> 2016-04-04 Segher Boessenkool <segher@kernel.crashing.org>
>
> libcc1/
> PR bootstrap/70173
> * Makefile.am (MOSTLYCLEANFILES): New, add compiler-name.h .
> (compiler-name.h): Shorten recipe so that it fits the line.
> * Makefile.in: Regenerate.
>
> ---
> libcc1/Makefile.am | 3 ++-
> libcc1/Makefile.in | 4 +++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
> index 7a274b3..b40820b 100644
> --- a/libcc1/Makefile.am
> +++ b/libcc1/Makefile.am
> @@ -44,11 +44,12 @@ cc1lib_LTLIBRARIES = libcc1.la
> endif
>
> BUILT_SOURCES = compiler-name.h
> +MOSTLYCLEANFILES = compiler-name.h
>
> # Put this in a header so we don't run sed for each compilation. This
> # is also simpler to debug as one can easily see the constant.
> compiler-name.h: Makefile
> - echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > compiler-name.h
> + echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > $@
>
>
> shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
> diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
> index 9e00368..79d39d3 100644
> --- a/libcc1/Makefile.in
> +++ b/libcc1/Makefile.in
> @@ -296,6 +296,7 @@ cc1libdir = $(libdir)/$(libsuffix)
> @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
> @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
> BUILT_SOURCES = compiler-name.h
> +MOSTLYCLEANFILES = compiler-name.h
> shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
> marshall.cc marshall.hh rpc.hh status.hh
>
> @@ -563,6 +564,7 @@ install-strip:
> "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
> fi
> mostlyclean-generic:
> + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
>
> clean-generic:
>
> @@ -672,7 +674,7 @@ override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
> # Put this in a header so we don't run sed for each compilation. This
> # is also simpler to debug as one can easily see the constant.
> compiler-name.h: Makefile
> - echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > compiler-name.h
> + echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > $@
>
> # Tell versions [3.59,3.63) of GNU make to not export all variables.
> # Otherwise a system limit (for SysV at least) may be exceeded.
> --
> 1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libcc1: Clean compiler-name.h (PR70173)
2016-04-11 1:44 ` Segher Boessenkool
@ 2016-04-11 6:58 ` Jakub Jelinek
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2016-04-11 6:58 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: gcc-patches
On Sun, Apr 10, 2016 at 08:44:20PM -0500, Segher Boessenkool wrote:
> Ping?
Ok for stage4.
> > 2016-04-04 Segher Boessenkool <segher@kernel.crashing.org>
> >
> > libcc1/
> > PR bootstrap/70173
> > * Makefile.am (MOSTLYCLEANFILES): New, add compiler-name.h .
> > (compiler-name.h): Shorten recipe so that it fits the line.
> > * Makefile.in: Regenerate.
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-11 6:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04 12:36 [PATCH] libcc1: Clean compiler-name.h (PR70173) Segher Boessenkool
2016-04-11 1:44 ` Segher Boessenkool
2016-04-11 6:58 ` Jakub Jelinek
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).