Adding support for detecting various platform specific libraries, paths and

other things (anything, really).

Should make building mozilla on diverse platforms such as linux/lesstif
much easier.

Currently Linux is the only platform that supports detection.

The new detection mechanism is very scaleable.  We will be able to add support
for other operating systems as well as more permutations of linux/arch/toolkit.

It has received the Reverend Ostrom blessing of approval.

So the lesstif people can stop bitching.  thank you for the feedback ;-)

The shell script detection magic is very modular and can be easily shared
with other build schemes (autoconf for instance).
This commit is contained in:
ramiro%netscape.com 1998-07-18 03:33:07 +00:00
Родитель ae2e32cb28
Коммит a3d443f599
4 изменённых файлов: 33 добавлений и 40 удалений

Просмотреть файл

@ -31,8 +31,16 @@ CPU_ARCH := $(OS_TEST)
endif
GFX_ARCH := x
OS_INCLUDES = -I/usr/X11R6/include
# Include the automagically generated makefile. This generated makefile
# should contain lots of magic paths and flags.
-include $(MOZILLA_DETECT_GEN)
OS_INCLUDES =\
$(MOZILLA_XFE_MOTIF_INCLUDE_FLAGS) \
$(MOZILLA_XFE_X11_INCLUDE_FLAGS)
G++INCLUDES = -I/usr/include/g++
LOC_LIB_DIR = /usr/lib/X11
MOTIF =
MOTIFLIB =

Просмотреть файл

@ -55,44 +55,6 @@ ifeq ($(OS_ARCH)$(OS_RELEASE),IRIX5)
TARGETS += $(OBJDIR)/gtscc$(BIN_SUFFIX)
endif
# On linux we need to generake a motif.mk file which has special flags
# for different motif versions and/or broken libraries.
#
# Currently there is only 2 flags:
#
# MOZILLA_XM_2_1_PRINT_SHELL_FLAGS: X Print Shell Extension available
# starting with X11R6.3 and needed by motif 2.1.
#
# MOZILLA_XM_2_1_BROKEN_LOCALE_FLAGS: Needed because of currently
# broken locale support in motif 2.1 when linked with gnu libc2.
#
# Please direct questions about motif and linux to ramiro@netscape.com.
#
ifeq ($(OS_ARCH),Linux)
export:: motif.mk
motif.mk:
@rm -f $@
# Check for motif 2.1 which needs the X Print Shell extension (-lXp)
#
# Also check for /lib/libc.so.6 (GNU libc2). If we are using GLIBC2 with
# Motif 2.1, we need to check for /usr/lib/libBrokenLocale.so. At this
# time locale support on motif 2.1 seems to break with GLIBC2.
ifeq ($(shell $(DEPTH)/config/xmversion.sh),2.1)
@echo "MOZILLA_XM_2_1_PRINT_SHELL_FLAGS = -lXp" > $@
@if test -f /lib/libc.so.6 -a -f /usr/lib/libBrokenLocale.so; then \
echo "MOZILLA_XM_2_1_BROKEN_LOCALE_FLAGS = -lBrokenLocale" >> $@; \
fi
else
@echo "" > $@
endif
endif
# Redefine MAKE_OBJDIR for just this directory
define MAKE_OBJDIR
if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); fi
@ -139,6 +101,11 @@ clean clobber realclean clobber_all::
cd $(MKDEPEND_DIR); $(MAKE) $@
endif
ifdef MOZILLA_DETECT
clean clobber realclean clobber_all::
cd $(MOZILLA_DETECT_DIR); $(MAKE) $@
endif
# For the continuous build scripts.
show_objname:
@echo $(OBJDIR)

Просмотреть файл

@ -315,6 +315,19 @@ ifdef NS_BUILD_CORE
include $(DEPTH)/config/coreconf.mk
endif
#
# The following platforms support detection of paths and libraries.
#
# Need to define these before include the $ARCH.mk makefile
#
ifneq (,$(filter Linux,$(OS_ARCH)))
MOZILLA_DETECT = 1
MOZILLA_HOSTNAME = $(shell hostname -s)
MOZILLA_DETECT_DIR = $(DEPTH)/config/mkdetect
MOZILLA_DETECT_NAME = detect_$(MOZILLA_HOSTNAME)_gen.mk
MOZILLA_DETECT_GEN = $(MOZILLA_DETECT_DIR)/$(MOZILLA_DETECT_NAME)
endif
#
# Now include the platform-specific stuff.
#
@ -629,4 +642,3 @@ JAVA_DEFINES += -DAWT_11
else
JAVA_DEFINES += -DAWT_102
endif

Просмотреть файл

@ -726,6 +726,12 @@ $(MKDEPENDENCIES)::
$(MKDEPEND)::
cd $(MKDEPEND_DIR); $(MAKE)
# Rules to for detection
$(MOZILLA_DETECT_GEN):
cd $(MOZILLA_DETECT_DIR); $(MAKE)
detect: $(MOZILLA_DETECT_GEN)
ifdef OBJS
depend:: $(MKDEPEND) $(MKDEPENDENCIES)
else