Discussion:
How compile GNU make from sources?
(too old to reply)
Borneq
2018-12-05 14:20:22 UTC
Permalink
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.
Tauno Voipio
2018-12-05 17:37:08 UTC
Permalink
Post by Borneq
I can't see make list on https://lists.gnu.org/mailman/listinfo
/home/user/Downloads/make-4.2/glob/glob.c:581: undefined reference to
`__alloca'
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
Borneq
2018-12-05 18:02:52 UTC
Permalink
Post by Tauno Voipio
Post by Borneq
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
Rainer Weikusat
2018-12-05 18:18:07 UTC
Permalink
Post by Borneq
Post by Tauno Voipio
Post by Borneq
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.
Tauno Voipio
2018-12-05 18:21:30 UTC
Permalink
Post by Borneq
Post by Tauno Voipio
Post by Borneq
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
Borneq
2018-12-05 19:28:01 UTC
Permalink
Post by Tauno Voipio
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..
Tauno Voipio
2018-12-05 20:43:14 UTC
Permalink
Post by Borneq
Post by Tauno Voipio
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
Rainer Weikusat
2018-12-05 23:07:14 UTC
Permalink
Post by Tauno Voipio
Post by Borneq
Post by Tauno Voipio
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.

Borneq
2018-12-05 20:30:01 UTC
Permalink
Post by Tauno Voipio
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/
Continue reading on narkive:
Loading...