Skip to content

Commit 962f5fd

Browse files
committed
---
yaml --- r: 34942 b: refs/heads/master c: 9ed8ce3 h: refs/heads/master v: v3
1 parent 936b845 commit 962f5fd

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: c97c8131a558595c0a19a283b99ef1ba4638f853
2+
refs/heads/master: 9ed8ce33646e0253fda91471fe528d1800bdf70c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/Makefile.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ HSREQ$(1)_H_$(3) = \
337337
TSREQ$(1)_T_$(2)_H_$(3) = \
338338
$$(HSREQ$(1)_H_$(3)) \
339339
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \
340-
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
340+
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a \
341+
$$(TLIB$(1)_T_$(2)_H_$(3))/liblinenoise.a
341342

342343
# Prerequisites for complete stageN targets
343344
SREQ$(1)_T_$(2)_H_$(3) = \
@@ -491,6 +492,7 @@ include $(CFG_SRC_DIR)mk/host.mk
491492
include $(CFG_SRC_DIR)mk/stage0.mk
492493
include $(CFG_SRC_DIR)mk/rt.mk
493494
include $(CFG_SRC_DIR)mk/rustllvm.mk
495+
include $(CFG_SRC_DIR)mk/linenoise.mk
494496
include $(CFG_SRC_DIR)mk/tools.mk
495497
include $(CFG_SRC_DIR)mk/docs.mk
496498
include $(CFG_SRC_DIR)mk/llvm.mk

trunk/mk/linenoise.mk

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
######################################################################
2+
# linenoise - minimalistic readline alternative used by the REPL
3+
######################################################################
4+
5+
define DEF_LINENOISE_TARGETS
6+
7+
LINENOISE_CS_$(1) := $$(addprefix linenoise/, linenoise.c)
8+
LINENOISE_OBJS_$(1) := $(LINENOISE_CS_$(1):linenoise/%.c=linenoise/$(1)/%.o)
9+
10+
ALL_OBJ_FILES += $$(LINENOISE_OBJS_$(1))
11+
12+
linenoise/$(1)/liblinenoise.a: $$(LINENOISE_OBJS_$(1))
13+
@$$(call E, link: $$@)
14+
$$(Q)ar rcs $$@ $$<
15+
16+
linenoise/$(1)/%.o: linenoise/%.c $$(MKFILE_DEPS)
17+
@$$(call E, compile: $$@)
18+
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@,) $$<
19+
endef
20+
21+
# Instantiate template for all stages
22+
$(foreach target,$(CFG_TARGET_TRIPLES), \
23+
$(eval $(call DEF_LINENOISE_TARGETS,$(target))))

trunk/mk/target.mk

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ USE_SNAPSHOT_RUNTIME=0
1212
USE_SNAPSHOT_CORELIB=0
1313
USE_SNAPSHOT_STDLIB=0
1414

15-
LINENOISE_OBJS_$(2) := linenoise/$(2)/linenoise.o
16-
ALL_OBJ_FILES += $$(LINENOISE_OBJS_$(2))
17-
18-
linenoise/$(2)/linenoise.o: linenoise/linenoise.c $$(MKFILE_DEPS)
19-
@$$(call E, compile: $$@)
20-
$$(Q)$$(call CFG_COMPILE_C_$(2), $$@,) $$<
21-
22-
linenoise/$(2)/liblinenoise.a: $$(LINENOISE_OBJS_$(2))
23-
@$$(call E, link: $$@)
24-
$$(Q)ar rcs $$@ $$<
25-
2615
define TARGET_STAGE_N
2716

2817
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a: \

0 commit comments

Comments
 (0)