From 4aeea1af3bffdb911388d877c0f4c549692cbca3 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Fri, 13 Jan 2017 05:16:46 -0800 Subject: [PATCH] [make] split Makefile.config.in into Makefile.autoconf.in and Makefile.config Summary: This will make it easier to bisect on top of this commit, as values in Makefile.autoconf.in are not expected to change across commits, but Makefile.config may fluctuate. This should also make it easier to rebase stacks of diffs without having to rerun `./autogen.sh && ./configure`. Reviewed By: jberdine Differential Revision: D4410077 fbshipit-source-id: 1119fb6 --- .gitignore | 2 +- Makefile.autoconf.in | 55 +++++++++++++++++++++++++++ Makefile.config.in => Makefile.config | 51 ++----------------------- configure.ac | 2 +- 4 files changed, 60 insertions(+), 50 deletions(-) create mode 100644 Makefile.autoconf.in rename Makefile.config.in => Makefile.config (67%) diff --git a/.gitignore b/.gitignore index aa45bb52b..8b02f3514 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ duplicates.txt /config.status /config.flags /configure -/Makefile.config +/Makefile.autoconf /.buckversion /*/.gitignore diff --git a/Makefile.autoconf.in b/Makefile.autoconf.in new file mode 100644 index 000000000..53a57aa88 --- /dev/null +++ b/Makefile.autoconf.in @@ -0,0 +1,55 @@ +# 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@ + +ANT = @ANT@ +ATDGEN = @ATDGEN@ +bindir = @bindir@ +BUCK = @BUCK@ +BUILD_C_ANALYZERS = @BUILD_C_ANALYZERS@ +BUILD_JAVA_ANALYZERS = @BUILD_JAVA_ANALYZERS@ +CC = @CC@ +CFLAGS = @CFLAGS@ +CLANG_INCLUDES = @CLANG_INCLUDES@ +CLANG_PREFIX = @CLANG_PREFIX@ +CMAKE = @CMAKE@ +CPP = @CPP@ +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +ENABLE_OCAMLOPT_CUSTOM_CC = @ENABLE_OCAMLOPT_CUSTOM_CC@ +ENABLE_OCAML_BINANNOT = @ENABLE_OCAML_BINANNOT@ +exec_prefix = @exec_prefix@ +INFER_MAJOR = @INFER_MAJOR@ +INFER_MINOR = @INFER_MINOR@ +INFER_PATCH = @INFER_PATCH@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +IS_FACEBOOK_TREE = @IS_FACEBOOK_TREE@ +IS_RELEASE_TREE = @IS_RELEASE_TREE@ +LDFLAGS = @LDFLAGS@ +libdir = @libdir@ +LIBS = @LIBS@ +MKDIR_P_CMD = case "@MKDIR_P@" in \ + ./*) printf "$(ROOT_DIR)/@MKDIR_P@\n";; \ + *) printf "@MKDIR_P@\n";; \ + esac +MKDIR_P = $(shell $(MKDIR_P_CMD)) +NCPU = @NCPU@ +NDKBUILD = @NDKBUILD@ +prefix = @prefix@ +PYTHON_lxml = @PYTHON_lxml@ +USER_JAVA_HOME = @USER_JAVA_HOME@ +XCODE_SELECT = @XCODE_SELECT@ + +ifneq (,$(findstring s,$(MAKEFLAGS))) +# quiet mode +LN_S = @LN_S@ +else +LN_S = @LN_S@ -v +endif diff --git a/Makefile.config.in b/Makefile.config similarity index 67% rename from Makefile.config.in rename to Makefile.config index d8dedc16f..1e1427831 100644 --- a/Makefile.config.in +++ b/Makefile.config @@ -5,57 +5,12 @@ # 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@ - SHELL = bash + +include $(ROOT_DIR)/Makefile.autoconf + PLATFORM = $(shell uname) -ANT = @ANT@ -ATDGEN = @ATDGEN@ -bindir = @bindir@ -BUCK = @BUCK@ -BUILD_C_ANALYZERS = @BUILD_C_ANALYZERS@ -BUILD_JAVA_ANALYZERS = @BUILD_JAVA_ANALYZERS@ -CC = @CC@ -CFLAGS = @CFLAGS@ -CLANG_INCLUDES = @CLANG_INCLUDES@ -CLANG_PREFIX = @CLANG_PREFIX@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ -ENABLE_OCAMLOPT_CUSTOM_CC = @ENABLE_OCAMLOPT_CUSTOM_CC@ -ENABLE_OCAML_BINANNOT = @ENABLE_OCAML_BINANNOT@ -exec_prefix = @exec_prefix@ -INFER_MAJOR = @INFER_MAJOR@ -INFER_MINOR = @INFER_MINOR@ -INFER_PATCH = @INFER_PATCH@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -IS_FACEBOOK_TREE = @IS_FACEBOOK_TREE@ -IS_RELEASE_TREE = @IS_RELEASE_TREE@ -LDFLAGS = @LDFLAGS@ -libdir = @libdir@ -LIBS = @LIBS@ -MKDIR_P_CMD = case "@MKDIR_P@" in \ - ./*) printf "$(ROOT_DIR)/@MKDIR_P@\n";; \ - *) printf "@MKDIR_P@\n";; \ - esac -MKDIR_P = $(shell $(MKDIR_P_CMD)) -NCPU = @NCPU@ -NDKBUILD = @NDKBUILD@ -prefix = @prefix@ -PYTHON_lxml = @PYTHON_lxml@ -USER_JAVA_HOME = @USER_JAVA_HOME@ -XCODE_SELECT = @XCODE_SELECT@ - -ifneq (,$(findstring s,$(MAKEFLAGS))) -# quiet mode -LN_S = @LN_S@ -else -LN_S = @LN_S@ -v -endif COPY = cp -f COPY_DIR = cp -Rf REMOVE = rm -f diff --git a/configure.ac b/configure.ac index 32eb2bf08..551dd430f 100644 --- a/configure.ac +++ b/configure.ac @@ -284,7 +284,7 @@ fi AC_CHECK_PYTHON_MODULE([$PYTHON27], [lxml]) AC_CONFIG_FILES([ - Makefile.config + Makefile.autoconf ]) AC_MSG_NOTICE([saving configure flags to ./config.flags])