You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.4 KiB

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
@SET_MAKE@
ANT = @ANT@
ATDGEN = @ATDGEN@
bindir = @bindir@
BUCK = @BUCK@
BUILD_C_ANALYZERS = @BUILD_C_ANALYZERS@
BUILD_JAVA_ANALYZERS = @BUILD_JAVA_ANALYZERS@
CAML_LD_LIBRARY_PATH = @CAML_LD_LIBRARY_PATH@
CC = @CC@
CFLAGS = @CFLAGS@
CLANG_INCLUDES = @CLANG_INCLUDES@
CLANG_PREFIX = @CLANG_PREFIX@
CMAKE = @CMAKE@
CPATH = @CPATH@
CPP = @CPP@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
# this is useless but autoconf is picky...
datarootdir = @datarootdir@
EMACS = @EMACS@
ENABLE_OCAMLOPT_CUSTOM_CC = @ENABLE_OCAMLOPT_CUSTOM_CC@
ENABLE_OCAML_BINANNOT = @ENABLE_OCAML_BINANNOT@
exec_prefix = @exec_prefix@
GNU_SED = @GNU_SED@
INFER_MAJOR = @INFER_MAJOR@
INFER_MAN_LAST_MODIFIED = @INFER_MAN_LAST_MODIFIED@
INFER_MINOR = @INFER_MINOR@
INFER_PATCH = @INFER_PATCH@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_NAME_TOOL = @INSTALL_NAME_TOOL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
IS_FACEBOOK_TREE = @IS_FACEBOOK_TREE@
IS_RELEASE_TREE = @IS_RELEASE_TREE@
JAVAC = @JAVAC@
JDK11_ENABLED = @JDK11_ENABLED@
LDD = @LDD@
LDFLAGS = @LDFLAGS@
libdir = @libdir@
# override in your `make` command to make the install relocatable
libdir_relative_to_bindir = $(libdir)
LIBRARY_PATH = @LIBRARY_PATH@
LIBS = @LIBS@
mandir = @mandir@
MENHIR = @MENHIR@
MKDIR_P_CMD = case "@MKDIR_P@" in \
./*) printf "$(ROOT_DIR)/@MKDIR_P@\n";; \
*) printf "@MKDIR_P@\n";; \
esac
MKDIR_P = $(shell $(MKDIR_P_CMD))
MVN = @MVN@
NCPU = @NCPU@
NDKBUILD = @NDKBUILD@
OCAMLBUILD = @OCAMLBUILD@
OCAMLC = @OCAMLC@
OCAMLFIND = @OCAMLFIND@
OCAMLLEX = @OCAMLLEX@
OCAMLOPT = @OCAMLOPT@
OPAM = @OPAM@
OPAMROOT = @OPAMROOT@
OPAMSWITCH = @OPAMSWITCH@
OTOOL = @OTOOL@
PATCHELF = @PATCHELF@
PATH = @PATH@
prefix = @prefix@
PYTHON_lxml = @PYTHON_lxml@
SDKROOT = @SDKROOT@
[tests] awesomize make output Summary: Hide the output of all the toplevel `make` actions and print messages instead, as if we had a better build system than Makefiles. When a command fails, print its stdout and stderr and prefix it with bold red letters. Also display timing information. ``` $ make -j 4 test [17:39:18][27290] Facebook setup... [17:39:18][27363] Building checkCopyright... [17:39:18][27443] Validating facebook/... [ 0s][27363] SUCCESS Building checkCopyright [ 0s][27290] SUCCESS Facebook setup [17:39:18][27863] Building clang plugin... [ 0s][27443] SUCCESS Validating facebook/ [ 0s][27863] SUCCESS Building clang plugin [17:39:18][27898] Building clang plugin OCaml interface... [ 0s][27898] SUCCESS Building clang plugin OCaml interface [17:39:18][27974] Testing Infer builds without warnings... [17:39:18][28033] Building native Infer... [ 12s][27974] SUCCESS Testing Infer builds without warnings [17:39:30][28998] Testing Infer toplevel builds... [ 6s][28998] SUCCESS Testing Infer toplevel builds [17:39:36][31417] Running OCaml unit tests... [17:39:36][31456] Testing infer OCaml REPL... [ 6s][31417] SUCCESS Running OCaml unit tests [ 9s][31456] SUCCESS Testing infer OCaml REPL [ 92s][28033] SUCCESS Building native Infer [17:40:50][ 2170] Building Java annotations... [ 0s][ 2170] SUCCESS Building Java annotations [17:40:50][ 2186] Building Infer models... [ 11s][ 2186] SUCCESS Building Infer models [17:41:01][ 2803] Running build assembly test... [17:41:01][ 2861] Running build ck analytics test... [17:41:01][ 2941] Running build ck imports test... [17:41:01][ 3035] Running build clang compilation db escaped test... [ 1s][ 3035] SUCCESS Running build clang compilation db escaped test [17:41:02][ 3139] Running build clang compilation db relpath test... [ 3s][ 2861] SUCCESS Running build ck analytics test [17:41:04][ 3296] Running build clang multiple files test... [*ERROR**][2803] *** ERROR Running build assembly test [*ERROR**][2803] *** command: ( make INTERACTIVE=1 -C /home/jul/infer/infer/tests/build_systems/assembly test 2> >(grep -v warning: (ignoring old|overriding) (commands|recipe) for target) ; exit 0) [*ERROR**][2803] *** CWD: /home/jul/infer [*ERROR**][2803] *** stdout: [*ERROR**][2803] make[1]: Entering directory '/home/jul/infer/infer/tests/build_systems/assembly' [*ERROR**][2803] *** inner Testing infer/clang in build_systems/assembly [*ERROR**][2803] *** inner command: /home/jul/infer/infer/bin/infer --results-dir infer-out --dump-duplicate-symbols --report-custom-error --developer-mode --project-root ../codetoanalyze --no-failures-allowed -a infer -- clang -c ../codetoanalyze/example.S ../codetoanalyze/hello.c [*ERROR**][2803] *** inner CWD: /home/jul/infer/infer/tests/build_systems/assembly [*ERROR**][2803] Capturing in make/cc mode... [*ERROR**][2803] Starting analysis... [*ERROR**][2803] [*ERROR**][2803] legend: [*ERROR**][2803] "F" analyzing a file [*ERROR**][2803] "." analyzing a procedure [*ERROR**][2803] [*ERROR**][2803] Found 1 (out of 1) source files to be analyzed in /home/jul/infer/infer/tests/build_systems/assembly/infer-out [*ERROR**][2803] [*ERROR**][2803] [*ERROR**][2803] No issues found [*ERROR**][2803] [*ERROR**][2803] ../../infer.make:30: recipe for target 'test' failed [*ERROR**][2803] make[1]: Leaving directory '/home/jul/infer/infer/tests/build_systems/assembly' [*ERROR**][2803] F.--- build_systems/assembly/issues.exp 2017-03-22 16:25:44.583854270 +0000 [*ERROR**][2803] +++ build_systems/assembly/issues.exp.test 2017-03-28 17:41:04.743678254 +0100 [*ERROR**][2803] @@ -1 +0,0 @@ [*ERROR**][2803] -hello.c, test, 2, NULL_DEREFERENCE, [start of procedure test()] [*ERROR**][2803] [*ERROR**][2803] Test output (build_systems/assembly/issues.exp.test) differs from expected test output build_systems/assembly/issues.exp [*ERROR**][2803] Run the following command to replace the expected test output with the new output: [*ERROR**][2803] [*ERROR**][2803] make -C build_systems/assembly replace [*ERROR**][2803] [*ERROR**][2803] make[1]: *** [test] Error 1 [*ERROR**][2803] *** stderr: Makefile:230: recipe for target 'build_assembly_test' failed make: *** [build_assembly_test] Error 1 make: *** Waiting for unfinished jobs.... [...] ``` Reviewed By: jberdine Differential Revision: D4781857 fbshipit-source-id: cbce26d
8 years ago
SHASUM = @SHASUM@
USER_JAVA_HOME = @USER_JAVA_HOME@
[make] s/ocamlbuild/jbuilder/g Summary: Use jbuilder to build infer instead of ocamlbuild. This is mainly to get faster builds: ``` times in 10ms, ±differences measured in speedups, 4 cores | | ocb total | jb | ±total | ocb user | jb | ±user | ocb cpu | jb | ±cpu | ocb sys | jb | ±sys | |-----------------------------------+-----------+------+--------+----------+------+-------+---------+-----+------+---------+------+------| | byte from scratch | 6428 | 2456 | 2.62 | 7743 | 6662 | 1.16 | 138 | 331 | 2.40 | 1184 | 1477 | 0.80 | | native from scratch | 9841 | 4289 | 2.29 | 9530 | 8834 | 1.08 | 110 | 245 | 2.23 | 1373 | 1712 | 0.80 | | byte after native | 29578 | 1602 | 18.46 | 4514 | 4640 | 0.97 | 170 | 325 | 1.91 | 543 | 576 | 0.94 | | change infer.ml byte | 344 | 282 | 1.22 | 292 | 215 | 1.36 | 96 | 99 | 1.03 | 040 | 066 | 0.61 | | change infer.ml native | 837 | 223 | 3.75 | 789 | 174 | 4.53 | 98 | 99 | 1.01 | 036 | 47 | 0.77 | | change Config.ml byte | 451 | 339 | 1.33 | 382 | 336 | 1.14 | 97 | 122 | 1.26 | 056 | 80 | 0.70 | | change Config.ml native | 4024 | 1760 | 2.29 | 4585 | 4225 | 1.09 | 127 | 276 | 2.17 | 559 | 644 | 0.87 | | change cFrontend_config.ml byte | 348 | 643 | 0.54 | 297 | 330 | 0.90 | 96 | 67 | 0.70 | 038 | 102 | 0.37 | | change cFrontend_config.ml native | 1480 | 584 | 2.53 | 1435 | 906 | 1.58 | 106 | 185 | 1.75 | 136 | 178 | 0.76 | #+TBLFM: $4=$2/$3;f2::$7=$5/$6;f2::$10=$9/$8;f2::$13=$11/$12;f2 50 cores | | ocb total | jb | ±total | ocb user | jb | ±user | ocb cpu | jb | ±cpu | ocb sys | jb | ±sys | |---------------------+-----------+------+--------+----------+------+-------+---------+----+------+---------+------+------| | byte from scratch | 9114 | 2061 | 4.42 | 9334 | 5133 | 1.82 | | | 0/0 | 2566 | 1726 | 1.49 | | native from scratch | 13481 | 3967 | 3.40 | 12291 | 7608 | 1.62 | | | 0/0 | 3003 | 2100 | 1.43 | | byte after native | 3467 | 1476 | 2.35 | 5067 | 3912 | 1.30 | | | 0/0 | 971 | 801 | 1.21 | #+TBLFM: $4=$2/$3;f2::$7=$5/$6;f2::$10=$9/$8;f2::$13=$11/$12;f2 ``` Menu: 1. Write a jbuild file, autogenerated from jbuild.in because we need to fill in some information at build-time (really, at configure time, but TODO), such as whether or not clang is enabled. 2. Nuke lots of stuff from infer/src/Makefile that is now in the jbuild file 3. The jbuild file lives in infer/src/ so it can see all the sources. If we put it somewhere else, eg, infer/, then `jbuilder` scans too many files (all irrelevant) and takes 2.5s to start instead of .8s. Adding irrelevant directories to jbuild-ignore does not help. 4. jbuilder does not support subdirectories, so resort to listing all the source files in the generated jbuild (only source directories need to be manually listed in jbuild.in though). Still, the generated .merlin is wrong and makes merlin find source files in _build, so manually tune it to get good merlin support. We also lose some of merlin for unit tests as it cannot see their build artefacts anymore. 5. checkCopyright gets its own jbuild because it's standalone. Also, remove some deprecation warnings in checkCopyright due to the new version of Core from a while ago. 6. Drop less-used Makefile features (they had regressed anyway) such as building individual modules. Also, building mod_dep.pdf now takes all the source files available so they better build (before, it would only take the source files from the config, eg with or without clang) (that's pretty minor). 7. The toplevel is now built as a custom toplevel because that was easier. It should soon be even easier: https://github.com/janestreet/jbuilder/issues/210 8. Move BUILTINS.mli to BUILTINS.ml because jbuilder is not happy about interface files without implementations. In particular, I did not try to migrate too much of the Makefile logic to jbuilder, more can be done in the future. Reviewed By: jberdine Differential Revision: D5573661 fbshipit-source-id: 4ca6d8f
7 years ago
UTOP = @UTOP@
XCODE_SELECT = @XCODE_SELECT@
XCODE_BASE = @XCODE_BASE@
HAS_OBJC = @HAS_OBJC@
XCPRETTY = @XCPRETTY@
WINDOWS_BUILD = @WINDOWS_BUILD@
ifneq (,$(findstring s,$(MAKEFLAGS)))
# quiet mode
LN_S = @LN_S@
else
LN_S = @LN_S@ -v
endif
# Export parts of the config relevant to running other programs
export PATH := $(PATH)
export CPATH := $(CPATH)
export LIBRARY_PATH := $(LIBRARY_PATH)
export CAML_LD_LIBRARY_PATH := $(CAML_LD_LIBRARY_PATH)
export OPAMROOT := $(OPAMROOT)
export SDKROOT := $(SDKROOT)