mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-11 01:27:58 +01:00
Makefile: Remove gen_version.h from ALL_GEN_HEADERS.
This prevents recompiling everything when you are changing just a doc, or touching only one file among hundreds of sources, just because the `gen_version.h` is changed, especially since only one source actually depends on that header.
This commit is contained in:
parent
a5fc66c382
commit
6fadd5aea2
3 changed files with 6 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -196,8 +196,6 @@ CCAN_HEADERS := \
|
|||
$(CCANDIR)/ccan/typesafe_cb/typesafe_cb.h \
|
||||
$(CCANDIR)/ccan/utf8/utf8.h
|
||||
|
||||
ALL_GEN_HEADERS += gen_version.h
|
||||
|
||||
CDUMP_OBJS := ccan-cdump.o ccan-strmap.o
|
||||
|
||||
BOLT_GEN := tools/generate-wire.py
|
||||
|
|
|
@ -96,6 +96,9 @@ COMMON_OBJS := $(COMMON_SRC:.c=.o)
|
|||
# Common objects depends on bitcoin/ external/ and ccan
|
||||
$(COMMON_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(EXTERNAL_HEADERS) $(COMMON_HEADERS_GEN)
|
||||
|
||||
# Only common/version.c can include this header.
|
||||
common/version.o: gen_version.h
|
||||
|
||||
ALL_GEN_HEADERS += $(COMMON_HEADERS_GEN)
|
||||
ALL_OBJS += $(COMMON_OBJS)
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include "gen_version.h"
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/* Only common/version.c can safely include this. */
|
||||
# include "gen_version.h"
|
||||
|
||||
const char *version(void)
|
||||
{
|
||||
return VERSION;
|
||||
|
|
Loading…
Add table
Reference in a new issue