This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] header tweaks
- From: Phil Edwards <phil at jaj dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, law at redhat dot com, pme at gcc dot gnu dot org
- Date: Tue, 26 Mar 2002 23:19:23 -0500
- Subject: Re: [v3] header tweaks
- References: <200203270412.g2R4ChY27173@fillmore.constant.com>
> *************** stamp-bits: ${bits_headers}
> *** 324,330 ****
> (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
> echo `date` > stamp-bits
>
> ! stamp-c_base: ${c_base_headers} ${c_base_headers_extra}
> @if [ ! -d "${c_base_builddir}" ]; then \
> mkdir -p ${c_base_builddir} ;\
> fi ;\
> --- 324,330 ----
> (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
> echo `date` > stamp-bits
>
> ! stamp-c_base: ${c_base_headers} ${c_base_headers_extra}
> @if [ ! -d "${c_base_builddir}" ]; then \
> mkdir -p ${c_base_builddir} ;\
> fi ;\
What changed?
> *************** stamp-c_base: ${c_base_headers} ${c_base
> *** 332,338 ****
> official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
> @LN_S@ $$h ./$${official_name} || true ;\
> done) ;\
> ! (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra} . || true) ;\
> echo `date` > stamp-c_base
>
> stamp-backward: ${backward_headers}
> --- 332,340 ----
> official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
> @LN_S@ $$h ./$${official_name} || true ;\
> done) ;\
> ! if [ ! -z "${c_base_headers_extra}" ]; then \
> ! (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra} . || true) ;\
> ! fi ;\
> echo `date` > stamp-c_base
>
> stamp-backward: ${backward_headers}
That looks good.
> *************** install-data-local:
> *** 434,441 ****
> for file in ${c_base_headers_rename}; do \
> $(INSTALL_DATA) ${c_base_builddir}/$${file} \
> ${gxx_include_dir}/${c_base_builddir}; done
> ! for file in ${c_base_headers_extra}; do \
> ! $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
> $(INSTALL) -d ${gxx_include_dir}/${std_builddir}
> for file in ${std_headers_rename}; do \
> $(INSTALL_DATA) ${std_builddir}/$${file} \
> --- 436,444 ----
> for file in ${c_base_headers_rename}; do \
> $(INSTALL_DATA) ${c_base_builddir}/$${file} \
> ${gxx_include_dir}/${c_base_builddir}; done
> ! c_base_headers_extra_install=${c_base_headers_extra};\
> ! for file in $$c_base_headers_extra_install; do \
> ! $(INSTALL_DATA) $$file ${gxx_include_dir}/${bits_builddir}; done
> $(INSTALL) -d ${gxx_include_dir}/${std_builddir}
> for file in ${std_headers_rename}; do \
> $(INSTALL_DATA) ${std_builddir}/$${file} \
I've seen this before -- assigning to a new variable and then looping
over the variable -- but I've never understood exactly what it buys us.
If the original variable is empty, won't the 'for' loop also see an empty
list (i.e., the same syntax error we're trying to avoid)?
But it seems to work everywhere else I've seen it. :-) Just don't ask me how.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams