1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 05:58:53 +02:00
openwrt/scripts
Michal Sojka b1f102b03e scripts/feeds: Reuse TOPDIR if defined in environment
The feeds script sets value of TOPDIR in a way that is inconsistent
with how toplevel Makefile sets it. The inconsistency manifests when I
use a "build directory" with symlinks to LEDE source (see below).

When make is invoked in such a directory, make's TOPDIR variable is
set to that directory, whereas scripts/feeds sets TOPDIR to the top of
LEDE source, which results in creating feeds directory inside the LEDE
source instead of in the build directory.

This patch changes the script so that it reuses the TOPDIR value form
the environment if it exists. The result is that 'make
package/symlinks' correctly fetches feeds to the build directory
instead in the source.

I use the following commands to create the build directory:

    ln -s $SRC/config config
    ln -s $SRC/Config.in Config.in
    ln -s $SRC/feeds.conf.default feeds.conf.default
    ln -s $SRC/include include
    ln -s $SRC/Makefile Makefile
    mkdir package
    ln -s $SRC/package/base-files package/base-files
    ln -s $SRC/package/boot package/boot
    ln -s $SRC/package/devel package/devel
    ln -s $SRC/package/firmware package/firmware
    ln -s $SRC/package/kernel package/kernel
    ln -s $SRC/package/libs package/libs
    ln -s $SRC/package/Makefile package/Makefile
    ln -s $SRC/package/network package/network
    ln -s $SRC/package/system package/system
    ln -s $SRC/package/utils package/utils
    ln -s $SRC/rules.mk rules.mk
    ln -s $SRC/scripts scripts
    ln -s $SRC/target target
    ln -s $SRC/toolchain toolchain
    ln -s $SRC/tools tools

This allows me to easily test changes in LEDE on multiple targets.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
2017-02-21 13:03:20 +01:00
..
config
flashing
arm-magic.sh
brcmImage.pl
bundle-libraries.sh build: rework library bundling 2017-01-10 12:27:28 +01:00
checkpatch.pl
clang-gcc-wrapper
clean-package.sh
cleanfile
cleanpatch
combined-ext-image.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
combined-image.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
config.guess
config.rpath
config.sub
deptest.sh
diffconfig.sh
dl_cleanup.py
download.pl download.pl: fix detecting download errors with curl 2017-01-31 11:24:19 +01:00
env
ext-toolchain.sh
feeds scripts/feeds: Reuse TOPDIR if defined in environment 2017-02-21 13:03:20 +01:00
fixup-makefile.pl build: add FIXUP option for make check 2016-12-17 10:36:45 +01:00
gen-dependencies.sh gen-dependencies.sh: fix handling variations in "file" output 2017-02-19 16:56:18 +01:00
get_source_date_epoch.sh scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallback 2017-02-02 00:13:50 +01:00
getver.sh scripts/getver.sh: append short git hash based on upstream commit 2017-02-01 17:48:45 +01:00
ipkg-build
ipkg-make-index.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
kconfig.pl
make-ipkg-dir.sh
md5sum
metadata.pm
mkhash.c build: add a small standalone utility for calculating md5/sha256 hash 2017-01-05 11:09:12 +01:00
mkits.sh
om-fwupgradecfg-gen.sh scripts/om-fwupgradecfg-gen.sh: add support for the A60 2017-02-14 12:18:05 +01:00
openbsd.sh
package-metadata.pl scripts/package-metadata.pl: fix overriding conditional dependencies with conditional select 2017-01-11 18:24:39 +01:00
pad_image
patch-kernel.sh
patch-specs.sh
portable_date.sh
redboot-script.pl
relink-lib.sh
remote-gdb build: remove libc version suffix from build/staging directories 2017-02-07 17:18:15 +01:00
rstrip.sh rstrip.sh: fix handling variations in "file" output 2017-02-19 16:56:17 +01:00
slugimage.pl
srecimage.pl
strip-kmod.sh
symlink-tree.sh
sysupgrade-tar.sh
target-metadata.pl build: add buildbot specific config option for setting defaults 2017-02-14 14:18:35 +01:00
timestamp.pl
ubinize-image.sh