build error; missing dependencies on *every* new applet
Denys Vlasenko
vda.linux at googlemail.com
Thu Nov 26 04:42:23 UTC 2009
On Wednesday 25 November 2009 18:55, Bernhard Reutner-Fischer wrote:
> Perhaps we could be gentle to distros and move generation of autoconf.h
> out of it's current place, so they can easily control if they can make
> -j safely? Perhaps something like this hack (although this might just
> paper over instead if fixing it for real, works for me though):
>
> diff --git a/Makefile b/Makefile
> index 3a49a69..8174814 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -504,8 +504,18 @@ include $(srctree)/Makefile.flags
> # with it and forgot to run make oldconfig.
> # If kconfig.d is missing then we are probarly in a cleaned tree so
> # we execute the config step to be sure to catch updated Kconfig files
> +#
> +# For filesystems that lack nanosecond precision stat mtime, you can
> +# pass in BUILD_FILESYSTEM_HAS_NO_NSEC_STAT=something
> +# to force include/autoconf.h to be unambiguously newer than any of
> +# its prerequisites.
> include/autoconf.h: .kconfig.d .config
> $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
> +ifneq ($(BUILD_FILESYSTEM_HAS_NO_NSEC_STAT),)
> + $(Q)sleep 2
> +endif
> + $(Q)cat .tmpconfig.h > $@
> + $(Q)rm .tmpconfig.h
>
> else
> # Dummy target needed, because used as prerequisite
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index 9365a12..7610381 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -555,7 +555,7 @@ int conf_write(const char *name)
> fclose(out);
> if (out_h) {
> fclose(out_h);
> - rename(".tmpconfig.h", "include/autoconf.h");
> + /* bbox: rename(".tmpconfig.h", "include/autoconf.h.out");*/
> }
> if (!name || basename != conf_def_filename) {
> if (!name)
>
>
> so they could
> case `stat -f -c %T $BB_BUILDDIR` in
> ext2*) NO_NSEC=indeed;;
> *) NO_NSEC="";;
> esac
> make BUILD_FILESYSTEM_HAS_NO_NSEC_STAT=$NO_NSEC ....
> >
> >The rules which generate .config-dependent files may be tweaked
> >by just adding "sleep 1" there, thus any later .config change
> >will get mtime strictly bigger than generated files' mtimes.
I think the fix in this commit is simpler:
http://git.busybox.net/busybox/commit/?id=fa1e7177fbd442f15e31cf96113b582753764de7
--
vda
More information about the busybox
mailing list