Pattern cible ne contient pas de '%'. Makefile

J'ai cherché ce problème dans google, mais n'ai pas encore d'une certaine façon de résoudre un problème. J'ai 2 fichiers Makefile: Un comme exemple et comme mon fichier.
Exemple:

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

Mon fichier:

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

Avec exemple de fichier tout est OK, avec le mien, j'ai l'Erreur:

Makefile:4: *** target pattern contains no `%'.  Stop.
make: *** [all] Error 2
  • Les espaces et tabulations sont importants dans les Makefiles, de sorte que vous pouvez télécharger ces deux fichiers quelque part qui ne mange pas les espaces? (gist.github.com ou pastebin.com pour exemple).
  • Ou mieux, faire une exacte copie-coller de la réelle makefiles sur la question. Mieux encore, de les simplifier, et de nous donner le plus petit, le plus simple makefile qui produit l'erreur.
  • Je ne savais pas sur les onglets. Merci pour la réponse. onglets correction d'une erreur de faire: *** [all] Erreur 2.
  • Premier problème a toujours existé.Exemple: github.com/xamarin/monotouch-samples/blob/master/BindingSample/.... Mon makefile:github.com/mkovalyk/IIViewDeckControllerBinding/blob/master/src/...
  • Je sais que je suis à deux ans de retard, mais c'est probablement à être des espaces utilisés plutôt que des onglets. Remplacer les espaces avant les commandes avec des onglets.
  • "Les espaces et tabulations sont importants dans les Makefiles" - Merci, @RolfBjarneKvinge ce commentaire repéré ce que je faisais mal.

InformationsquelleAutor Mike | 2013-02-27