This is the mail archive of the automake@gnu.org mailing list for the automake 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]

Install failures are ignored


Hello!

I have found that "make install" ignores failures in "install".  This
happens with version 1.6.3, but the CVS version has the same problem.

Failure (non-zero exit code) of a command inside a "for" loop doesn't make 
"for" fail.

Patch against CVS:

ChangeLog:
	* lib/am/progs.am: Exit in case of install failure, otherwise
	it is ignored because of the surrounding "for" loop.

=================================
diff -u -r1.39 progs.am
--- lib/am/progs.am	22 Jul 2002 17:00:44 -0000	1.39
+++ lib/am/progs.am	23 Aug 2002 21:39:10 -0000
@@ -52,9 +52,9 @@
 ## lossage if the install program doesn't have a name that libtool
 ## expects.
 ?LIBTOOL?	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
-?LIBTOOL?	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+?LIBTOOL?	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f || exit 1; \
 ?!LIBTOOL?	   echo " $(INSTALL_PROGRAM_ENV) $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
-?!LIBTOOL?	   $(INSTALL_PROGRAM_ENV) $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+?!LIBTOOL?	   $(INSTALL_PROGRAM_ENV) $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f || exit 1; \
 	  else :; fi; \
 	done
 endif %?INSTALL%
=================================

By the way, that "else :" at the end is probably useless, since it's in
the "for"  loop too, so the failures of "if" would be ignored.

-- 
Regards,
Pavel Roskin




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