From b98e787f5b31192afc60631ef564609e08c4779c Mon Sep 17 00:00:00 2001 From: Javier Maestro Date: Tue, 19 Nov 2024 10:46:44 +0000 Subject: [PATCH] fix: checkmake pre-commit checks --- .../configure_modify_input_source/simple_lib/Makefile.in | 8 ++++++++ .../simple_lib/Makefile.in | 8 ++++++++ examples/make_simple/code/Makefile | 8 ++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/examples/configure_modify_input_source/simple_lib/Makefile.in b/examples/configure_modify_input_source/simple_lib/Makefile.in index fea277faf..fc566b168 100644 --- a/examples/configure_modify_input_source/simple_lib/Makefile.in +++ b/examples/configure_modify_input_source/simple_lib/Makefile.in @@ -1,5 +1,11 @@ +all: simple + +.PHONY: all + simple: $(OUTPUT) +.PHONY: simple + $(OUTPUT): ./src/simple.c $(CC) $(CPPFLAGS) -o $(OBJECT) -c ./src/simple.c -I./include -I. $(AR) $(LDFLAGS) @@ -9,3 +15,5 @@ install: $(OUTPUT) mkdir -p simple/lib cp $(OUTPUT) ./simple/lib/$(OUTPUT) cp -r ./include ./simple + +.PHONY: clean test diff --git a/examples/configure_with_bazel_transitive/simple_lib/Makefile.in b/examples/configure_with_bazel_transitive/simple_lib/Makefile.in index 223c707a9..225caf9a3 100644 --- a/examples/configure_with_bazel_transitive/simple_lib/Makefile.in +++ b/examples/configure_with_bazel_transitive/simple_lib/Makefile.in @@ -1,5 +1,11 @@ +all: simple + +.PHONY: all + simple: $(OUTPUT) +.PHONY: simple + $(OUTPUT): ./src/simple.c $(CC) $(CPPFLAGS) -o $(OBJECT) -c ./src/simple.c -I./include -I. $(AR) $(LDFLAGS) @@ -9,3 +15,5 @@ install: mkdir -p simple/lib cp -p $(OUTPUT) ./simple/lib/$(OUTPUT) cp -rp ./include ./simple + +.PHONY: clean test diff --git a/examples/make_simple/code/Makefile b/examples/make_simple/code/Makefile index 1dcced175..2b9592bbd 100644 --- a/examples/make_simple/code/Makefile +++ b/examples/make_simple/code/Makefile @@ -1,6 +1,6 @@ -BUILD_DIR=build-out +BUILD_DIR := build-out -UNAME:=$(shell uname) +UNAME := $(shell uname) ifneq (,$(findstring NT, $(UNAME))) # If Windows @@ -15,8 +15,12 @@ default all $(BUILD_DIR)/lib/liba.a: liba.cpp liba.h $(CXX_WRAPPER) $(CXXFLAGS) -o $(BUILD_DIR)/lib/liba.o -c liba.cpp ar rcs $(BUILD_DIR)/lib/liba.a $(BUILD_DIR)/lib/liba.o +.PHONY: all + install: $(BUILD_DIR)/lib/liba.a mkdir -p $(PREFIX)/lib $(PREFIX)/include $(PREFIX)/share cp -rpv $(BUILD_DIR)/lib $(PREFIX) cp -p liba.h $(PREFIX)/include cp $(README_DIR)/README.md $(PREFIX)/share/ + +.PHONY: clean test