Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix replace-rtl ordering problem #1444

Merged
merged 1 commit into from Feb 28, 2023
Merged

Fix replace-rtl ordering problem #1444

merged 1 commit into from Feb 28, 2023

Conversation

nandor
Copy link
Contributor

@nandor nandor commented Feb 28, 2023

Not all sub-rules build the directory and replace-rtl failed if trying to copy the driver first.

Related PRs / Issues

UI / API Impact

Verilog / AGFI Compatibility

Contributor Checklist

  • Is this PR's title suitable for inclusion in the changelog and have you added a changelog:<topic> label?
  • Did you add Scaladoc/docstring/doxygen to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous prints/debugging code?
  • Did you state the UI / API impact?
  • Did you specify the Verilog / AGFI compatibility impact?
  • If applicable, did you regenerate and publicly share default AGFIs?
  • If applicable, did you apply the ci:fpga-deploy label?
  • If applicable, did you apply the Please Backport label?

Reviewer Checklist (only modified by reviewer)

Note: to run CI on PRs from forks, comment @Mergifyio copy main and manage the change from the new PR.

  • Is the title suitable for inclusion in the changelog and does the PR have a changelog:<topic> label?
  • Did you mark the proper release milestone?
  • Did you check whether all relevant Contributor checkboxes have been checked?

Not all sub-rules build the directory and replace-rtl failed if trying to copy the driver first.
@nandor nandor added the changelog:fixed Put PR title in 'Fixed' section of changelog label Feb 28, 2023
Comment on lines 45 to 47
$(fpga_driver_dir)/$(DESIGN)-$(PLATFORM): $($(PLATFORM))
mkdir -p $(@D)
cp -f $< $@
Copy link
Collaborator

Choose a reason for hiding this comment

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

$(fpga_build_dir) $(fpga_driver_dir) $(verif_dir) $(repo_state):
        mkdir -p $@

$(fpga_driver_dir)/$(DESIGN)-$(PLATFORM): $($(PLATFORM)) | $(fpga_driver_dir)
	cp -f $< $@

This can be avoided by factoring the directory into it's on order-only dep. What you've done is fine to make forward progress but it would probably be better to factor the mkdir out into a pattern rule with clear deps defined.

@nandor nandor merged commit e0569ff into main Feb 28, 2023
@nandor nandor deleted the mkdir-fix branch February 28, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:fixed Put PR title in 'Fixed' section of changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants