On 04/18/2014 03:01 PM, Felix Fietkau wrote:
On 2014-04-18 15:59, Karl P wrote:
I have never used the version part of this file actually, I use it solely to set
the source path to a local tree. I use this for packages that I develop both
snip
Right, that is a valid usecase, but package-version-override.mk is a
very poor and hackish way of doing that. I have just made a commit that
adds back support for overriding the package source directory, but in a
different way:
make package/<name>/prepare USE_SOURCE_DIR=/path/to/source/dir
That way you won't have to add the package-version-override hack to any
package you want to use this on. You also don't need to make changes to
make menuconfig anymore.
What I don't like about the build directory override approach is the
lack of proper 'clean' handling. I have a different workflow that
supports cleaning packages just fine, described below:
Yes, that was definitely a downside of the package-version-override.mk method,
make clean just removed a symlink.
As earlier, if someone can outline an alternative streamlined method of working
on application source directly, I'm happy to hear it, especially if it's
actually documented anywhere. However, failing that, I felt that the removal of
this as "lantiq only" was extremely arbitrary, as it's now rather obviously
getting used by other people too.
What I'm doing is this: I set CONFIG_SRC_TREE_OVERRIDE=y, and in the
package directory create a symlink git-src, pointing at the .git
subdirectory of a git clone of the package.
The build system creates a new build directory in the standard location,
creates the .git symlink and runs git checkout .
That way I can work on the same tree for multiple targets in multiple
build dirs and commit locally (just need to run git checkout . in the
other checkouts after I made some changes).
jow_laptop mentioned this on IRC as well. I'll play with these after the long
weekend and try and update the "creating packages" wiki page with this style,
thanks for the pointers.
Sincerely,
Karl Palsson
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel