Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 52 lines (43 sloc) 0.996 kB
eabe791 @jwatte initial release
jwatte authored
1 define add_install
2 INSTALL_DSTS:=$(sort $(INSTALL_DSTS) $(2))
3 INSTALL_DIRS:=$(sort $(INSTALL_DIRS) $(dir $(2)))
4 $(2): $(1)
5 $(INSTALL) -m $(3) $(1) $(2)
6 endef
7 define add_precious_install
8 INSTALL_DSTS:=$(sort $(INSTALL_DSTS) $(2))
9 INSTALL_DIRS:=$(sort $(INSTALL_DIRS) $(dir $(2)))
10 $(2): $(1)
11 if [ -f $(2) ]; then \
12 $(INSTALL) -m $(3) $(1) $(2).new; \
13 $(TOUCH) $(2); \
14 else \
15 $(INSTALL) -m $(3) $(1) $(2); \
16 fi
17 endef
18
19
20 define mk_install_dir
21 $(1):
22 mkdir -p $$@
23 endef
24
25 BUILD_TEST_PREVIOUS:=bin
26 define build_test
27 .PHONY: run_bin/$(1)
28 bin/$(1): obj/test/$(1).o $(LIB_DEPS)
29 $(CXX) -o $$@ $$< $(LXXFLAGS) $(SYS_LIBS)
30 run_bin/$(1): bin/$(1) $(BUILD_TEST_PREVIOUS)
31 bin/$(1)
32 TESTS_TO_RUN+=bin/$(1)
33 BUILD_TEST_PREVIOUS:=run_bin/$(1)
34 endef
35
36 define run_test
37 $(1)
38 endef
39
40 define build_tool
41 bin/$(1): obj/tool/$(1).o $(LIB_DEPS)
42 $(CXX) -o $$@ $$< $(LXXFLAGS) $(SYS_LIBS)
43 $(eval $(call add_install,bin/$(1),$(VAR_PREFIX)/lib/istatd/bin/$(1),775))
44 endef
45
46 define build_dir
47 $(1):
48 mkdir -p $(1)
49 endef
50
51
Something went wrong with that request. Please try again.