The target pattern does not contain "%". Makefile

I searched for this problem on google, but I have no way to solve the problem yet. I have 2 Makefiles: one example and one as a file. Example:

BINDDIR=/src/binding XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild PROJECT_ROOT=XMBindingLibrarySample PROJECT=$(PROJECT_ROOT)/XMBindingLibrarySample.xcodeproj TARGET=XMBindingLibrarySample BTOUCH=/Developer/MonoTouch/usr/bin/btouch XMBindingLibrary.dll libXMBindingLibrarySample-i386.a: $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator -configuration Release clean build -mv $(PROJECT_ROOT)/build/Release-iphonesimulator/lib$(TARGET).a $@ libXMBindingLibrarySample-armv6.a: $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch armv6 -configuration Release clean build -mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@ libXMBindingLibrarySample-armv7.a: $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch armv7 -configuration Release clean build -mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@ libXMBindingLibrarySampleUniversal.a: libXMBindingLibrarySample-armv7.a libXMBindingLibrarySample-i386.a lipo -create -output $@ $^ XMBindingLibrary.dll: AssemblyInfo.cs XMBindingLibrarySample.cs extras.cs libXMBindingLibrarySampleUniversal.a $(BTOUCH) -unsafe --outdir=tmp -out: $@ XMBindingLibrarySample.cs -x=AssemblyInfo.cs -x=extras.cs --link-with=libXMBindingLibrarySampleUniversal.a,libXMBindingLibrarySampleUniversal.a clean: -rm -f *.a *.dll 

My file:

 BTOUCH=/Developer/MonoTouch/usr/bin/btouch BINDDIR=/src/binding XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild PROJECT_ROOT=IIViewDeckControllerSample PROJECT=$(PROJECT_ROOT)/IIViewDeckController.xcodeproj TARGET=IIViewDeckController all: IIViewDeckController.dll libIIViewDeckController-i386.a: $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator -configuration Release clean build -mv $(PROJECT_ROOT)/build/Release-iphonesimulator/lib$(TARGET).a $@ libIIViewDeckController-armv7.a: $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch armv7 -configuration Release clean build -mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@ libIIViewDeckControllerUniversal.a: libIIViewDeckController-armv7.a libIIViewDeckController-i386.a lipo -create -output $@ $^ IIViewDeckController.dll: AssemblyInfo.cs APIDefinition.cs StructsAndEnums.cs libIIViewDeckControllerUniversal.a $(BTOUCH) -unsafe -out: $@ APIDefinition.cs -x=AssemblyInfo.cs -x=StructsAndEnums.cs --link-with=libIIViewDeckControllerUniversal.a,libIIViewDeckControllerUniversal.a clean: -rm -f *.a *.dll 

Everything is fine with the example file, I have an error:

 Makefile:4: *** target pattern contains no `%'. Stop. make: *** [all] Error 2 
+9
source share
6 answers

This is a poorly written error message from Make. This means that "one of your file names has a character that can be part of a regular expression." Make is very naive about file systems and quoting. He does not believe that:

 foo: 'The bar.' 

refers to the letter string. He takes it in one word, The bar. as another word, and then barfs for a period. Do this instead:

 foo: The\ bar\. 

or, in your case, a backslash for a period in .xcodeproj .

+33
source

This will not work:

 default: echo "Hello world!" 

It will be:

 default: echo "Hello world!" 

Can you tell the difference?

That's right, the first one has spaces, the second one has tabs . Anyone who has spaces will give you:

Makefile: 2: *** missing delimiter. Stop.

And that is why we cannot have pleasant things ...

+8
source

This error occurred to me because I had a form rule

 foo: bar: baz 

(pay attention to the final one : .

+4
source

Make sure there is no ":" in your path (i.e. cd $ {url} =>: //)

0
source

Solved: just go to the project tab, which will be displayed in a vertical tab, then go to the general one and just change the project location

0
source

All Articles