[patch, mips] Fix parallel build on MIPS

Steve Ellcey sellcey@mips.com
Tue Sep 3 16:58:00 GMT 2013


On Sun, 2013-09-01 at 15:05 -0400, Mike Frysinger wrote:
> On Friday 30 August 2013 11:04:02 Steve Ellcey wrote:
> > --- a/libgloss/mips/Makefile.in
> > +++ b/libgloss/mips/Makefile.in
> > @@ -202,7 +202,8 @@ distclean maintainer-clean realclean: clean
> >  .PHONY: install info install-info clean-info
> >  install:
> >  	@for file in $(CRT0) $(PCRT0) $(BSP); do \
> > -	  $(INSTALL_DATA) $${file} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
> > +	  mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
> > +	  $(INSTALL_DATA) $${file}
> > $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${file}; \
> 
> shouldn't the mkdir be done outside of the for loop ?
> -mike

I suppose so.  The targets I was copying (epiphany, libnosys) do it
inside the loop too.  This doesn't cause any problems because of the
'-p' option to mkdir which says to return no error if the directory
already exists.  But there is no reason for it to be in the loop so
here is a patch with the mkdir in front of the loop.

Steve Ellcey
sellcey@mips.com


2013-09-03  Steve Ellcey  <sellcey@mips.com>

	* mips/Makefile.in (install): Add mkdir, fix install command.



diff --git a/libgloss/mips/Makefile.in b/libgloss/mips/Makefile.in
index 2042e48..8fb145c 100644
--- a/libgloss/mips/Makefile.in
+++ b/libgloss/mips/Makefile.in
@@ -201,8 +201,9 @@ distclean maintainer-clean realclean: clean
 
 .PHONY: install info install-info clean-info
 install:
+	mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
 	@for file in $(CRT0) $(PCRT0) $(BSP); do \
-	  $(INSTALL_DATA) $${file} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
+	  $(INSTALL_DATA) $${file} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${file}; \
 	done
 	@for script in ${SCRIPTS}; do\
 	  $(INSTALL_DATA) ${srcdir}/$${script}.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${script}.ld; \





More information about the Newlib mailing list