Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 13a36ef

Browse filesBrowse files
author
ochafik
committed
build: workaround lack of -n on gnu xxd
1 parent b5f9c70 commit 13a36ef
Copy full SHA for 13a36ef

File tree

Expand file treeCollapse file tree

3 files changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-6
lines changed

‎Makefile

Copy file name to clipboardExpand all lines: Makefile
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ server: examples/server/server.cpp examples/server/utils.hpp examples/server/htt
794794
$(CXX) $(CXXFLAGS) $(filter-out %.h %.hpp $<,$^) -Iexamples/server $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) $(LWINSOCK2)
795795

796796
examples/server/%.hpp: examples/server/public/%
797-
xxd -n $(notdir $<) -i $< $@
797+
( cd examples/server/public && xxd -i $(notdir $<) ../$(notdir $<).hpp )
798798

799799
gguf: examples/gguf/gguf.cpp ggml.o $(OBJS)
800800
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)

‎build.zig

Copy file name to clipboardExpand all lines: build.zig
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,7 @@ pub fn build(b: *std.build.Builder) !void {
142142

143143
const server_assets = [_][]const u8{ "index.html", "index.js", "completion.js", "json-schema-to-grammar.mjs" };
144144
for (server_assets) |asset| {
145-
// Note: code can be simplified once setCwd is standard.
146-
const gen_hpp = b.addSystemCommand(
147-
&.{ "xxd", "-n", asset, "-i", b.fmt("examples/server/public/{s}", .{asset}), b.fmt("examples/server/{s}.hpp", .{asset}) },
148-
);
145+
const gen_hpp = b.addSystemCommand(&.{ "bash", "-c", b.fmt("cd examples/server/public && xxd -i {s} ../{s}.hpp", .{ asset, asset }) });
149146
server.step.dependOn(&gen_hpp.step);
150147
}
151148
}

‎examples/server/CMakeLists.txt

Copy file name to clipboardExpand all lines: examples/server/CMakeLists.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(SERVER_ASSETS
1+
set(SERVER_ASSETS
22
index.html
33
index.js
44
completion.js

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.