Skip to content

Commit

Permalink
migrate infer/annotations/Makefile
Browse files Browse the repository at this point in the history
Summary:
public
Create Makefile.config.in to hold paths to various source directories used
in infer/annotations/Makefile.

Reviewed By: jeremydubreil

Differential Revision: D2702986

fb-gh-sync-id: b5eb5bf
  • Loading branch information
jvillard authored and facebook-github-bot-7 committed Dec 3, 2015
1 parent 1e3085e commit dbfa1f7
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 @@ -21,6 +21,7 @@ _build
/autom4te.cache
/config.status
/configure
/Makefile.config

# IntelliJ files
/scripts/.idea/
Expand Down
15 changes: 15 additions & 0 deletions Makefile.config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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.

ABSOLUTE_ROOT_DIR = $(shell cd $(ROOT_DIR) && pwd)

INFER_DIR = $(ABSOLUTE_ROOT_DIR)/infer
DEPENDENCIES_DIR = $(ABSOLUTE_ROOT_DIR)/dependencies

LIB_DIR = $(INFER_DIR)/lib

JAVA_LIB_DIR = $(LIB_DIR)/java
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ 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_OUTPUT
16 changes: 12 additions & 4 deletions infer/annotations/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# 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.

ROOT_DIR = ../..
include $(ROOT_DIR)/Makefile.config

CWD = $(shell pwd)
DEPENDENCIES = $(CWD)/../../dependencies
LIB = $(CWD)/../lib/java
JSR_JAR = $(DEPENDENCIES)/java/jsr-305/jsr305.jar
JSR_JAR = $(DEPENDENCIES_DIR)/java/jsr-305/jsr305.jar
ANNOT_SOURCES = $(shell find com/facebook/infer/annotation -name "*.java")
PROCESSOR_SOURCES = $(shell find com/facebook/infer/annotprocess -name "*.java")
ANNOT_CLASSES = 'annot_classes'
PROCESSOR_CLASSES = 'processor_classes'

ANNOTATIONS_JAR = $(CWD)/annotations.jar
PROCESSOR_JAR = $(LIB)/processor.jar
PROCESSOR_JAR = $(JAVA_LIB_DIR)/processor.jar

all: $(ANNOTATIONS_JAR) $(PROCESSOR_JAR)

Expand Down
2 changes: 2 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ fi
&& exit 1

cd $SCRIPT_DIR/..
./autogen.sh
./configure
make -C infer ${TARGETS_TO_COMPILE[@]}

# Must clean in order to force running the tests with the latest version
Expand Down

0 comments on commit dbfa1f7

Please sign in to comment.