Skip to content

Commit 2f027bc

Browse files
HanClintoNeo Zhang
authored and
Neo Zhang
committed
Name Migration: Build the deprecation-warning 'main' binary every time (ggml-org#8404)
* Modify the deprecation-warning 'main' binary to build every time, instead of only when a legacy binary is present. This is to help users of tutorials and other instruction sets from knowing what to do when the 'main' binary is missing and they are trying to follow instructions. * Adjusting 'server' name-deprecation binary to build all the time, similar to the 'main' legacy name binary.
1 parent 35b1aff commit 2f027bc

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

Makefile

+8-16
Original file line numberDiff line numberDiff line change
@@ -1513,15 +1513,17 @@ llama-q8dot: pocs/vdot/q8dot.cpp ggml/src/ggml.o \
15131513
# Mark legacy binary targets as .PHONY so that they are always checked.
15141514
.PHONY: main quantize perplexity embedding server finetune
15151515

1516+
# NOTE: We currently will always build the deprecation-warning `main` and `server` binaries to help users migrate.
1517+
# Eventually we will want to remove these target from building all the time.
15161518
main: examples/deprecation-warning/deprecation-warning.cpp
1517-
ifneq (,$(wildcard main))
15181519
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)
15191520
$(CXX) $(CXXFLAGS) $(filter-out $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS)
1520-
@echo "#########"
1521-
@echo "WARNING: The 'main' binary is deprecated. Please use 'llama-cli' instead."
1522-
@echo " Remove the 'main' binary to remove this warning."
1523-
@echo "#########"
1524-
endif
1521+
@echo "NOTICE: The 'main' binary is deprecated. Please use 'llama-cli' instead."
1522+
1523+
server: examples/deprecation-warning/deprecation-warning.cpp
1524+
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)
1525+
$(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS)
1526+
@echo "NOTICE: The 'server' binary is deprecated. Please use 'llama-server' instead."
15251527

15261528
quantize: examples/deprecation-warning/deprecation-warning.cpp
15271529
ifneq (,$(wildcard quantize))
@@ -1553,16 +1555,6 @@ ifneq (,$(wildcard embedding))
15531555
@echo "#########"
15541556
endif
15551557

1556-
server: examples/deprecation-warning/deprecation-warning.cpp
1557-
ifneq (,$(wildcard server))
1558-
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)
1559-
$(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS)
1560-
@echo "#########"
1561-
@echo "WARNING: The 'server' binary is deprecated. Please use 'llama-server' instead."
1562-
@echo " Remove the 'server' binary to remove this warning."
1563-
@echo "#########"
1564-
endif
1565-
15661558
finetune: examples/deprecation-warning/deprecation-warning.cpp
15671559
ifneq (,$(wildcard finetune))
15681560
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)

0 commit comments

Comments
 (0)