theos
theos copied to clipboard
Relative paths doesn't work in makefile
Hi,
another issue which i found and which basically doesn't allow me to use this theos branch on some of my projects is that i can't use relative paths in makefiles xxx_FILES
For example this doesn't work:
XXX_FILES = Tweak.xm ./tweakprefs/picker/UILabel-Additions.m
Or am i missing here something? The same makefile works great with the DHowett theos.
Can't reproduce. Can you provide a sample project, or at least your makefile(s), as well as the command line you're using to invoke make?
Also, most importantly – what is the output you get telling you that the file wasn't found? You should always include error output in a bug report.
Here are some more details:
I get the following error:
error: error opening '.theos/obj/debug/arm64/./tweakprefs/picker/UILabel-Additions.m.7e40c0cb.md': No such file or directory
Makefile:
GO_EASY_ON_ME = 1 SDKVERSION = 9.0 ARCHS = armv7 arm64 TARGET = iphone:clang:latest:8.0
include theos/makefiles/common.mk
TWEAK_NAME = blabla blabla_FILES = Tweak.xm ./tweakprefs/picker/UILabel-Additions.m blabla_FRAMEWORKS = UIKit, CoreGraphics, QuartzCore blabla_LDFLAGS += -Wl,-segalign,4000
include $(THEOS_MAKE_PATH)/tweak.mk
SUBPROJECTS += tweakprefs include $(THEOS_MAKE_PATH)/aggregate.mk
after-install:: install.exec "killall -9 SpringBoard"
Directory structure is as follows: makefile and tweakprefs dir are in the same directory (project root dir), picker dir containing the file is in the tweakprefs dir
Hope that helps, if not then i try to make a sample project.
Seems that's due to a makedeps failure, not a relative path. As with #9, you should still be able to build.
Can you confirm it still happens after you update to the latest commit of Theos with make update-theos?
Also: I don't think a comma is allowed in blabla_FRAMEWORKS; they should be separated by just a space. You also don't need the linker flag as the fix is integrated with Theos as of commit bbf282b.
I did make update-theos and now even that the error is still there i can at least build (before I could not build such projects) and the tweak seems to work fine after the build.
But now new errors show up:
While building module 'UIKit' imported from /Users/wybielacz/Documents/jailbreakDev/blabla/theos/Prefix.pch:22: While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:11: In file included from <module-includes>:1: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:8: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h:10:10: fatal error: could not build module 'Darwin' #include <TargetConditionals.h>
There are many the same errors but for different files and all have something to do with the Prefix.pch file. But even that the errors show up i am still able to build. The problem here is that the console is totally spammed with this errors and i can't easily find any other stuff there...
NOTE: This errors are just in some of my projects, only in those where i have specified files with relative paths, so i think that they are related.
I always using commas as separator for FRAMEWORKS and never had problems with this. And thanks for the info about the linker flags, i didn't know that.
Hi, after the last update ("make update-theos"), i got this:
Making all for tweak TweakTest… touch: /Users/marcocristalli-imac/Desktop/tweaktest/.theos/obj/debug/.stamp: No such file or directory make[1]: *** [/Users/marcocristalli-imac/Desktop/tweaktest/.theos/obj/debug/.stamp] Error 1 make: *** [TweakTest.all.tweak.variables] Error 2
Fixed in 48a999a, please update again. In future, please create a new issue instead of hijacking an existing one.