Skip to content

Commit

Permalink
Makefile makes git submodule update if hiredis is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
moticless committed Sep 9, 2024
1 parent f953088 commit b5e4232
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
27 changes: 15 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ export LIBRDB_VERSION

# ------------------------- ALL --------------------------------------

all:
$(MAKE) -C deps -f Makefile all
$(MAKE) -C src/lib -f Makefile all
$(MAKE) -C src/ext -f Makefile all
$(MAKE) -C src/cli -f Makefile all
$(MAKE) -C examples -f Makefile all
all: ./deps/hiredis/hiredis.h
$(MAKE) -C deps all
$(MAKE) -C src/lib all
$(MAKE) -C src/ext all
$(MAKE) -C src/cli all
$(MAKE) -C examples all

clean:
$(MAKE) -C deps -f Makefile clean
$(MAKE) -C src/lib -f Makefile clean
$(MAKE) -C src/ext -f Makefile clean
$(MAKE) -C src/cli -f Makefile clean
$(MAKE) -C examples -f Makefile clean
$(MAKE) -C test -f Makefile clean
$(MAKE) -C deps clean
$(MAKE) -C src/lib clean
$(MAKE) -C src/ext clean
$(MAKE) -C src/cli clean
$(MAKE) -C examples clean
$(MAKE) -C test clean
rm -f librdb.pc
rm -f librdb-ext.pc

Expand All @@ -44,6 +44,9 @@ distclean: clean
example: all
cd examples && export LD_LIBRARY_PATH=../lib && ./example1

./deps/hiredis/hiredis.h:
git submodule update --init deps/hiredis

# ------------------------- DEBUG -------------------------------------

debug:
Expand Down
8 changes: 4 additions & 4 deletions deps/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
all:
$(MAKE) -C redis -f Makefile all
$(MAKE) -C hiredis -f Makefile all
$(MAKE) -C redis all
$(MAKE) -C hiredis all

clean:
$(MAKE) -C redis -f Makefile clean
$(MAKE) -C hiredis -f Makefile all
$(MAKE) -C redis clean
$(MAKE) -C hiredis all


.PHONY: all clean

0 comments on commit b5e4232

Please sign in to comment.