• How compile GNU make from sources?

    From Borneq@21:1/5 to All on Wed Dec 5 15:20:22 2018
    I can't see make list on https://lists.gnu.org/mailman/listinfo
    I have download make source tarball and if I try compile I have error: glob/libglob.a(glob.o): In function `glob': /home/user/Downloads/make-4.2/glob/glob.c:581: undefined reference to `__alloca' glob/libglob.a(glob.o):/home/user/Downloads/make-4.2/glob/glob.c:732:
    more undefined references to `__alloca' follow

    I want compile it from sources bacause I ant prepare it do not rebuild
    all after git commits.
    Make has one big disadvatage: after git commit of project, whole project
    is rebuild.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Borneq@21:1/5 to All on Wed Dec 5 19:02:52 2018
    W dniu 05.12.2018 o 18:37, Tauno Voipio pisze:
    I want compile it from sources bacause I ant prepare it do not rebuild
    all after git commits.
    Make has one big disadvatage: after git commit of project, whole
    project is rebuild.


    You may be barking up the wrong tree here: To force Make to rebuild
    the whole kit and caboodle, GIT seeems to change the modification
    timestamps of the files. It cannot be solved by changing Make.


    I think, git not changes timestamps of my *.cpp files on commit, only on checkout (if I change branch)
    Make looks to .git directory and timestamp of any git file is changed.
    If I previously use ninja, no any *.cpp file was changes, buf "explain"
    give me

    EXPLAIN("recorded mtime of %s older than most recent input %s (%d vs %d)"... and
    EXPLAIN("command line changed for %s", output->path().c_str());

    if I comment this, only changed *.cpp file was build

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tauno Voipio@21:1/5 to Borneq on Wed Dec 5 19:37:08 2018
    On 5.12.18 16:20, Borneq wrote:
    I can't see make list on https://lists.gnu.org/mailman/listinfo
    I have download make source tarball and if I try compile I have error: glob/libglob.a(glob.o): In function `glob': /home/user/Downloads/make-4.2/glob/glob.c:581: undefined reference to `__alloca' glob/libglob.a(glob.o):/home/user/Downloads/make-4.2/glob/glob.c:732:
    more undefined references to `__alloca' follow

    I want compile it from sources bacause I ant prepare it do not rebuild
    all after git commits.
    Make has one big disadvatage: after git commit of project, whole project
    is rebuild.


    You may be barking up the wrong tree here: To force Make to rebuild
    the whole kit and caboodle, GIT seeems to change the modification
    timestamps of the files. It cannot be solved by changing Make.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tauno Voipio@21:1/5 to Borneq on Wed Dec 5 20:21:30 2018
    On 5.12.18 20:02, Borneq wrote:
    W dniu 05.12.2018 o 18:37, Tauno Voipio pisze:
    I want compile it from sources bacause I ant prepare it do not
    rebuild all after git commits.
    Make has one big disadvatage: after git commit of project, whole
    project is rebuild.


    You may be barking up the wrong tree here: To force Make to rebuild
    the whole kit and caboodle, GIT seeems to change the modification
    timestamps of the files. It cannot be solved by changing Make.


    I think, git not changes timestamps of my *.cpp files on commit, only on checkout (if I change branch)
    Make looks to .git directory and timestamp of any git file is changed.
    If I previously use ninja, no any *.cpp file was changes, buf "explain"
    give me

    EXPLAIN("recorded mtime of %s older than most recent input %s (%d vs
    %d)"...
    and
    EXPLAIN("command line changed for %s", output->path().c_str());

    if I comment this, only changed *.cpp file was build

    Your makefile is bad, if it looks at or into .git directory.
    Make should use timestamps of the dependencies only.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rainer Weikusat@21:1/5 to Borneq on Wed Dec 5 18:18:07 2018
    Borneq <borneq@antyspam.hidden.pl> writes:
    W dniu 05.12.2018 o 18:37, Tauno Voipio pisze:
    I want compile it from sources bacause I ant prepare it do not
    rebuild all after git commits.
    Make has one big disadvatage: after git commit of project, whole
    project is rebuild.


    You may be barking up the wrong tree here: To force Make to rebuild
    the whole kit and caboodle, GIT seeems to change the modification
    timestamps of the files. It cannot be solved by changing Make.


    I think, git not changes timestamps of my *.cpp files on commit, only
    on checkout (if I change branch)

    git doesn't preserve file timestamps of versioned files, these get
    whatever timestamp is current when being checked out. That's supposed to
    be a feature. This can be problematic if some versioned files could also
    be recreated by a Make-using build system: If the repository is large
    enough or happens at a 'bad' time, the source files may end up being
    newer than the generated files.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Borneq@21:1/5 to All on Wed Dec 5 20:28:01 2018
    W dniu 05.12.2018 o 19:21, Tauno Voipio pisze:
    Your makefile is bad, if it looks at or into .git directory.
    Make should use timestamps of the dependencies only.

    because
    # The top-level source directory on which CMake was run.
    CMAKE_SOURCE_DIR = /home/user/projects/project_name
    ?

    project_name contains .git and several directories: app, lib, test..

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Borneq@21:1/5 to All on Wed Dec 5 21:30:01 2018
    W dniu 05.12.2018 o 19:21, Tauno Voipio pisze:
    Your makefile is bad, if it looks at or into .git directory.
    Make should use timestamps of the dependencies only.

    I have created test project
    https://gitlab.com/andrzejbor/test_rebuild_all
    after commit is rebuild whole project
    what I might change?
    I don't want moving all but .git to one directory src/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tauno Voipio@21:1/5 to Borneq on Wed Dec 5 22:43:14 2018
    On 5.12.18 21:28, Borneq wrote:
    W dniu 05.12.2018 o 19:21, Tauno Voipio pisze:
    Your makefile is bad, if it looks at or into .git directory.
    Make should use timestamps of the dependencies only.

    because
    # The top-level source directory on which CMake was run.
    CMAKE_SOURCE_DIR = /home/user/projects/project_name
    ?

    project_name contains .git and several directories: app, lib, test..


    You did ask about GNU Make, which is NOT CMake.
    Please do not change the target during discussion.

    Try again with the real thing.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rainer Weikusat@21:1/5 to Tauno Voipio on Wed Dec 5 23:07:14 2018
    Tauno Voipio <tauno.voipio@notused.fi.invalid> writes:
    On 5.12.18 21:28, Borneq wrote:
    W dniu 05.12.2018 o 19:21, Tauno Voipio pisze:
    Your makefile is bad, if it looks at or into .git directory.
    Make should use timestamps of the dependencies only.

    because
    # The top-level source directory on which CMake was run.
    CMAKE_SOURCE_DIR = /home/user/projects/project_name
    ?

    project_name contains .git and several directories: app, lib, test..


    You did ask about GNU Make, which is NOT CMake.
    Please do not change the target during discussion.

    Try again with the real thing.

    He already mentioned that he was using CMake generated Makefile.
    This suggests that the problem is really with CMake/ the way CMake is
    being used, and that the "compile GNU make from source" was just a (very
    likely wrong-headed) attempt at a solution.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)