Skip to content

Commit 2b2fa20

Browse files
committed
Makefile: mark more things as intermediaries.
This means we don't have to include them in our bundle. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent fe0d820 commit 2b2fa20

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,6 @@ mkdocs.yml: $(MANPAGES:=.md)
471471
)
472472

473473

474-
475-
# Don't delete these intermediaries.
476-
.PRECIOUS: $(ALL_GEN_HEADERS) $(ALL_GEN_SOURCES) $(PYTHON_GENERATED)
477-
478474
# Every single object file.
479475
ALL_OBJS := $(ALL_C_SOURCES:.c=.o)
480476

@@ -701,6 +697,9 @@ endif
701697
header_versions_gen.h: tools/headerversions $(FORCE)
702698
@tools/headerversions $@
703699

700+
# Once you have libccan.a, you don't need these.
701+
.INTERMEDIATE: $(CCAN_OBJS)
702+
704703
# We make a static library, this way linker can discard unused parts.
705704
libccan.a: $(CCAN_OBJS)
706705
@$(call VERBOSE, "ar $@", $(AR) r $@ $(CCAN_OBJS))

external/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ ifeq ($(DEBUGBUILD),1)
6262
WALLY_OPTS=--enable-debug
6363
endif
6464

65+
.INTERMEDIATE: $(TARGET_DIR)/libwally-core-build/src/secp256k1/libsecp256k1.la $(TARGET_DIR)/libwally-core-build/src/libwallycore.la
66+
6567
$(TARGET_DIR)/libwally-core-build/src/libwallycore.% $(TARGET_DIR)/libwally-core-build/src/secp256k1/libsecp256k1.%: $(LIBWALLY_HEADERS) $(LIBSECP_HEADERS)
6668
cd external/libwally-core && ./tools/autogen.sh
6769
mkdir -p ${TARGET_DIR}/libwally-core-build
@@ -87,6 +89,8 @@ $(TARGET_DIR)/jsmn-build/jsmn.o: external/jsmn/jsmn.c Makefile
8789
$(TARGET_DIR)/libjsmn.a: $(TARGET_DIR)/jsmn-build/jsmn.o
8890
$(AR) rc $@ $<
8991

92+
.INTERMEDIATE: $(TARGET_DIR)/jsmn-build/jsmn.o
93+
9094
# Need separate build dir: changes inside submodule make git think it's dirty.
9195
$(TARGET_DIR)/libbacktrace.a: external/libbacktrace/backtrace.h
9296
mkdir -p $(TARGET_DIR)/libbacktrace-build

0 commit comments

Comments
 (0)