Skip to content

make : restore build-info.h dependency for several targets #3205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -499,22 +499,22 @@ main: examples/main/main.cpp build-info.h ggml.
@echo '==== Run ./main -h for help. ===='
@echo

simple: examples/simple/simple.cpp ggml.o llama.o common.o $(OBJS)
simple: examples/simple/simple.cpp build-info.h ggml.o llama.o common.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)

quantize: examples/quantize/quantize.cpp ggml.o llama.o $(OBJS)
quantize: examples/quantize/quantize.cpp build-info.h ggml.o llama.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)

quantize-stats: examples/quantize-stats/quantize-stats.cpp ggml.o llama.o $(OBJS)
quantize-stats: examples/quantize-stats/quantize-stats.cpp build-info.h ggml.o llama.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)

perplexity: examples/perplexity/perplexity.cpp ggml.o llama.o common.o $(OBJS)
perplexity: examples/perplexity/perplexity.cpp build-info.h ggml.o llama.o common.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)

embedding: examples/embedding/embedding.cpp ggml.o llama.o common.o $(OBJS)
embedding: examples/embedding/embedding.cpp build-info.h ggml.o llama.o common.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)

save-load-state: examples/save-load-state/save-load-state.cpp ggml.o llama.o common.o $(OBJS)
save-load-state: examples/save-load-state/save-load-state.cpp build-info.h ggml.o llama.o common.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)

server: examples/server/server.cpp examples/server/httplib.h examples/server/json.hpp examples/server/index.html.hpp examples/server/index.js.hpp examples/server/completion.js.hpp build-info.h ggml.o llama.o common.o grammar-parser.o $(OBJS)
Expand Down Expand Up @@ -567,7 +567,7 @@ build-info.h: $(wildcard .git/index) scripts/build-info.sh

tests: $(TEST_TARGETS)

benchmark-matmult: examples/benchmark/benchmark-matmult.cpp ggml.o $(OBJS)
benchmark-matmult: examples/benchmark/benchmark-matmult.cpp build-info.h ggml.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
./$@

Expand Down
1 change: 0 additions & 1 deletion common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#pragma once

#include "llama.h"
#include "build-info.h"

#define LOG_NO_FILE_LINE_FUNCTION
#include "log.h"
Expand Down
1 change: 1 addition & 0 deletions examples/benchmark/benchmark-matmult.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "build-info.h"
#include "common.h"
#include "ggml.h"

Expand Down
1 change: 1 addition & 0 deletions examples/embd-input/embd-input-lib.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "build-info.h"
#include "common.h"
#include "embd-input.h"

Expand Down
1 change: 1 addition & 0 deletions examples/embedding/embedding.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "build-info.h"
#include "common.h"
#include "llama.h"

Expand Down
1 change: 1 addition & 0 deletions examples/perplexity/perplexity.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "build-info.h"
#include "common.h"
#include "llama.h"

Expand Down
1 change: 1 addition & 0 deletions examples/quantize-stats/quantize-stats.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#define LLAMA_API_INTERNAL
#include "build-info.h"
#include "common.h"
#include "ggml.h"
#include "llama.h"
Expand Down
1 change: 1 addition & 0 deletions examples/quantize/quantize.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "build-info.h"
#include "common.h"
#include "llama.h"

Expand Down
1 change: 1 addition & 0 deletions examples/save-load-state/save-load-state.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "build-info.h"
#include "common.h"
#include "llama.h"

Expand Down