开发者

Calling an executable by a different name

开发者 https://www.devze.com 2023-01-23 18:36 出处:网络
I installed QT for windows, and it uses mingw. There it has this mingw32-make, but I would like to be able to just call make whenever I want to use it..开发者_StackOverflow社区 as it is rather long to

I installed QT for windows, and it uses mingw. There it has this mingw32-make, but I would like to be able to just call make whenever I want to use it..开发者_StackOverflow社区 as it is rather long to type that. Anyone know how to do this?

I know I can make a copy of mingw32-make, and rename it make in order to get something to work, but that is just so lame. Is there a more elegant way.

Ted.


Create a batch file on your PATH (I put mine in c:\MinGW\bin) called make.bat with the following contents:

mingw32-make %*

The %* enables you to pass arguments to the mingw32-make command.

Thanks to a2j for pointing me in the right direction here.


Create a batch file that is in your "PATH" that calls the mingw32-make file for you.


If you use windows command prompt ( C:\xxx\> ), use the good old doskey tricks. Add this to your msys.bat / cygwin.bat (or type it manually)

DOSKEY make=mingw32-make $*

and you can use make instead of mingw32-make.

If you use the bash shell (admin@computer ~$), edit ~/.bashrc, add this line:

alias make=mingw32-make
0

精彩评论

暂无评论...
验证码 换一张
取 消