summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/tao_idl_fe.mpc
blob: 8feb6d337b2b30f818e113d65b1571d15df76642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// -*- MPC -*-
project(TAO_IDL_GEN) {
  requires += tao_idl_fe_gen
  custom_only = 1

  verbatim(gnuace, local) {
    all: fe/fe_lookup.cpp fe/idl.yy.cpp fe/idl.tab.cpp fe/idl.tab.hpp
    fe/fe_lookup.cpp: fe/keywords.dat
    "	echo '#include \"fe_private.h\"' > $@"
    "	echo '#include \"ace/OS_NS_string.h\"' >> $@"
    "	echo '' >> $@"
    "	$(ACE_ROOT)/bin/ace_gperf -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$$ $^ | \\"
    "	sed -e 's/,}/,0}/g' \\"
    "	    -e 's/\\*str == \\*s && !ACE_OS::strncmp/len == static_cast<unsigned int> (ACE_OS::strlen (s)) \\&\\& *str == *s \\&\\& !ACE_OS::strncmp/g' \\"
    "	>> $@"

    fe/idl.yy.cpp: fe/idl.ll
    "	@echo 'WARNING: Potentially outdated $@'"
    "	@echo '         either touch(1) the file or explicitly'"
    "	@echo '         generate it using:'"
    "	@echo '    make lex.yy'"

    .PHONY: lex.yy
    lex.yy:
    "ifeq ($(notdir $(LEX)), flex)"
    "	$(LEX) -t -P tao_yy -ofe/idl.yy.cpp fe/idl.ll | \\"
    "	sed -e 's/ NULL/ 0/g' \\"
    "	    -e 's/	/    /g' \\"
    "	    -e 's/  *$$\/\/g' \\"
    "	    -e 's/YY_BREAK break;/YY_BREAK ACE_NOTREACHED (break;)/g' \\"
    "	    -e 's@#include <errno\.h>@#include \"ace/OS_NS_errno.h\"@' \\"
    "	    -e 's@#include <stdio\.h>@#include \"ace/OS_NS_stdio.h\"@' \\"
    "	    -e 's@#include <unistd\.h>@#include \"ace/os_include/os_ctype.h\"@' \\"
    "	    -e 's@c = getc@c = ACE_OS::getc@' \\"
    "	    -e 's@199901L@199901L || defined (__HP_aCC)@' \\"
    "	    -e '/#include <[seu]/d' \\"
    "	> fe/idl.yy.cpp"
    "else"
    "	@echo 'ERROR: You must use flex 2.6.4 or higher to process this file'"
    "	@/bin/false"
    "endif"

    fe/idl.tab.cpp fe/idl.tab.hpp: fe/idl.ypp
    "	@echo 'WARNING: Potentially outdated $@'"
    "	@echo '         either touch(1) the file or explicitly'"
    "	@echo '         generate it using:'"
    "	@echo '    make y.tab'"

    .PHONY: y.tab
    y.tab: fe/idl.ypp
    "ifeq ($(notdir $(YACC)), bison)"
    "	$(YACC) -d -p tao_yy -b fe/idl fe/idl.ypp"
    "else"
    "	@echo 'ERROR: You must use bison 3 or higher to process this file'"
    "	@/bin/false"
    "endif"
  }
}

project(TAO_IDL_FE) : acelib, conv_lib, tao_output {
  sharedname   = TAO_IDL_FE
  dynamicflags += TAO_IDL_FE_BUILD_DLL
  includes    += $(TAO_ROOT)
  includes    += include fe
  after       += TAO_IDL_GEN

  specific {
    // Override the template value for optimize.  Building the frontend
    // with optimization turned on doesn't seem to work (at least not with
    // vc6 or vc71).  This is due to the use of addresses of static objecs
    // within the code.
    optimize =
  }

  Source_Files {
    fe
    ast
    util
    narrow
  }

  Header_Files {
    include
    fe
  }

  Template_Files {
    include/utl_scope_T.cpp
  }
}