This commit is contained in:
briano%netscape.com 1999-09-10 09:22:43 +00:00
parent 2350691969
commit 6bd9be3401
3 changed files with 56 additions and 92 deletions

View File

@ -1,4 +1,3 @@
# -*- Mode: Makefile -*-
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
@ -25,15 +24,9 @@ include $(DEPTH)/config/autoconf.mk
INTERNAL_TOOLS = 1
HSRCS = pathsub.h
PROGRAM = nsinstall
CSRCS = nsinstall.c pathsub.c
ifeq ($(subst /,_,$(shell uname -s)),OS2)
DIRS = os2
LOCAL_INCLUDES += -Ios2
HSRCS += dirent.h getopt.h
endif
PLSRCS = nfspwd.pl revdepth.pl
TARGETS = $(PROGRAM) $(PLSRCS:.pl=)
@ -48,18 +41,19 @@ ifdef MOZILLA_OFFICIAL
TARGETS += $(DEPTH)/modules/libpref/src/init/all.js
endif
ifneq ($(subst /,_,$(shell uname -s)),WINNT)
PROGRAM = nsinstall$(BIN_SUFFIX)
endif
# IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
# a recursive rule for finding nsinstall and the perl scripts
# a recursive rule for finding nsinstall and the Perl scripts.
ifdef NSBUILDROOT
override NSBUILDROOT :=
endif
include $(topsrcdir)/config/rules.mk
ifeq ($(subst /,_,$(shell uname -s)),OS2)
DIRS = os2
LOCAL_INCLUDES += -Ios2
endif
ifeq ($(OS_CONFIG),SunOS4.1)
NSPR_CFLAGS += -I$(srcdir)/../nsprpub/pr/include/md
endif

View File

@ -15,23 +15,26 @@
# Reserved.
#
DEPTH = ../..
DEPTH = ../..
topsrcdir = @top_srcdir@
VPATH = @srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = mkdepend
PROGRAM = mkdepend
MODULE = mkdepend
PROGRAM = mkdepend
CSRCS = cppsetup.c \
ifparser.c \
include.c \
main.c \
parse.c \
pr.c
CSRCS = \
cppsetup.c \
ifparser.c \
include.c \
main.c \
parse.c \
pr.c \
$(NULL)
include $(topsrcdir)/config/rules.mk
DEFINES += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".o\"
DEFINES += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".o\"

View File

