Skip to content

Commit

Permalink
Use $(MAKE) instead of make in Makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Dec 30, 2024
1 parent afd3b6f commit 13afa16
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ all: libs $(DOC_TARGETS) check
# Run regression tests
.PHONY: test
test: $(LIB)/libxchange.a
make -C test
$(MAKE) -C test

# 'test" + 'analyze'
.PHONY: check
Expand All @@ -67,19 +67,19 @@ check: test analyze
# Static code analysis via Facebook's infer
.PHONY: infer
infer: clean
infer run -- make shared
infer run -- $(MAKE) shared

# Remove intermediates
.PHONY: clean
clean:
rm -f $(OBJECTS) README-xchange.md gmon.out
make -C test clean
$(MAKE) -C test clean

# Remove all generated files
.PHONY: distclean
distclean: clean
rm -f $(LIB)/libxchange.so* $(LIB)/libxchange.a
make -C test distclean
$(MAKE) -C test distclean

# ----------------------------------------------------------------------------
# The nitty-gritty stuff below
Expand Down
4 changes: 2 additions & 2 deletions build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(OBJ)/%.o: %.c $(OBJ) Makefile

# Share library recipe
$(LIB)/%.so.$(SO_VERSION):
@make $(LIB)
@$(MAKE) $(LIB)
$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $^ -shared -fPIC -Wl,-soname,$(subst $(LIB)/,,$@) $(LDFLAGS)

# Unversioned shared libs (for linking against)
Expand All @@ -21,7 +21,7 @@ $(LIB)/lib%.so:

# Static library: *.a
$(LIB)/%.a:
@make $(LIB)
@$(MAKE) $(LIB)
ar -rc $@ $^
ranlib $@

Expand Down
2 changes: 1 addition & 1 deletion src/xstruct.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ XField *xCopyOfField(const XField *f) {


/**
* Return the field by the specified name, or NULL if no such field exists.
* Return the referfence to the field by the specified name, or NULL if no such field exists.
*
* \param s Structure from which to retrieve a given field.
* \param id Name or aggregate ID of the field to retrieve
Expand Down
2 changes: 1 addition & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ run: tests
$(BIN)/test-json

$(BIN)/test-%: $(OBJ)/test-%.o $(LIB)/libxchange.a
make $(BIN)
$(MAKE) $(BIN)
$(CC) -o $@ $^ $(LDFLAGS)

.PHONY: clean-test
Expand Down

0 comments on commit 13afa16

Please sign in to comment.