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

Windows: force use of .exe extension. #2329

Closed
rodwiddowson opened this issue Feb 22, 2018 · 4 comments
Closed

Windows: force use of .exe extension. #2329

rodwiddowson opened this issue Feb 22, 2018 · 4 comments
Labels

Comments

@rodwiddowson
Copy link
Contributor

Over Here @bagder noted (channelling Stefan Kanthak):


--- curl-7.58.0/winbuild/MakefileBuild.vc    2018-01-22 09:55
+++ curl-patch/winbuild/MakefileBuild.vc
@@ -270,1 +270,1 @@
-MANIFESTTOOL = mt -manifest $(DIRDIST)\bin\$(PROGRAM_NAME).manifest -outputresource:$(DIRDIST)\bin\$(PROGRAM_NAME);1
+MANIFESTTOOL = mt.exe -manifest $(DIRDIST)\bin\$(PROGRAM_NAME).manifest -outputresource:$(DIRDIST)\bin\$(PROGRAM_NAME);1



--- curl-7.58.0/winbuild/MakefileBuild.vc    2018-01-22 09:55
+++ curl-patch/winbuild/MakefileBuild.vc
@@ -498,2 +498,2 @@
-$(LIB_DIROBJ)\libcurl.res: $(LIBCURL_SRC_DIR)\libcurl.rc
-rc $(RC_FLAGS)
+$(LIB_DIROBJ)\libcurl.res: $(LIBCURL_SRC_DIR)\libcurl.rc $(LIBCURL_SRC_DIR)\libcurl.manifest ..\curl.ico
+rc.exe $(RC_FLAGS)


RDW notes. I'd suggest that $(MT) and $(RC) would be a better way to go. Also see #2326

@bagder bagder added the build label Feb 23, 2018
@jay
Copy link
Member

jay commented Feb 23, 2018

my $(RC) is just rc and $(MT) is blank. also cl is just cl not cl.exe. I don't know why we would need to specify exe

@rodwiddowson
Copy link
Contributor Author

My suggestion would be to put

RC=rc.exe
MT=mt.exe 

At the top of the makefile.

I think that the threat model here (based on the desire for "call" in another case). Is when someone hijacks your path and puts "mt.bat" or "rc.bat" in front of it. Of course in that case specifying .exe doesn't help, but having this stuff all macro'd away allows one to do things like

RC=$(SomeMagicMsSpecifiedPropertyWhichChangesPerRelease)\bin\rc.exe

@cooljeanius
Copy link
Contributor

Wouldn't it be better to have:

EXEEXT = .exe
RC = rc$(EXEEXT)
MT = mt$(EXEEXT)

That's the way most GNU makefiles do it...

@jay jay closed this as completed in 5fb70ea Feb 23, 2018
@jay
Copy link
Member

jay commented Feb 23, 2018

My suggestion would be to put

RC=rc.exe
MT=mt.exe

At the top of the makefile.

Ok landed in 5fb70ea. Thanks


MT = mt$(EXEEXT)
That's the way most GNU makefiles do it...

Thank you for the suggestion but actually this is a windows specific makefile so we don't have to worry about exeext.

@lock lock bot locked as resolved and limited conversation to collaborators May 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants