blob: ea640cf0e74bd929094f08f7651917983b407e6e [file] [log] [blame]
wilfrem2c69b5a2015-04-20 19:24:50 +09001# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements. See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership. The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License. You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied. See the License for the
15# specific language governing permissions and limitations
16# under the License.
17
18# We call npm twice to work around npm issues
19
20stubs: $(top_srcdir)/test/ThriftTest.thrift
21 mkdir -p test-compiled
22 $(THRIFT) --gen js:node,ts -o test/ $(top_srcdir)/test/ThriftTest.thrift && $(THRIFT) --gen js:node,ts -o test-compiled $(top_srcdir)/test/ThriftTest.thrift
23
24ts-compile: stubs
25 mkdir -p test-compiled
26 ../../node_modules/typescript/bin/tsc --outDir test-compiled/ --project test/tsconfig.json
27
28deps: $(top_srcdir)/package.json
29 $(NPM) install $(top_srcdir)/ || $(NPM) install $(top_srcdir)/
30
31all-local: deps ts-compile
32
33precross: deps stubs ts-compile
34
35check: deps ts-compile
36 cd $(top_srcdir) && $(NPM) run test-ts && cd lib/nodets
37
38clean-local:
39 $(RM) -r test/gen-nodejs
40 $(RM) -r $(top_srcdir)/node_modules
41 $(RM) -r test-compiled
42
43EXTRA_DIST = \
44 test \
45 coding_standards.md