Skip to content

Commit

Permalink
add toplevel Makefile
Browse files Browse the repository at this point in the history
Reviewed By: jeremydubreil

Differential Revision: D2703006

fb-gh-sync-id: 04b9df8
  • Loading branch information
jvillard authored and facebook-github-bot-7 committed Dec 3, 2015
1 parent dbfa1f7 commit afa416e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ _build
/config.status
/configure
/Makefile.config
/Makefile

# IntelliJ files
/scripts/.idea/
Expand Down
23 changes: 23 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit afa416e

Please sign in to comment.