Makefile: fix clean and distclean for external libs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2020-05-13 12:48:09 +09:30
parent d6ede8db1b
commit 88402bc234

6
external/Makefile vendored
View File

@ -100,13 +100,13 @@ clean: external-clean
external-clean:
$(RM) $(EXTERNAL_LIBS) $(TARGET_DIR)/*.la $(TARGET_DIR)/*.o
$(RM) $(TARGET_DIR)/jsmn-build/jsmn.o
if [ -f ${TARGET_DIR}/libsodium-build/Makefile ]; then make -C ${TARGET_DIR}/libsodium-build clean; fi
if [ -f ${TARGET_DIR}/libwally-core-build/Makefile ]; then make -C ${TARGET_DIR}/libwally-core-build clean; fi
if [ -f ${TARGET_DIR}/libwally-core-build/src/Makefile ]; then make -C ${TARGET_DIR}/libwally-core-build/src clean; fi
if [ -f ${TARGET_DIR}/libacktrace-build/Makefile ]; then make -C ${TARGET_DIR}/libbacktrace-build/src clean; fi
external-distclean:
make -C external/libsodium distclean || true
$(RM) -rf ${TARGET_DIR}/libbacktrace-build
$(RM) ${TARGET_DIR}/libsodium-build/src/libsodium/libsodium.la
$(RM) ${TARGET_DIR}/libwally-core-build/src/secp256k1/libsecp256k1.la ${TARGET_DIR}/libwally-core-build/src/libwallycore.la
$(RM) -rf ${TARGET_DIR}/libbacktrace-build ${TARGET_DIR}/libsodium-build ${TARGET_DIR}/libwally-core-build ${TARGET_DIR}/jsmn-build
$(RM) -r `git status --ignored --porcelain external/libwally-core | grep '^!! ' | cut -c3-`