| alisdair sullivan | 06d0fa0 | 2014-08-05 19:54:57 -0700 | [diff] [blame] | 1 | # | 
 | 2 | # Licensed to the Apache Software Foundation (ASF) under one | 
 | 3 | # or more contributor license agreements. See the NOTICE file | 
 | 4 | # distributed with this work for additional information | 
 | 5 | # regarding copyright ownership. The ASF licenses this file | 
 | 6 | # to you under the Apache License, Version 2.0 (the | 
 | 7 | # "License"); you may not use this file except in compliance | 
 | 8 | # with the License. You may obtain a copy of the License at | 
 | 9 | # | 
 | 10 | #   http://www.apache.org/licenses/LICENSE-2.0 | 
 | 11 | # | 
 | 12 | # Unless required by applicable law or agreed to in writing, | 
 | 13 | # software distributed under the License is distributed on an | 
 | 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | 
 | 15 | # KIND, either express or implied. See the License for the | 
 | 16 | # specific language governing permissions and limitations | 
 | 17 | # under the License. | 
 | 18 | # | 
 | 19 |  | 
| alisdair sullivan | 06d0fa0 | 2014-08-05 19:54:57 -0700 | [diff] [blame] | 20 | THRIFT_FILES = $(wildcard ../*.thrift) | 
 | 21 |  | 
| Nobuaki Sukegawa | 826ea99 | 2015-10-28 22:19:45 +0900 | [diff] [blame] | 22 | ERL_FLAG = erl | 
| Jens Geyer | 3a3ba00 | 2014-12-30 00:10:06 +0100 | [diff] [blame] | 23 | # make sure ThriftTest.thrift is generated last to prevent conflicts with other *.thrift files | 
| alisdair sullivan | 06d0fa0 | 2014-08-05 19:54:57 -0700 | [diff] [blame] | 24 | .generated: $(THRIFT_FILES) | 
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 25 | 	for f in $(THRIFT_FILES) ; do \ | 
| Nobuaki Sukegawa | 826ea99 | 2015-10-28 22:19:45 +0900 | [diff] [blame] | 26 | 	  $(THRIFT) --gen $(ERL_FLAG) -o src $$f ; \ | 
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 27 | 	done ; \ | 
| Nobuaki Sukegawa | 826ea99 | 2015-10-28 22:19:45 +0900 | [diff] [blame] | 28 | 	$(THRIFT) --gen $(ERL_FLAG) -o src ../ThriftTest.thrift | 
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 29 | 	touch .generated | 
| alisdair sullivan | 06d0fa0 | 2014-08-05 19:54:57 -0700 | [diff] [blame] | 30 |  | 
| Nobuaki Sukegawa | 826ea99 | 2015-10-28 22:19:45 +0900 | [diff] [blame] | 31 | precross: .generated | 
 | 32 | 	$(REBAR) compile | 
| alisdair sullivan | 06d0fa0 | 2014-08-05 19:54:57 -0700 | [diff] [blame] | 33 |  | 
| James E. King III | b96c438 | 2019-01-24 17:45:07 -0500 | [diff] [blame] | 34 | maintainer-clean-local: | 
 | 35 | 	$(RM) -r ebin/ | 
 | 36 |  | 
| alisdair sullivan | 06d0fa0 | 2014-08-05 19:54:57 -0700 | [diff] [blame] | 37 | clean: | 
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 38 | 	$(REBAR) clean | 
| James E. King III | b96c438 | 2019-01-24 17:45:07 -0500 | [diff] [blame] | 39 | 	$(RM)    .generated | 
 | 40 | 	$(RM) -r .rebar/ | 
 | 41 | 	$(RM) -r src/gen-erl/ | 
 | 42 |  | 
 | 43 | dist-hook: | 
 | 44 | 	$(RM)    $(distdir)/.generated | 
 | 45 | 	$(RM) -r $(distdir)/.rebar/ | 
 | 46 | 	$(RM) -r $(distdir)/ebin/ | 
 | 47 | 	$(RM) -r $(distdir)/src/gen-erl/ |