mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
tools/Makefile: put all tools/ stuff here.
Generally a Makefile should control make within that directory. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
278b12982d
commit
9dfc854d94
13
Makefile
13
Makefile
@ -289,10 +289,6 @@ bolt-precheck:
|
||||
|
||||
check-source-bolt: $(ALL_TEST_PROGRAMS:%=bolt-check/%.c)
|
||||
|
||||
tools/check-bolt: tools/check-bolt.o $(CCAN_OBJS) common/utils.o
|
||||
|
||||
tools/check-bolt.o: $(CCAN_HEADERS)
|
||||
|
||||
check-whitespace/%: %
|
||||
@if grep -Hn '[ ]$$' $<; then echo Extraneous whitespace found >&2; exit 1; fi
|
||||
|
||||
@ -373,11 +369,6 @@ gen_version.h: FORCE
|
||||
@(echo "#define VERSION \"$(VERSION)\"" && echo "#define BUILD_FEATURES \"$(FEATURES)\"") > $@.new
|
||||
@if cmp $@.new $@ >/dev/null 2>&2; then rm -f $@.new; else mv $@.new $@; echo Version updated; fi
|
||||
|
||||
# We force make to relink this every time, to detect version changes.
|
||||
# Do it atomically, otherwise parallel builds can get upset!
|
||||
tools/headerversions: FORCE tools/headerversions.o $(CCAN_OBJS)
|
||||
@trap "rm -f $@.tmp.$$$$" EXIT; $(LINK.o) tools/headerversions.o $(CCAN_OBJS) $(LOADLIBES) $(LDLIBS) -o $@.tmp.$$$$ && mv $@.tmp.$$$$ $@
|
||||
|
||||
# That forces this rule to be run every time, too.
|
||||
gen_header_versions.h: tools/headerversions
|
||||
@tools/headerversions $@
|
||||
@ -429,14 +420,12 @@ maintainer-clean: distclean
|
||||
@echo 'This command is intended for maintainers to use; it'
|
||||
@echo 'deletes files that may need special tools to rebuild.'
|
||||
|
||||
clean: wire-clean
|
||||
clean:
|
||||
$(RM) $(CCAN_OBJS) $(CDUMP_OBJS) $(ALL_OBJS)
|
||||
$(RM) $(ALL_PROGRAMS) $(ALL_PROGRAMS:=.o)
|
||||
$(RM) $(ALL_TEST_PROGRAMS) $(ALL_TEST_PROGRAMS:=.o)
|
||||
$(RM) gen_*.h ccan/tools/configurator/configurator
|
||||
$(RM) ccan/ccan/cdump/tools/cdump-enumstr.o
|
||||
$(RM) check-bolt tools/check-bolt tools/*.o
|
||||
$(RM) tools/headerversions
|
||||
find . -name '*gcda' -delete
|
||||
find . -name '*gcno' -delete
|
||||
find . -name '*.nccout' -delete
|
||||
|
@ -1,2 +1,15 @@
|
||||
#! /usr/bin/make
|
||||
|
||||
# We force make to relink this every time, to detect version changes.
|
||||
# Do it atomically, otherwise parallel builds can get upset!
|
||||
tools/headerversions: FORCE tools/headerversions.o $(CCAN_OBJS)
|
||||
@trap "rm -f $@.tmp.$$$$" EXIT; $(LINK.o) tools/headerversions.o $(CCAN_OBJS) $(LOADLIBES) $(LDLIBS) -o $@.tmp.$$$$ && mv $@.tmp.$$$$ $@
|
||||
|
||||
tools/check-bolt: tools/check-bolt.o $(CCAN_OBJS) common/utils.o
|
||||
tools/check-bolt.o: $(CCAN_HEADERS)
|
||||
|
||||
clean:
|
||||
$(RM) tools/check-bolt tools/*.o
|
||||
$(RM) tools/headerversions
|
||||
|
||||
include tools/test/Makefile
|
||||
|
Loading…
Reference in New Issue
Block a user