@ -1,4 +1,3 @@
# -*- Mode: Makefile -*-
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
@ -23,52 +22,48 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
# A uniq identifier that describes this host
# A unique identifier that describes this host
ifdef MOZILLA_CONFIG_HOST_IDENT
DETECT_UNIQ_IDENT = $(MOZILLA_CONFIG_HOST_IDENT)
DETECT_UNIQ_IDENT = $(MOZILLA_CONFIG_HOST_IDENT)
else
DETECT_UNIQ_IDENT = $(shell $(DETECT_DIR)/detect_hostident.sh)
DETECT_UNIQ_IDENT = $(shell $(DETECT_DIR)/detect_hostident.sh)
endif
# Where we live
DETECT_DIR = $(topsrcdir)/config/mkdetect
# Name of genereated makefile
# Name of generated makefile
DETECT_NAME = detect_$(DETECT_UNIQ_IDENT)_gen.mk
# The glibc detection script
DETECT_GLIBC = $(DETECT_DIR)/detect_glibc.sh -o $(DETECT_UNIQ_IDENT) \
-cc $(CC)
DETECT_GLIBC = $(DETECT_DIR)/detect_glibc.sh -o $(DETECT_UNIQ_IDENT) -cc $(CC)
ifeq (motif, $(MOZ_WIDGET_TOOLKIT))
# The motif detection script
DETECT_MOTIF =\
$(DETECT_DIR)/detect_motif.sh -o $(DETECT_UNIQ_IDENT) \
-xif $(X11_INCLUDE_FLAGS) \
-cc $(CC)
# The Motif detection script
ifeq ($(MOZ_WIDGET_TOOLKIT),motif)
DETECT_MOTIF = $(DETECT_DIR)/detect_motif.sh -o $(DETECT_UNIQ_IDENT) -xif $(X11_INCLUDE_FLAGS) -cc $(CC)
endif
# The X11 detection script
DETECT_X11 = $(DETECT_DIR)/detect_x11.sh -o $(DETECT_UNIQ_IDENT) \
-cc $(CC)
DETECT_X11 = $(DETECT_DIR)/detect_x11.sh -o $(DETECT_UNIQ_IDENT) -cc $(CC)
# This is needed for DETECT_MOTIF to work
X11_INCLUDE_FLAGS = $(shell $(DETECT_X11) -if)
#
# The following macros are generated:
#
# MOZILLA_XFE_GLIBC_BROKEN_LOCALE_FLAGS
# Needed because of currently broken locale support when mixing gnu
# libc2 with any version of motif.
#
# Needed because of currently broken locale support when mixing GNU
# libc2 with any version of Motif.
#
# MOZILLA_XFE_MOTIF_PRINT_SHELL_FLAGS
# X Print Shell Extension (available starting with X11R6.3) needed
# by motif 2.1.
#
# by Motif 2.1.
#
# MOZILLA_XFE_USE_WINNING_FILE_SELECTION
# Hacks to the motif file selection code to "fix" it. Where "fix"
# means "make the motif fsb not suck as hell". Motif source code
# is needed for this hack (it breaks with lesstif)
#
# Hacks to the Motif file selection code to "fix" it. Where "fix"
# means "make the Motif fsb not suck as hell". Motif source code
# is needed for this hack (it breaks with Lesstif)
#
# Questions about any of these flags or this wacky scheme in general, should
# go to ramiro@netscape.com.
@ -76,15 +71,11 @@ DETECT_X11 = $(DETECT_DIR)/detect_x11.sh -o $(DETECT_UNIQ_IDENT) \
all: export
export: $(DETECT_NAME)
detect: $(DETECT_NAME)
export detect: $(DETECT_NAME)
realclean clobber clobber_all clean:
clean realclean clobber clobber_all:
@rm -f $(DETECT_NAME) *_motif_$(DETECT_UNIQ_IDENT)* *_glibc_$(DETECT_UNIQ_IDENT)* *_x11_$(DETECT_UNIQ_IDENT)*
# This is needed for DETECT_MOTIF to work
X11_INCLUDE_FLAGS=$(shell $(DETECT_X11) -if)
$(DETECT_NAME):
@echo "Generating $(DETECT_NAME)."
@rm -f $@
@ -95,17 +86,14 @@ $(DETECT_NAME):
@echo "#" >> $@
@echo >> $@
@echo >> $@
##
## GLIBC
##
##
## In theory, you can use glibc2 in many platforms. Right now only Linux
## seems to be using it, though.
##
## Test whether -lBrokenLocale is needed. Locale support is broken
## when using motif (any version) with gnu libc2.
## when using Motif (any version) with GNU libc2.
##
ifeq ($(shell $(DETECT_GLIBC)),2)
@echo "# GLIBC2" >> $@
@ -114,35 +102,29 @@ ifeq ($(shell $(DETECT_GLIBC)),2)
@echo "# Broken Locale" >> $@
@echo "MOZILLA_XFE_GLIBC_BROKEN_LOCALE_FLAGS = -lBrokenLocale" >> $@
endif
##
## X11
##
##
## Set the x11 include flags
## Set the X11 include flags
##
@echo >> $@
@echo "# X11" >> $@
@echo "MOZILLA_XFE_X11_INCLUDE_FLAGS = `$(DETECT_X11) -if`" >> $@
##
## Determine if we have static x11 libs and set static flags.
## Determine if we have static X11 libs and set static flags.
##
ifneq ($(shell $(DETECT_X11) -sl),unknown)
@echo "MOZILLA_XFE_X11_HAVE_STATIC_LIB = 1" >> $@
@echo "MOZILLA_XFE_X11_STATIC_FLAGS = `$(DETECT_X11) -sf`" >> $@
endif
##
## Determine if we have dynamic x11 libs and set dynamic flags.
## Determine if we have dynamic X11 libs and set dynamic flags.
##
ifneq ($(shell $(DETECT_X11) -dl),unknown)
@echo "MOZILLA_XFE_X11_HAVE_DYNAMIC_LIB = 1" >> $@
@echo "MOZILLA_XFE_X11_DYNAMIC_PATHS = `$(DETECT_X11) -dp`" >> $@
@echo "MOZILLA_XFE_X11_DYNAMIC_FLAGS = `$(DETECT_X11) -df`" >> $@
endif
##
## Test whether -lSM -lICE are needed. These libs are need for session
## management in X11R6.
@ -150,70 +132,55 @@ endif
ifeq ($(shell $(DETECT_X11)),6)
@echo "MOZILLA_XFE_X11_SM_FLAGS = -lSM -lICE" >> $@
endif
##
## Motif
##
ifeq ($(MOZ_WIDGET_TOOLKIT),motif)
##
## Set the motif include flags
## Set the Motif include flags
##
@echo >> $@
@echo "# Motif" >> $@
@echo "MOZILLA_XFE_MOTIF_INCLUDE_FLAGS = `$(DETECT_MOTIF) -if`" >> $@
##
## Determine if we have static motif libs and set static flags.
## Determine if we have static Motif libs and set static flags.
##
ifneq ($(shell $(DETECT_MOTIF) -sl),unknown)
@echo "MOZILLA_XFE_MOTIF_HAVE_STATIC_LIB = 1" >> $@
@echo "MOZILLA_XFE_MOTIF_STATIC_FLAGS = `$(DETECT_MOTIF) -sf`" >> $@
endif
##
## Determine if we have dynamic motif libs and set dynamic flags.
## Determine if we have dynamic Motif libs and set dynamic flags.
##
ifneq ($(shell $(DETECT_MOTIF) -dl),unknown)
@echo "MOZILLA_XFE_MOTIF_HAVE_DYNAMIC_LIB = 1" >> $@
@echo "MOZILLA_XFE_MOTIF_DYNAMIC_PATHS = `$(DETECT_MOTIF) -dp`" >> $@
@echo "MOZILLA_XFE_MOTIF_DYNAMIC_FLAGS = `$(DETECT_MOTIF) -df`" >> $@
endif
##
## Test whether -lXp is needed. The -lXp (Print Shell Extensions)
## are needed only with motif 2.1.
## are needed only with Motif 2.1.
##
ifeq ($(shell $(DETECT_MOTIF)),2.1)
@echo "MOZILLA_XFE_MOTIF_PRINT_SHELL_FLAGS = -lXp" >> $@
endif
##
## Test whether -lXpm is needed. The -lXpm (X Pixmap Libary) is needed
## by some versions of motif. Some vendors try to do their customers
## favours by hacking the stock motif libs to include Xpm support.
## by some versions of Motif. Some vendors try to do their customers
## favors by hacking the stock Motif libs to include Xpm support.
##
ifeq ($(shell $(DETECT_MOTIF) -xpm),True)
@echo "MOZILLA_XFE_MOTIF_XPM_FLAGS = -lXpm" >> $@
endif
##
## Test whether we are using "real" motif libraries. If we are, then
## we can turn on the file selection hack which only works with motif
## (not lesstif)
## Test whether we are using "real" Motif libraries. If we are, then
## we can turn on the file selection hack which only works with Motif
## (not Lesstif).
##
ifneq ($(shell $(DETECT_MOTIF) -l),True)
@echo >> $@
@echo "# Winning File Selection" >> $@
@echo "MOZILLA_XFE_USE_WINNING_FILE_SELECTION = 1" >> $@
endif
# This is the endif for including motif
endif
##
## Lots of other magical things can be detected here.
##