|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the MIT license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
|
|
|
|
TESTS_DIR = ../..
|
|
|
|
|
|
|
|
BUCK_TARGET = //module2:module2
|
|
|
|
CLEAN_EXTRA = buck-out
|
|
|
|
SOURCES = $(shell find . -name '*.java')
|
|
|
|
|
|
|
|
INFERPRINT_OPTIONS = --issues-tests
|
[buck] one buck mode datatype to rule them all
Summary:
This changes how we select amongst our (currently) 4 Buck integrations
for Java and clang, as well as how the user's choice is reflected by the
Config module.
The old command line interface is still supported but is now deprecated.
The changes in how to select each integration are:
- clang via "flavors", activated with `--flavors`, now with `--buck-clang`
- clang via "compilation DB", activated with `--buck-compilation-database`, unchanged
- Java via "genrule", activated with `--genrule-master-mode`, now with `--buck-java`
- Java "without genrules", used to be activated by *not specifying any other Buck mode*, unchanged
Instead of various `Config` flags corresponding to the previous CLI that
are allowed in any combination of `flavors`,
`buck_compilation_database`, `genrule_master_mode`, `Config` now exposes
a single `buck_mode` datatype. This allows, eg, `flavors` to override
`buck_compilation_database` if needed. It will also make it easier to
get rid of the old "Java without genrules" integration in a later diff
(see inline comments).
Reviewed By: ngorogiannis
Differential Revision: D19175686
fbshipit-source-id: 29b3831be
5 years ago
|
|
|
INFER_OPTIONS = --buck-java --debug-exceptions
|
|
|
|
|
|
|
|
include $(TESTS_DIR)/infer.make
|
|
|
|
|
|
|
|
$(INFER_OUT)/report.json: $(MAKEFILE_LIST) $(SOURCES)
|
|
|
|
$(QUIET)$(BUCK) clean
|
|
|
|
$(call silent_on_success,Testing genrule capture integration in $(TEST_REL_DIR),\
|
|
|
|
$(INFER_BIN) --results-dir $(@D) $(INFER_OPTIONS) -- \
|
|
|
|
$(BUCK) build --no-cache $(BUCK_TARGET))
|