This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
avoid creating include as file
- To: gcc-patches at gcc dot gnu dot org
- Subject: avoid creating include as file
- From: DJ Delorie <dj at delorie dot com>
- Date: Wed, 15 Mar 2000 15:53:56 -0500
It happened to me that the Makefile didn't create the include
directory before running the step that fills it (not sure if it was my
fault or gcc's). The first "cp $$file include" created a *file*
called include. With this proposed change, it will still fail in
those rare cases, but at least it will be more easily recoverable and
will fail in a more sane way, in that it will report "include/.: no
such directory" instead of, on the next pass, "include/stdarg.h: not a
directory"
2000-03-15 DJ Delorie <dj@delorie.com>
* Makefile.in: Make sure "include" isn't accidentally created
as a file.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.402
diff -c -3 -p -r1.402 Makefile.in
*** Makefile.in 2000/03/14 18:36:17 1.402
--- Makefile.in 2000/03/15 20:39:35
*************** stmp-int-hdrs: $(STMP_FIXINC) $(USER_H)
*** 2152,2158 ****
realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
touch include/$$realfile; \
rm -f include/$$realfile; \
! cp $$file include; \
chmod a+r include/$$realfile; \
fi; \
done
--- 2152,2158 ----
realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
touch include/$$realfile; \
rm -f include/$$realfile; \
! cp $$file include/.; \
chmod a+r include/$$realfile; \
fi; \
done