[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mutilated stdlib.h
From: |
Bruno Haible |
Subject: |
Re: Mutilated stdlib.h |
Date: |
Sat, 2 Apr 2011 18:50:57 +0200 |
User-agent: |
KMail/1.9.9 |
Ralf Wildenhues wrote:
> if you have a rule to rebuild the
> header, but configure decides that your system is now good enough to
> cope without, the .Po files still record the dependency on the old
> replacement header, and that causes 'make' to invoke the rebuild rule.
>
> It seems to me that all of these should be fixable: output the rule when
> the header is to be built, otherwise don't. This can be done with an
> automake conditional.
So, for example, you would propose to change modules/byteswap from
BUILT_SOURCES += $(BYTESWAP_H)
# We need the following in order to create <byteswap.h> when the system
# doesn't have one.
byteswap.h: byteswap.in.h
$(AM_V_GEN)rm -f address@hidden $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat $(srcdir)/byteswap.in.h; \
} > address@hidden && \
mv -f address@hidden $@
MOSTLYCLEANFILES += byteswap.h byteswap.h-t
to
BUILT_SOURCES += $(BYTESWAP_H)
# We need the following in order to create <byteswap.h> when the system
# doesn't have one.
if GNULIB_GENERATED_BYTESWAP_H
byteswap.h: byteswap.in.h
$(AM_V_GEN)rm -f address@hidden $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat $(srcdir)/byteswap.in.h; \
} > address@hidden && \
mv -f address@hidden $@
endif
MOSTLYCLEANFILES += byteswap.h byteswap.h-t
But in that situation, when configuration decides that the system is
now good enough, the generated byteswap.h will stay on disk. "make"
will work fine, but garbage will stay in the working directory until the
next "make clean" - which may be a long time. Wouldn't it be better to
remove the byteswap.h file, and rely on the empty dummy rule in the *.Po
file? That is, I would propose to do
BUILT_SOURCES += $(BYTESWAP_H)
# We need the following in order to create <byteswap.h> when the system
# doesn't have one.
if GNULIB_GENERATED_BYTESWAP_H
byteswap.h: byteswap.in.h
$(AM_V_GEN)rm -f address@hidden $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat $(srcdir)/byteswap.in.h; \
} > address@hidden && \
mv -f address@hidden $@
else
byteswap.h:
rm -f $@
endif
MOSTLYCLEANFILES += byteswap.h byteswap.h-t
Bruno
--
In memoriam Karol Wojtyla <http://en.wikipedia.org/wiki/Karol_Wojtyla>
- Re: Mutilated stdlib.h, (continued)
- Re: Mutilated stdlib.h, Bruno Haible, 2011/04/01
- Re: Mutilated stdlib.h, Ralf Wildenhues, 2011/04/02
- Re: Mutilated stdlib.h, Bruno Haible, 2011/04/02
- Re: Mutilated stdlib.h, Ralf Wildenhues, 2011/04/03
- Re: Mutilated stdlib.h, Ralf Wildenhues, 2011/04/03
- Re: Mutilated stdlib.h, Ralf Wildenhues, 2011/04/02
- Re: Mutilated stdlib.h,
Bruno Haible <=
- Re: Mutilated stdlib.h, Ralf Wildenhues, 2011/04/03
- Re: Mutilated stdlib.h, Bruno Haible, 2011/04/03
- Re: Mutilated stdlib.h, Bruno Haible, 2011/04/05
- Re: Mutilated stdlib.h, Jim Meyering, 2011/04/06
Re: Mutilated stdlib.h, Bruno Haible, 2011/04/01
- Re: Mutilated stdlib.h, Ralf Wildenhues, 2011/04/02
- Re: not breaking "make" after m4 macros and source files changed, Bruno Haible, 2011/04/02
- Re: not breaking "make" after m4 macros and source files changed, Stefano Lattarini, 2011/04/03
- Re: not breaking "make" after m4 macros and source files changed, Ralf Wildenhues, 2011/04/03
- Re: not breaking "make" after m4 macros and source files changed, Stefano Lattarini, 2011/04/03