Compile error with unresolved string replacement?
Darren Tucker
dtucker at dtucker.net
Tue Aug 30 21:19:13 AEST 2022
On Sun, Aug 28, 2022 at 06:44:41PM -0700, Larry Ploetz wrote:
> Oh, seems so obvious in retrospect. It used to be that the error message
> suggested running autoreconf (config, make), but since I didn't get that
> message I didn't think to run autoreconf.
>
> Thanks - worked!
You're welcome.
We have a check in configure the will error out if configure.ac is newer
than configure. We could potentially do something similar in Makefile
for the files created by configure eg below, but having tried it briefly
I don't think we should do this.
This is because configure will not replace files like Makefile or config.h
if they are unchanged from the previous run (which is desirable behaviour
most of the time), but that also means that when configure is updated in
a way that doesn't change the output, rerunning it will never allow it
to pass the check.
diff --git a/Makefile.in b/Makefile.in
index 778c66cf..f839f0ea 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -198,6 +198,14 @@ LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
$(LIBCOMPAT): always
(cd openbsd-compat && $(MAKE))
always:
+ for src in configure Makefile.in openbsd-compat/Makefile.in; do \
+ for gen in config.h Makefile openbsd-compat/Makefile; do \
+ if test "$$gen" -ot "$(srcdir)/$$src"; then \
+ echo Warning: $$gen older than configure, rerun configure; \
+ exit 1; \
+ fi \
+ done \
+ done
libssh.a: $(LIBSSH_OBJS)
$(AR) rv $@ $(LIBSSH_OBJS)
--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list