Skip to content

Commit

Permalink
Makefile: don't regenerate manpages unless they've really changed.
Browse files Browse the repository at this point in the history
This is terribly ugly :(

Closes: #36
Reported-by: Glenn Willen
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Oct 7, 2016
1 parent 4fcdf6d commit 766249e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ $(PROGRAMS): CFLAGS+=-I.

default: $(PROGRAMS) $(MANPAGES) daemon-all

# Git doesn't maintain timestamps, so we only regen if git says we should.
$(MANPAGES): doc/%: doc/%.txt
a2x --format=manpage $<
if [ "`git log $@ | head -n1`" != "`git log $< | head -n1`" ] || [ "`git diff $<`" != "" ]; then a2x --format=manpage $<; else touch $@; fi

# Everything depends on the CCAN headers.
$(CCAN_OBJS) $(CDUMP_OBJS) $(HELPER_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o) ccan/ccan/cdump/tools/cdump-enumstr.o: $(CCAN_HEADERS)
Expand Down

0 comments on commit 766249e

Please sign in to comment.