Subversion Repositories SmartDukaan

Rev

Rev 301 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
301 ashish 1
#define thrift_template
2
#  $(1) : $(2)
3
#	$$(THRIFT) $(3) $(4) $(5) $(6) $(7) $(8) $$<
4
#endef
5
 
6
define thrift_template
7
XTARGET := $(shell perl -e '@val = split("\/","$(2)"); $$last = pop(@val);split("\\.",$$last);print "$(1)/"."gen-cpp/"."@_[0]"."_types.cpp\n"' )
8
 
9
ifneq ($$(XBUILT_SOURCES),) 
10
    XBUILT_SOURCES := $$(XBUILT_SOURCES) $$(XTARGET)
11
else
12
    XBUILT_SOURCES := $$(XTARGET)
13
endif
14
$$(XTARGET) : $(2)
15
	$$(THRIFT) -o $1 $3 $$<
16
endef
17
 
18
clean-common:
19
	rm -rf gen-*