0

Without further due and apologizing in case of RTFM is in order...

With this makefile:

aaa:
        @echo "aaa"

bbb:
        @echo "bbb"

.PHONY: aaa bbb

Shouldn't a "make bbb" output "bbb"?? I keep getting "aaa"

Can't a recipe be called directly? Reading the manual it seams like a direct call "make clean" can be made

Also I already checked that recipe indentation is a tab and not spaces

Should "make bbb" print "bbb"? Any idea why I'm getting "aaa"??

TIA

Simon Richter
  • 28,572
  • 1
  • 42
  • 64
RuiFortes
  • 183
  • 4
  • 13
  • You are correct about what `make bbb` will do. Given this makefile there's no way running `make bbb` will print `aaa`. There's some difference between what you're really doing and what you've described here. – MadScientist Feb 24 '14 at 12:14
  • I really have no idea og what might be happening. I using windows 7 64bits and installed cygwin 64 bits also. I open the command windows on the folder containing the makefile, do a "DOSKey make=C:\cygwin64\bin\make.exe" and call "make bbb" and I get an "aaa" output. – RuiFortes Feb 25 '14 at 22:09
  • I don't know what those things are (_DOSKey_ etc.) If you're using the cygwin version of make, you need to invoke it from the cygwin shell. This is true for all Cygwin tools: they are not plain native Windows applications; they only work in a Cygwin environment. You cannot run them from command.com. Probably what's happening is that the argument (`bbb`) is not being passed to the make command line properly, so `make` just runs the first target. If you want to run make from the native Windows command window you should get the MinGW version of GNU make, not the cygwin version. – MadScientist Feb 25 '14 at 22:32
  • Thanks MadScientist. Using Cygwin shell does work. Trying your MinGW now. The thing that sent me in the cygwin directions was this [post](http://stackoverflow.com/questions/9779700/mocha-requires-make-cant-find-a-make-exe-that-works-on-windows). Because I had paths using square brackets I tried reproducing PowerShell Set-Alias with DOSKey – RuiFortes Feb 26 '14 at 12:41

0 Answers0