bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Makefile.in in subdir not generated


From: Ilya N. Golubev
Subject: Makefile.in in subdir not generated
Date: Wed, 20 Aug 2008 22:43:38 +0400

Versions: 1.10, 1.10.1

`automake' arguments always was:

--gnu

(This seems to not matter.)

Have a package with at least 1 subdirectory.  `Makefile.in' files of
said package in both its top source directory and its subdirectories
are generated by `automake' as above.  They include targets to rebuild
`Makefile.in' from `Makefile.am' (and from other prerequisites).  In
subdirectories commands of these targets always (except very special
cases described below) `exit' before invoking `$(AUTOMAKE)', so never
regenerate `Makefile.in'.

That is, in `src' subdirectory the rule (and its variables) are
generated as follows.

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
        $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
              cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  src/Makefile

The case when the only newer prerequisite is `$(srcdir)/Makefile.am'
is thus that very special case mentioned above when the rule does the
job.  In all other cases the command only updates `am--refresh' target
in top build dir.  The latter does not update `Makefile.in's in
subdirs, so they are never updated.

One obvious case where all prerequisites are newer is when
`$(srcdir)/Makefile.am' does not exist, removed.  Older automakes
would rebuild it (and `Makefile') properly.  These ones do not.

Fixed this in my automake installation.  Posting the patch to
different address, <address@hidden>.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]