Skip to content

Makefile: Drop find-godeps.sh for podman target#776

Closed
wking wants to merge 1 commit intocontainers:masterfrom
wking:podman-deps
Closed

Makefile: Drop find-godeps.sh for podman target#776
wking wants to merge 1 commit intocontainers:masterfrom
wking:podman-deps

Conversation

@wking
Copy link
Contributor

@wking wking commented May 15, 2018

We inherited this from a031b83 (Initial checkin from CRI-O repo, 2017-11-01), but:

  • The output is actually going into bin/podman, so Make will rebuild this target every time. You'll never be able to save compilation because the target is newer than all the prerequisites.

  • Make expands prerequisites immediately when loading a Makefile, and on my wimpy Chromebook SD Card, this is slow:

    $ time hack/find-godeps.sh ~/.local/lib/go/src/github.com/projectatomic/libpod cmd/podman github.com/projectatomic/libpod
    ...
    real    0m56.225s
    user    0m44.918s
    sys     0m21.918s
  • Go is pretty good at this on its own, so having make call go build every time will almost certainly be faster than us trying to mimic this in a shell script. And by punting to Go in the recipe, Make invocations that do not need the podman target (e.g. make help) can skip the dependency lookup entirely.

We inherited this from a031b83 (Initial checkin from CRI-O repo,
2017-11-01), but:

* The output is actually going into bin/podman, so Make will rebuild
  this target every time.  You'll never be able to save compilation
  because the target is newer than all the prerequisites.

* Make expands prerequisites immediately when loading a Makefile [1],
  and on my wimpy Chromebook SD Card, this is *slow*:

    $ time hack/find-godeps.sh ~/.local/lib/go/src/github.com/projectatomic/libpod cmd/podman github.com/projectatomic/libpod
    ...
    real    0m56.225s
    user    0m44.918s
    sys     0m21.918s

* Go is pretty good at this on its own, so having make call 'go build'
  every time will almost certainly be faster than us trying to mimic
  this in a shell script.  And by punting to Go in the recipe, Make
  invocations that do not need the podman target (e.g. 'make help')
  can skip the dependency lookup entirely.

[1]: https://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html#Rule-Definition

Signed-off-by: W. Trevor King <[email protected]>
@mheon
Copy link
Member

mheon commented May 15, 2018

LGTM pending tests

@wking
Copy link
Contributor Author

wking commented May 16, 2018

All green.

@rhatdan
Copy link
Member

rhatdan commented May 16, 2018

@rh-atomic-bot r+

@rh-atomic-bot
Copy link
Collaborator

📌 Commit 0480f74 has been approved by rhatdan

@rh-atomic-bot
Copy link
Collaborator

⌛ Testing commit 0480f74 with merge 985eb9a...

@rh-atomic-bot
Copy link
Collaborator

💔 Test failed - status-papr

@rhatdan
Copy link
Member

rhatdan commented May 16, 2018

@rh-atomic-bot retry

@rh-atomic-bot
Copy link
Collaborator

⌛ Testing commit 0480f74 with merge 5b2627d...

@mheon
Copy link
Member

mheon commented May 16, 2018

Network flake... Homu is having problems today.

@rh-atomic-bot
Copy link
Collaborator

☀️ Test successful - status-papr
Approved by: rhatdan
Pushing 5b2627d to master...

@wking wking deleted the podman-deps branch May 17, 2018 00:46
wking added a commit to wking/libpod that referenced this pull request Jun 22, 2018
The API.md and cmd/podman/varlink/ioprojectatomicpodman.go targets
will continue to work regardless of the presence (or not) of 'varlink'
is in BUILDTAGS.  However, cmd/podman/varlink/ioprojectatomicpodman.go
is now only required by the podman target when BUILDTAGS contains
'varlink'.

API.md had also been an podman dependency since 5b2627d (Makefile:
Drop find-godeps.sh for podman target, 2018-05-15, containers#776) when I
expanded varlink_api_generate.  It had been an indirect podman
dependency (via varlink_api_generate) since 2526355 (Generate varlink
API documentation automatically, 2018-05-07, containers#734).  But the podman
executable obviously doesn't depend on the Markdown file, so I'm
removing that dependency here.
baude pushed a commit to baude/podman that referenced this pull request Jun 22, 2018
The API.md and cmd/podman/varlink/ioprojectatomicpodman.go targets
will continue to work regardless of the presence (or not) of 'varlink'
is in BUILDTAGS.  However, cmd/podman/varlink/ioprojectatomicpodman.go
is now only required by the podman target when BUILDTAGS contains
'varlink'.

API.md had also been an podman dependency since 5b2627d (Makefile:
Drop find-godeps.sh for podman target, 2018-05-15, containers#776) when I
expanded varlink_api_generate.  It had been an indirect podman
dependency (via varlink_api_generate) since 2526355 (Generate varlink
API documentation automatically, 2018-05-07, containers#734).  But the podman
executable obviously doesn't depend on the Markdown file, so I'm
removing that dependency here.

Signed-off-by: baude <[email protected]>
rh-atomic-bot pushed a commit that referenced this pull request Jun 24, 2018
some platforms and operating systems do not have varlink.  in those cases,
we need to be able to turn off enablement of varlink in podman. this can now
be done with BUILDTAGS passed to the build though perhaps in the future
will be better.

the default is to build with varlink

Signed-off-by: baude <[email protected]>

squash! make varlink optional for podman

The API.md and cmd/podman/varlink/ioprojectatomicpodman.go targets
will continue to work regardless of the presence (or not) of 'varlink'
is in BUILDTAGS.  However, cmd/podman/varlink/ioprojectatomicpodman.go
is now only required by the podman target when BUILDTAGS contains
'varlink'.

API.md had also been an podman dependency since 5b2627d (Makefile:
Drop find-godeps.sh for podman target, 2018-05-15, #776) when I
expanded varlink_api_generate.  It had been an indirect podman
dependency (via varlink_api_generate) since 2526355 (Generate varlink
API documentation automatically, 2018-05-07, #734).  But the podman
executable obviously doesn't depend on the Markdown file, so I'm
removing that dependency here.

Signed-off-by: baude <[email protected]>

squash! make varlink optional for podman

The command-pointer approach will scale well if/when we add additional
optional commands behind their own build tags, because those tags
won't all be competing for the same getOptionalCommands namespace.

Signed-off-by: W. Trevor King <[email protected]>

Closes: #987
Approved by: rhatdan
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants