This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: export more plugin headers


Hello Taras,

a couple of comments to your patch (I cannot approve it, nor have read
it full in detail):

* Taras Glek wrote on Mon, Jun 22, 2009 at 08:57:39PM CEST:
> --- a/gcc/cp/Make-lang.in
> +++ b/gcc/cp/Make-lang.in

> @@ -189,6 +190,24 @@ c++.install-man: $(DESTDIR)$(man1dir)/$(
>  	-$(INSTALL_DATA) $< $@
>  	-chmod a-x $@
>  
> +c++.install-plugin: installdirs
> +# We keep the directory structure for files in config and .def files. All
> +# other files are flattened to a single directory.
> +	headers=`echo $(CP_PLUGIN_HEADERS) | tr ' ' '\n' | sort -u`; \
> +	for file in $$headers; do \
> +	  if [ -f $$file ] ; then \
> +	    path=$$file; \
> +	  elif [ -f $(srcdir)/cp/$$file ]; then \
> +	    path=$(srcdir)/cp/$$file; \
> +	  else continue; \
> +	  fi; \
> +	  dest=$(plugin_includedir)/$$file; \
> +	  echo $(INSTALL_DATA) $$path $(DESTDIR)/$$dest; \

No slash after $(DESTDIR) please.

> +	  dir=`dirname $$dest`; \
> +	  $(mkinstalldirs) $$dir; \
> +	  $(INSTALL_DATA) $$path $(DESTDIR)/$$dest; \

Likewise.

> +	done

If it is not expected that CP_PLUGIN_HEADERS live in subdirectories,
have config or .def cfiles, then why not remove the comment and simplify
this to something like this:

c++.install-plugin: installdirs
	$(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
	headers='$(CP_PLUGIN_HEADERS)'; \
	for file in $$headers; do \
	  if [ -f $$file ] ; then \
	    path=$$file; \
	  elif [ -f $(srcdir)/cp/$$file ]; then \
	    path=$(srcdir)/cp/$$file; \
	  else continue; \
	  fi; \
	  dest=$(plugin_includedir)/$$file; \
	  echo $(INSTALL_DATA) $$path $(DESTDIR)$$dest; \
	  $(INSTALL_DATA) $$path $(DESTDIR)$$dest; \
	done


This patch does not ensure that the set of files installed remains
sufficient for compiling plugins against it.

Cheers,
Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]