* Bring back rbuild build to be used until bug 6372 is fixed.
[reactos.git] / tools / buildno / buildno.mak
1 BUILDNO_BASE = $(TOOLS_BASE_)buildno
2 BUILDNO_BASE_ = $(BUILDNO_BASE)$(SEP)
3 BUILDNO_INT = $(INTERMEDIATE_)$(BUILDNO_BASE)
4 BUILDNO_INT_ = $(BUILDNO_INT)$(SEP)
5 BUILDNO_OUT = $(OUTPUT_)$(BUILDNO_BASE)
6 BUILDNO_OUT_ = $(BUILDNO_OUT)$(SEP)
7
8 $(BUILDNO_INT): | $(TOOLS_INT)
9 $(ECHO_MKDIR)
10 ${mkdir} $@
11
12 ifneq ($(INTERMEDIATE),$(OUTPUT))
13 $(BUILDNO_OUT): | $(TOOLS_OUT)
14 $(ECHO_MKDIR)
15 ${mkdir} $@
16 endif
17
18 BUILDNO_TARGET = \
19 $(BUILDNO_OUT_)buildno$(EXEPOSTFIX)
20
21 BUILDNO_SOURCES = $(addprefix $(BUILDNO_BASE_), \
22 buildno.cpp \
23 )
24
25 BUILDNO_OBJECTS = \
26 $(addprefix $(INTERMEDIATE_), $(BUILDNO_SOURCES:.cpp=.o))
27
28 BUILDNO_HOST_CXXFLAGS = -I$(TOOLS_BASE) -Iinclude/reactos $(TOOLS_CPPFLAGS)
29
30 BUILDNO_HOST_LFLAGS = $(TOOLS_LFLAGS)
31
32 BUILDNO_VERSION = include$(SEP)reactos$(SEP)version.h
33
34 .PHONY: buildno
35 buildno: $(BUILDNO_TARGET)
36
37 $(BUILDNO_TARGET): $(BUILDNO_OBJECTS) $(XML_SSPRINTF_OBJECTS) | $(BUILDNO_OUT)
38 $(ECHO_HOSTLD)
39 ${host_gpp} $^ $(BUILDNO_HOST_LFLAGS) -o $@
40
41 $(BUILDNO_INT_)buildno.o: $(BUILDNO_BASE_)buildno.cpp $(BUILDNO_VERSION) | $(BUILDNO_INT)
42 $(ECHO_HOSTCC)
43 ${host_gpp} $(BUILDNO_HOST_CXXFLAGS) -c $< -o $@
44
45 .PHONY: buildno_clean
46 buildno_clean:
47 -@$(rm) $(BUILDNO_TARGET) $(BUILDNO_OBJECTS) 2>$(NUL)
48 clean: buildno_clean
49
50 # Uncomment the following line if you want to automatically
51 # update build number after SVN update
52 #.PHONY: $(BUILDNO_TARGET)
53
54 $(BUILDNO_H): $(BUILDNO_TARGET)
55 ${mkdir} $(INTERMEDIATE_)include$(SEP)reactos 2>$(NUL)
56 $(ECHO_BUILDNO)
57 $(Q)$(BUILDNO_TARGET) $(BUILDNO_QUIET) $(BUILDNO_H)