Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 763987 - Normalize autoconf.mk.in. r=ted
  • Loading branch information
glandium committed Jun 20, 2012
1 parent 5890578 commit 4e5eecb
Show file tree
Hide file tree
Showing 21 changed files with 215 additions and 258 deletions.
2 changes: 1 addition & 1 deletion browser/app/Makefile.in
Expand Up @@ -55,7 +55,7 @@ LIBS += \
$(NULL)

ifdef MOZ_LINKER
LIBS += $(ZLIB_LIBS)
LIBS += $(MOZ_ZLIB_LIBS)
endif

ifndef MOZ_WINCONSOLE
Expand Down
14 changes: 0 additions & 14 deletions build/macosx/js-icc-flight.mk

This file was deleted.

1 change: 1 addition & 0 deletions build/macosx/universal/flight.mk
Expand Up @@ -15,6 +15,7 @@ DIST_UNI = $(DIST_ARCH_1)/universal
OBJDIR = $(OBJDIR_ARCH_1)
endif

topsrcdir = $(TOPSRCDIR)
include $(OBJDIR)/config/autoconf.mk

DIST = $(OBJDIR)/dist
Expand Down
112 changes: 32 additions & 80 deletions config/autoconf.mk.in
Expand Up @@ -5,9 +5,6 @@

# A netscape style .mk file for autoconf builds

INCLUDED_AUTOCONF_MK = 1
USE_AUTOCONF = 1
MOZILLA_CLIENT = 1
target = @target@
ac_configure_args = @ac_configure_args@
MOZILLA_VERSION = @MOZILLA_VERSION@
Expand Down Expand Up @@ -36,16 +33,11 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
includedir = @includedir@
libdir = @libdir@
datadir = @datadir@
mandir = @mandir@
idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)

installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)

DIST = $(DEPTH)/dist
LIBXUL_SDK = @LIBXUL_SDK@

MOZ_FS_LAYOUT = @MOZ_FS_LAYOUT@
Expand Down Expand Up @@ -180,16 +172,14 @@ MOZ_GL_PROVIDER = @MOZ_GL_PROVIDER@
MOZ_GL_DEFAULT_PROVIDER = @MOZ_GL_DEFAULT_PROVIDER@


JAVA="@JAVA@"
JAVAC="@JAVAC@"
JAR="@JAR@"
JAVA=@JAVA@
JAVAC=@JAVAC@
JAR=@JAR@

TAR=@TAR@

MAKENSISU=@MAKENSISU@

RM = rm -f

# The MOZ_UI_LOCALE var is used to build a particular locale. Do *not*
# use the var to change any binary files. Do *not* use this var unless you
# write rules for the "clean-locale" and "locale" targets.
Expand Down Expand Up @@ -220,7 +210,7 @@ NECKO_COOKIES = @NECKO_COOKIES@
NECKO_WIFI = @NECKO_WIFI@
MOZ_AUTH_EXTENSION = @MOZ_AUTH_EXTENSION@

MOZ_NATIVE_HUNSPELL = @SYSTEM_HUNSPELL@
MOZ_NATIVE_HUNSPELL = @MOZ_NATIVE_HUNSPELL@
MOZ_HUNSPELL_LIBS = @MOZ_HUNSPELL_LIBS@
MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLAGS@

Expand All @@ -232,10 +222,10 @@ MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@
MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@
MOZ_LIBVPX_INCLUDES = @MOZ_LIBVPX_INCLUDES@

MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@
MOZ_NATIVE_BZ2 = @SYSTEM_BZ2@
MOZ_NATIVE_JPEG = @SYSTEM_JPEG@
MOZ_NATIVE_PNG = @SYSTEM_PNG@
MOZ_NATIVE_ZLIB = @MOZ_NATIVE_ZLIB@
MOZ_NATIVE_BZ2 = @MOZ_NATIVE_BZ2@
MOZ_NATIVE_JPEG = @MOZ_NATIVE_JPEG@
MOZ_NATIVE_PNG = @MOZ_NATIVE_PNG@
MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@
MOZ_TREE_PIXMAN = @MOZ_TREE_PIXMAN@

Expand Down Expand Up @@ -292,17 +282,16 @@ CROSS_COMPILE = @CROSS_COMPILE@

WCHAR_CFLAGS = @WCHAR_CFLAGS@

OS_CPPFLAGS = @CPPFLAGS@
OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@
OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@
OS_LDFLAGS = @LDFLAGS@
OS_CPPFLAGS = @OS_CPPFLAGS@
OS_CFLAGS = @OS_CFLAGS@
OS_CXXFLAGS = @OS_CXXFLAGS@
OS_LDFLAGS = @OS_LDFLAGS@

OS_COMPILE_CFLAGS = $(OS_CPPFLAGS) @COMPILE_CFLAGS@
OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @COMPILE_CXXFLAGS@
OS_COMPILE_CFLAGS = @OS_COMPILE_CFLAGS@
OS_COMPILE_CXXFLAGS = @OS_COMPILE_CXXFLAGS@

OS_INCLUDES = $(NSPR_CFLAGS) $(NSS_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS)
OS_LIBS = @LIBS@
ACDEFINES = @MOZ_DEFINES@
OS_LIBS = @OS_LIBS@
ACDEFINES = @ACDEFINES@

WARNINGS_AS_ERRORS = @WARNINGS_AS_ERRORS@

