Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Separate Makefile targets for relative and absolute RPM paths#5703

Merged
ocket8888 merged 2 commits intoapache:masterfrom
zrhoffman:makefile-completion
Apr 2, 2021
Merged

Separate Makefile targets for relative and absolute RPM paths#5703
ocket8888 merged 2 commits intoapache:masterfrom
zrhoffman:makefile-completion

Conversation

@zrhoffman
Copy link
Member

What does this PR (Pull Request) do?

Before #5653, you could build a single RPM by running make cache/traffic_ops_ort.rpm or make traffic_monitor/traffic_monitor.rpm, etc. and these Makefile targets were available to shell completion.
As of #5653, no RPM targets are completable in the shell and the only completable targets are the phony ones: all, build-builders, clean, debug, native, nearly-all, pull-builders, and very-clean.
This PR re-adds completion for those relative RPM targets but does not add them to the all target.

  • This PR is not related to any Issue

Which Traffic Control components are affected by this PR?

  • CDN in a Box

What is the best way to verify this PR?

In the CDN in a Box directory:

  • Run make to verify that the all target still works
  • Run make traffic_ops/traffic_ops.rpm and verify that the RPM ends up at infrastructure/cdn-in-a-box/traffic_ops/traffic_ops.rpm

In the main project directory:

  • Run make -f infrastructure/cdn-in-a-box/Makefile traffic_ops/traffic_ops.rpm and verify that the RPM ends up at infrastructure/cdn-in-a-box/traffic_ops/traffic_ops.rpm and not traffic_ops/traffic_ops.rpm

If this is a bug fix, what versions of Traffic Control are affected?

The following criteria are ALL met by this PR

  • Building RPMs for CDN in a Box and building/running CDN in a Box itself is a sufficient test for the CiaB Makefile
  • Bugfix, documentation is unnecessary
  • An update to CHANGELOG.md is unnecessary
  • This PR includes any and all required license headers
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

@zrhoffman zrhoffman added regression bug a bug in existing functionality introduced by a new version cdn-in-a-box related to the Docker-based CDN-in-a-Box system labels Apr 1, 2021
@ocket8888
Copy link
Contributor

For the record, after #5653 you can still make individual RPMs, even if shell completions have a hard time with it

@zrhoffman
Copy link
Member Author

For the record, after #5653 you can still make individual RPMs, even if shell completions have a hard time with it

Not with the same command, I can't. This is what I get:

[user@computer cdn-in-a-box]$ make traffic_ops/traffic_ops.rpm
make: *** No rule to make target 'traffic_ops/traffic_ops.rpm'.  Stop.

make $(realpath traffic_ops/traffic_ops.rpm) works, but that takes awhile to type because there's no shell completion.

@ocket8888
Copy link
Contributor

What's your make version? Works fine for me:

$ make traffic_ops/traffic_ops.rpm
make: Nothing to be done for 'traffic_ops/traffic_ops.rpm'.
$

@zrhoffman
Copy link
Member Author

What's your make version? Works fine for me:

$ make traffic_ops/traffic_ops.rpm
make: Nothing to be done for 'traffic_ops/traffic_ops.rpm'.
$

Yes, but remove traffic_ops/traffic_ops.rpm and try again.

I'm using GNU Make 4.3

@ocket8888
Copy link
Contributor

oh, you're right. Man, that's weird...

@zrhoffman zrhoffman changed the title Add Makefile RPM target aliases Separate Makefile targets for relative and absolute RPM paths Apr 2, 2021
@zrhoffman zrhoffman force-pushed the makefile-completion branch from fc200a5 to 49f6884 Compare April 2, 2021 03:34
@zrhoffman
Copy link
Member Author

Force-pushed to reword the commit message

Copy link
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works fine, and if there are any negative consequences to having multiple (identical) recipes for the same file, I can't think what they are.

@ocket8888 ocket8888 merged commit 3533432 into apache:master Apr 2, 2021
@zrhoffman zrhoffman deleted the makefile-completion branch April 3, 2021 20:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cdn-in-a-box related to the Docker-based CDN-in-a-Box system regression bug a bug in existing functionality introduced by a new version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants