russellallen / self

Making the world safe for objects
http://selflanguage.org
698 stars 75 forks source link

Doing two "make" one-after-the-other still rebuilds part of the project #123

Closed shlomif closed 7 years ago

shlomif commented 7 years ago

Hi!

On Mageia Linux x86-64 v7, I am getting this:

shlomif@telaviv1:~/Download/unpack/prog/self/b$ make
[  1%] Creating /home/shlomif/Download/unpack/prog/self/b/incls/vmDate.cpp
[  1%] Built target create_vmDate
[  2%] Built target makeDeps
Scanning dependencies of target Self
[  2%] Building CXX object vm/CMakeFiles/Self.dir/__/incls/vmDate.cpp.o
[  3%] Linking CXX executable Self
[ 93%] Built target Self
[ 93%] Built target rself
[ 93%] Built target AddTrailingNewline
[ 94%] Built target runBinary
[ 97%] Built target shellscripts
[ 97%] Built target cmprev
[ 98%] Built target zap
[ 98%] Built target dangling
[ 99%] Built target isLink
[100%] Built target linked
shlomif@telaviv1:~/Download/unpack/prog/self/b$ make
[  1%] Creating /home/shlomif/Download/unpack/prog/self/b/incls/vmDate.cpp
[  1%] Built target create_vmDate
[  2%] Built target makeDeps
Scanning dependencies of target Self
[  2%] Building CXX object vm/CMakeFiles/Self.dir/__/incls/vmDate.cpp.o
[  3%] Linking CXX executable Self
[ 93%] Built target Self
[ 93%] Built target rself
[ 93%] Built target AddTrailingNewline
[ 94%] Built target runBinary
[ 97%] Built target shellscripts
[ 97%] Built target cmprev
[ 98%] Built target zap
[ 98%] Built target dangling
[ 99%] Built target isLink
[100%] Built target linked
shlomif@telaviv1:~/Download/unpack/prog/self/b$

this is with git master and with cmake ... Please try to reproduce and fix it,

russellallen commented 7 years ago

This is expected behaviour as the VM is timestamped so vmDate.cpp is being compiled and the whole VM then linked. What is the concern?

shlomif commented 7 years ago

@russellallen : thanks for the reply.

My reasons for reporting this bug are:

  1. Doing it this way consumes more time and resources.

  2. Normally people expect that the last few make invocations will not do anything. This is the intuitive behaviour - see https://www.joelonsoftware.com/2001/10/24/user-interface-design-for-programmers/ .

  3. It may break some build systems that rely on such behaviour (don't know).

russellallen commented 7 years ago

Thanks shlomif, you are right that a reproducible build of the VM could be useful but for the moment we don't have the bandwidth to do it properly. I'll put this on the someday pile though,