From afa416ed4e518c311959d10dcadba1d445ef49c7 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 3 Dec 2015 06:01:53 -0800 Subject: [PATCH] add toplevel Makefile Reviewed By: jeremydubreil Differential Revision: D2703006 fb-gh-sync-id: 04b9df8 --- .gitignore | 1 + Makefile.in | 23 +++++++++++++++++++++++ autogen.sh | 2 +- configure.ac | 5 ++++- scripts/test.sh | 4 ++-- 5 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 Makefile.in diff --git a/.gitignore b/.gitignore index 086f5f962..02cd9f314 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ _build /config.status /configure /Makefile.config +/Makefile # IntelliJ files /scripts/.idea/ diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..356c87c9c --- /dev/null +++ b/Makefile.in @@ -0,0 +1,23 @@ +# Copyright (c) 2015 - present Facebook, Inc. +# All rights reserved. +# +# This source code is licensed under the BSD style license found in the +# LICENSE file in the root directory of this source tree. An additional grant +# of patent rights can be found in the PATENTS file in the same directory. + +@SET_MAKE@ +ROOT_DIR = . +include $(ROOT_DIR)/Makefile.config + +all: clang java + +java: + $(MAKE) -C $(INFER_DIR) java + +clang: + $(MAKE) -C $(INFER_DIR) clang + +clean: + $(MAKE) -C $(INFER_DIR) clean + +.PHONY: all clean clang java diff --git a/autogen.sh b/autogen.sh index 91b81a3c6..25fd2f3fa 100755 --- a/autogen.sh +++ b/autogen.sh @@ -36,6 +36,6 @@ echo "" echo "you may now run the following commands to build Infer:" echo "" echo " ./configure" -echo " make -C infer clang java" +echo " make" echo "" echo 'run `./configure --help` for more options' diff --git a/configure.ac b/configure.ac index 019d1c0d1..3fa7f063a 100644 --- a/configure.ac +++ b/configure.ac @@ -49,5 +49,8 @@ AC_ASSERT_OCAML_PKG([yojson]) # Checks for header files. AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h locale.h malloc.h stddef.h stdint.h stdlib.h string.h sys/mount.h sys/param.h sys/socket.h sys/statfs.h sys/time.h unistd.h wchar.h wctype.h]) -AC_CONFIG_FILES([Makefile.config]) +AC_CONFIG_FILES([ + Makefile.config + Makefile +]) AC_OUTPUT diff --git a/scripts/test.sh b/scripts/test.sh index 1870bd49a..f08e974c9 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -36,13 +36,13 @@ fi # We must collect at least one target, or Infer must be recompiled ([ -z "$TARGETS_TO_TEST" ] || [ -z "$TARGETS_TO_COMPILE" ]) \ - && echo 'Infer is not compiled properly. Run make -C infer clean && make -C infer' \ + && echo 'Infer is not compiled properly. Run make clean all' \ && exit 1 cd $SCRIPT_DIR/.. ./autogen.sh ./configure -make -C infer ${TARGETS_TO_COMPILE[@]} +make ${TARGETS_TO_COMPILE[@]} # Must clean in order to force running the tests with the latest version # of infer. There is no dependency between buck targets and infer.