Skip to content

Commit

Permalink
external/Makefile: fix submodcheck for sudo make install and modern…
Browse files Browse the repository at this point in the history
… git.

We can't run refresh-submodules without a working git, either:

```
$ sudo make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/libexec/c-lightning
mkdir -p /usr/local/libexec/c-lightning/plugins
mkdir -p /usr/local/share/man/man1
mkdir -p /usr/local/share/man/man5
mkdir -p /usr/local/share/man/man7
mkdir -p /usr/local/share/man/man8
mkdir -p /usr/local/share/doc/c-lightning
fatal: unsafe repository ('/home/rusty/lightning' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory /home/rusty/lightning
Reinitializing submodules external/libsodium external/libwally-core external/gheap external/jsmn external/libbacktrace external/lnprototest ...
fatal: unsafe repository ('/home/rusty/lightning' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory /home/rusty/lightning
fatal: unsafe repository ('/home/rusty/lightning' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory /home/rusty/lightning
make: *** [external/Makefile:52: submodcheck] Error 128
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed May 2, 2022
1 parent 43ace03 commit e516a5d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions external/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ endif
EXTERNAL_LDLIBS := -L${TARGET_DIR} $(patsubst lib%.a,-l%,$(notdir $(EXTERNAL_LIBS)))

submodcheck: $(FORCE)
ifneq ($(VERSION),)
@tools/refresh-submodules.sh $(SUBMODULES)
@cd external/libwally-core && ../../tools/refresh-submodules.sh src/secp256k1
endif

$(EXTERNAL_HEADERS): submodcheck

Expand Down

0 comments on commit e516a5d

Please sign in to comment.