profile.mk: do not cleanup BUILDDIR, which is a symlink
This is required to run mkimage-profiles from mki-build with --vm-run. mki-build creates a build directory and a symlink to it in the current directory. The BUILDDIR variable is then set to the value of the symlink.
This commit is contained in:
parent
b5198e47ba
commit
554aca50f5
@ -33,7 +33,7 @@ RC = $(HOME)/.mkimage/profiles.mk
|
||||
|
||||
# step 1: initialize the off-tree mkimage profile (BUILDDIR)
|
||||
# NB: our output MUST go into stderr to escape POSTPROC
|
||||
profile/init: distclean
|
||||
profile/init: $(shell [ -L $(BUILDDIR) ] || echo distclean)
|
||||
@{ \
|
||||
if [ "`realpath "$(BUILDDIR)/"`" = / ]; then \
|
||||
echo "$(TIME) ERROR: invalid BUILDDIR: \`$(BUILDDIR)'"; \
|
||||
@ -75,7 +75,7 @@ profile/init: distclean
|
||||
git show -s --format=%H > "$(BUILDDIR)"/commit; \
|
||||
fi; \
|
||||
mp-commit -i "$(BUILDDIR)" "derivative profile initialized"; \
|
||||
if [ -w . ]; then \
|
||||
if [ -w . -a ! -L "$(BUILDDIR)" ]; then \
|
||||
rm -f "$(SYMLINK)" && \
|
||||
ln -s "$(BUILDDIR)" "$(SYMLINK)" && \
|
||||
if [ -z "$(QUIET)" ]; then \
|
||||
|
Loading…
x
Reference in New Issue
Block a user