Expand Down Expand Up @@ -353,10 +342,7 @@ _MSC_VER = @_MSC_VER@

DLL_PREFIX = @DLL_PREFIX@
LIB_PREFIX = @LIB_PREFIX@
# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't
# manually use it before config.mk inclusion
OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX)
_OBJ_SUFFIX = @OBJ_SUFFIX@
OBJ_SUFFIX = @OBJ_SUFFIX@
LIB_SUFFIX = @LIB_SUFFIX@
DLL_SUFFIX = @DLL_SUFFIX@
BIN_SUFFIX = @BIN_SUFFIX@
Expand Down Expand Up @@ -421,43 +407,23 @@ ZIP = @ZIP@
XARGS = @XARGS@
STRIP = @STRIP@
DOXY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\
$(TK_CFLAGS)

CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@

MOZ_TREE_FREETYPE = @MOZ_TREE_FREETYPE@
Expand Down Expand Up @@ -577,9 +540,9 @@ GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@

MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@
MOZ_NATIVE_MAKEDEPEND = @MOZ_NATIVE_MAKEDEPEND@

export CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@
CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@

MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
COMPILER_DEPEND = @COMPILER_DEPEND@
Expand Down Expand Up @@ -697,15 +660,4 @@ MOZ_PACKAGE_JSSHELL = @MOZ_PACKAGE_JSSHELL@

MOZ_LINKER_EXTRACT = @MOZ_LINKER_EXTRACT@

# We only want to do the pymake sanity on Windows, other os's can cope
ifeq ($(HOST_OS_ARCH),WINNT)
# Ensure invariants between GNU Make and pymake
# Checked here since we want the sane error in a file that
# actually can be found regardless of path-style.
ifeq (_:,$(.PYMAKE)_$(findstring :,$(srcdir)))
$(error Windows-style srcdir being used with GNU make. Did you mean to run $(topsrcdir)/build/pymake/make.py instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake])
endif
ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(srcdir))))
$(error MSYS-style srcdir being used with Pymake. Did you mean to run GNU Make instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake])
endif
endif # WINNT
include $(topsrcdir)/config/baseconfig.mk
25 changes: 25 additions & 0 deletions config/baseconfig.mk
@@ -0,0 +1,25 @@
INCLUDED_AUTOCONF_MK = 1

includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
DIST = $(DEPTH)/dist

# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't
# manually use it before config.mk inclusion
_OBJ_SUFFIX := $(OBJ_SUFFIX)
OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX)

# We only want to do the pymake sanity on Windows, other os's can cope
ifeq ($(HOST_OS_ARCH),WINNT)
# Ensure invariants between GNU Make and pymake
# Checked here since we want the sane error in a file that
# actually can be found regardless of path-style.
ifeq (_:,$(.PYMAKE)_$(findstring :,$(srcdir)))
$(error Windows-style srcdir being used with GNU make. Did you mean to run $(topsrcdir)/build/pymake/make.py instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake])
endif
ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(srcdir))))
$(error MSYS-style srcdir being used with Pymake. Did you mean to run GNU Make instead? [see-also: https://developer.mozilla.org/ en/Gmake_vs._Pymake])
endif
endif # WINNT
12 changes: 8 additions & 4 deletions config/config.mk
Expand Up @@ -370,6 +370,8 @@ JAVA_GEN_DIR = _javagen
JAVA_DIST_DIR = $(DEPTH)/$(JAVA_GEN_DIR)
JAVA_IFACES_PKG_NAME = org/mozilla/interfaces

OS_INCLUDES += $(NSPR_CFLAGS) $(NSS_CFLAGS) $(MOZ_JPEG_CFLAGS) $(MOZ_PNG_CFLAGS) $(MOZ_ZLIB_CFLAGS)

INCLUDES = \
$(LOCAL_INCLUDES) \
-I$(srcdir) \
Expand All @@ -381,8 +383,8 @@ INCLUDES = \

include $(topsrcdir)/config/static-checking-config.mk

CFLAGS = $(OS_CFLAGS)
CXXFLAGS = $(OS_CXXFLAGS)
CFLAGS = $(OS_CPPFLAGS) $(OS_CFLAGS)
CXXFLAGS = $(OS_CPPFLAGS) $(OS_CXXFLAGS)
LDFLAGS = $(OS_LDFLAGS) $(MOZ_FIX_LINK_PATHS)

# Allow each module to override the *default* optimization settings
Expand Down Expand Up @@ -489,8 +491,8 @@ OS_COMPILE_CMMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
endif
endif

COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS)
COMPILE_CXXFLAGS = $(STL_FLAGS) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CXXFLAGS)
COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_CPPFLAGS) $(OS_COMPILE_CFLAGS)
COMPILE_CXXFLAGS = $(STL_FLAGS) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(RTL_FLAGS) $(OS_CPPFLAGS) $(OS_COMPILE_CXXFLAGS)
COMPILE_CMFLAGS = $(OS_COMPILE_CMFLAGS)
COMPILE_CMMFLAGS = $(OS_COMPILE_CMMFLAGS)

Expand Down Expand Up @@ -793,3 +795,5 @@ EXPAND_MOZLIBNAME = $(foreach lib,$(1),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUF
ifndef MOZ_SYSTEM_PLY
PLY_INCLUDE = -I$(topsrcdir)/other-licenses/ply
endif

export CL_INCLUDES_PREFIX

0 comments on commit 4e5eecb

Please sign in to comment.