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

winbuild: fix makefile clean #10576

Closed
wants to merge 1 commit into from
Closed

Conversation

jay
Copy link
Member

@jay jay commented Feb 21, 2023

  • Fix and move 'clean' code that removes the output and obj directories trees from MakefileBuild.vc to Makefile.vc.

Prior to this change the 'clean' code did not work right because the variables containing the directory names were not fully initialized and the rmdir syntax was sometimes incorrect (typos). DIRDIST for example was set to ..\builds\ and not ..\builds\$(CONFIG_NAME_LIB)\ so it would remove the former and not the latter. If WITH_PREFIX was set then that directory was removed instead.

Also, DIRDIST (the output directory) even if initialized should not be removed by MakefileBuild.vc because by that time it could be set to a user directory that may contain other files if WITH_PREFIX is set (eg we don't want rmdir /s /q C:\usr\local). Therefore we remove from Makefile.vc before any of that happens. I added a comment in both makefiles explaining this.

Closes #xxxx

- Fix and move 'clean' code that removes the output and obj directories
  trees from MakefileBuild.vc to Makefile.vc.

Prior to this change the 'clean' code did not work right because the
variables containing the directory names were not fully initialized and
the rmdir syntax was sometimes incorrect (typos). DIRDIST for example
was set to ..\builds\ and not ..\builds\$(CONFIG_NAME_LIB)\ so it would
remove the former and not the latter. If WITH_PREFIX was set then that
directory was removed instead.

Also, DIRDIST (the output directory) even if initialized should not be
removed by MakefileBuild.vc because by that time it could be set to a
user directory that may contain other files if WITH_PREFIX is set (eg we
don't want rmdir /s /q C:\usr\local). Therefore we remove from
Makefile.vc before any of that happens. I added a comment in both
makefiles explaining this.

Closes #xxxx
@jay jay added build Windows Windows-specific labels Feb 21, 2023
@jay jay closed this in 80b7f05 Feb 23, 2023
@jay jay deleted the winbuild_fix_make_clean branch February 23, 2023 08:52
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
- Fix and move 'clean' code that removes the output and obj directories
  trees from MakefileBuild.vc to Makefile.vc.

Prior to this change the 'clean' code did not work right because the
variables containing the directory names were not fully initialized and
the rmdir syntax was sometimes incorrect (typos). DIRDIST for example
was set to ..\builds\ and not ..\builds\$(CONFIG_NAME_LIB)\ so it would
remove the former and not the latter. If WITH_PREFIX was set then that
directory was removed instead.

Also, DIRDIST (the output directory) even if initialized should not be
removed by MakefileBuild.vc because by that time it could be set to a
user directory that may contain other files if WITH_PREFIX is set (eg we
don't want rmdir /s /q C:\usr\local). Therefore we remove from
Makefile.vc before any of that happens. I added a comment in both
makefiles explaining this.

Closes curl#10576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Windows Windows-specific
Development

Successfully merging this pull request may close these issues.

1 participant