How to run "make" command on a "empty directory"?
Emily Wong
I'm attempting to install something, and the instructions for installation say I have to use MSYS2 to use make on a certain directory to make a .exe file in my C drive.
This directory exists: I already know where it is. However, when putting in commands like cd \MYDIRECTORY && make, (I'm not familiar with the make command yet, keep that in mind...) an error appears:bash: cd: MYDIRECTORY: No such file or directory. Am I typing it wrong? (I followed another question to try and fix it, but I don't understand it...) If so, how can I fix it? Any correct commands I can use?
SCREENSHOT:The instructions on GitHub.
Any feedback relating to this question helps!
Thanks, Omega207
1 Answer
MSYS2 basically gives you a Unix shell (namely
bash), which is different from the Windows commandline.The
&&just allows you two execute two commands in one line. Forget themakefor the moment, concentrate on thecd.cd \MYDIRECTORYis expectingMYDIRECTORYdirectly under the "root" of MSYS2, which is not going to work.Try
cd /cygdrive/c, if that works, then your MSYS2 uses the Cygwin conventions (that's the equivalen of typingC:under the Windows commandline).Now try
cd /cygdrive/c/Users/(USER)/AppData/Local/MYDIRECTORY. If you have spaces in your directory name, this may not work.You can use
pwdto have a look at your current directory.Once you are in the current directory, remember that you need a file called
Makefilein order for the commandmaketo work. If you don't have that, it won't work.If you already used
cdto get into the right directory, you can just typemake(no need for&&, no need for acd).
Also, try working through some bash/Cygwin/MSYS2 tutorial, in order to get familiar with the commandline.