Set MOZ_APP_NAME & MOZ_APP_VERSION based upon which app is being built.

Use MOZ_APP_NAME to set the proper paths for `make install`
Bug #234442 r=bryner
This commit is contained in:
cls%seawood.org 2004-02-25 03:27:11 +00:00
Родитель 80f8efd35c
Коммит bbe803c4d7
7 изменённых файлов: 714 добавлений и 565 удалений

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

@ -47,36 +47,37 @@ endif
_DEFS = $(subst \,\\\\\,$(ACDEFINES)) _DEFS = $(subst \,\\\\\,$(ACDEFINES))
pkg_config_files=mozilla-nspr.pc mozilla-xpcom.pc mozilla-js.pc \ pkg_config_files=$(MOZ_APP_NAME)-nspr.pc $(MOZ_APP_NAME)-xpcom.pc \
mozilla-gtkmozembed.pc mozilla-nss.pc \ $(MOZ_APP_NAME)-js.pc $(MOZ_APP_NAME)-gtkmozembed.pc \
mozilla-plugin.pc $(MOZ_APP_NAME)-nss.pc $(MOZ_APP_NAME)-plugin.pc
GARBAGE = $(pkg_config_files) mozilla-config GARBAGE = $(pkg_config_files) mozilla-config
mozilla-config:: mozilla-config.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk $(MOZ_APP_NAME)-config:: mozilla-config.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
cat $< | sed \ cat $< | sed \
-e "s|%prefix%|$(prefix)|" \ -e "s|%prefix%|$(prefix)|" \
-e "s|%exec_prefix%|$(exec_prefix)|" \ -e "s|%exec_prefix%|$(exec_prefix)|" \
-e "s|%includedir%|$(includedir)|" \ -e "s|%includedir%|$(includedir)|" \
-e "s|%libdir%|$(mozappdir)|" \ -e "s|%libdir%|$(mozappdir)|" \
-e "s|%MOZILLA_VERSION%|$(MOZILLA_VERSION)|" \ -e "s|%idldir%|$(idldir)|" \
-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
-e "s|%DEFS%|$(_DEFS)|" \ -e "s|%DEFS%|$(_DEFS)|" \
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \ -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@ -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
%.pc : %.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk $(MOZ_APP_NAME)-%.pc : mozilla-%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
cat $< | sed \ cat $< | sed \
-e "s|%prefix%|$(prefix)|" \ -e "s|%prefix%|$(prefix)|" \
-e "s|%exec_prefix%|$(exec_prefix)|" \ -e "s|%exec_prefix%|$(exec_prefix)|" \
-e "s|%includedir%|$(includedir)|" \ -e "s|%includedir%|$(includedir)|" \
-e "s|%libdir%|$(mozappdir)|" \ -e "s|%libdir%|$(mozappdir)|" \
-e "s|%MOZILLA_VERSION%|$(MOZILLA_VERSION)|" \ -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
-e "s|%SUPERWIN_LIBS%|$(SUPERWIN_LIBS)|" \ -e "s|%SUPERWIN_LIBS%|$(SUPERWIN_LIBS)|" \
-e "s|%DEFS%|$(_DEFS)|" \ -e "s|%DEFS%|$(_DEFS)|" \
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \ -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@ -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
libs:: mozilla-config libs:: $(MOZ_APP_NAME)-config
chmod 755 $< chmod 755 $<
$(INSTALL) -m 755 $< $(DIST)/bin $(INSTALL) -m 755 $< $(DIST)/bin
@ -91,7 +92,7 @@ endif
install:: run-mozilla.sh install:: run-mozilla.sh
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir) $(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)
install:: mozilla-config install:: $(MOZ_APP_NAME)-config
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir) $(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir)
install:: $(pkg_config_files) install:: $(pkg_config_files)

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

@ -7,7 +7,7 @@ exec_prefix_set=no
usage() usage()
{ {
cat <<EOF cat <<EOF
Usage: mozilla-config [OPTIONS] [LIBRARIES] Usage: $0 [OPTIONS] [LIBRARIES]
Options: Options:
[--prefix[=DIR]] [--prefix[=DIR]]
[--exec-prefix[=DIR]] [--exec-prefix[=DIR]]
@ -15,6 +15,7 @@ Options:
[--defines] [--defines]
[--libs] [libraries] [--libs] [libraries]
[--cflags] [components] [--cflags] [components]
[--idlflags]
Components: Components:
* *
Libraries: Libraries:
@ -70,6 +71,9 @@ while test $# -gt 0; do
--libs) --libs)
echo_libs=yes echo_libs=yes
;; ;;
--idlflags)
echo_idlflags=yes
;;
xpcom|js|nspr|gfx|jsj) xpcom|js|nspr|gfx|jsj)
echo_components="$echo_components $1" echo_components="$echo_components $1"
echo_libraries="$echo_libraries $1" echo_libraries="$echo_libraries $1"
@ -106,6 +110,10 @@ if test "$echo_cflags" = "yes"; then
echo $component_includes $includes $nspr_cflags echo $component_includes $includes $nspr_cflags
fi fi
if test "$echo_idlflags" = "yes"; then
echo "-I%{idldir}"
fi
_nspr_libs="%FULL_NSPR_LIBS%" _nspr_libs="%FULL_NSPR_LIBS%"
_xpcom_libs="-lxpcom $_nspr_libs" _xpcom_libs="-lxpcom $_nspr_libs"
_js_libs="-ljs" _js_libs="-ljs"

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

@ -25,18 +25,20 @@ USE_AUTOCONF = 1
MOZILLA_CLIENT = 1 MOZILLA_CLIENT = 1
BUILD_MODULES = @BUILD_MODULES@ BUILD_MODULES = @BUILD_MODULES@
MOZILLA_VERSION = @MOZILLA_VERSION@ MOZILLA_VERSION = @MOZILLA_VERSION@
MOZ_APP_NAME = @MOZ_APP_NAME@
MOZ_APP_VERSION = @MOZ_APP_VERSION@
prefix = @prefix@ prefix = @prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
includedir = @includedir@/mozilla-$(MOZILLA_VERSION) includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
libdir = @libdir@ libdir = @libdir@
datadir = @datadir@ datadir = @datadir@
mandir = @mandir@ mandir = @mandir@
idldir = @datadir@/idl/mozilla-$(MOZILLA_VERSION) idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
mozappdir = $(libdir)/mozilla-$(MOZILLA_VERSION) mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
mredir = $(libdir)/mre/mre-$(MOZILLA_VERSION) mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION)
mrelibdir = $(mredir)/lib mrelibdir = $(mredir)/lib
DIST = $(DEPTH)/dist DIST = $(DEPTH)/dist

1204
configure поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -558,6 +558,12 @@ TARGET_MD_ARCH=unix
DIRENT_INO=d_ino DIRENT_INO=d_ino
CYGWIN_WRAPPER= CYGWIN_WRAPPER=
MOZ_USER_DIR=".mozilla" MOZ_USER_DIR=".mozilla"
MOZ_APP_NAME=mozilla
dnl Get mozilla version from central milestone file
MOZILLA_VERSION=`$PERL $srcdir/config/milestone.pl -topsrcdir $srcdir`
AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION")
MOZ_APP_VERSION=$MOZILLA_VERSION
MOZ_JPEG_CFLAGS= MOZ_JPEG_CFLAGS=
MOZ_JPEG_LIBS='-L$(DIST)/lib -lmozjpeg' MOZ_JPEG_LIBS='-L$(DIST)/lib -lmozjpeg'
@ -3331,6 +3337,8 @@ if test "$MOZ_PHOENIX"; then
AC_DEFINE(MOZ_PHOENIX) AC_DEFINE(MOZ_PHOENIX)
MOZ_XUL_APP=1 MOZ_XUL_APP=1
AC_DEFINE(MOZ_XUL_APP) AC_DEFINE(MOZ_XUL_APP)
MOZ_APP_NAME=firefox
MOZ_APP_VERSION=`cat $topsrcdir/browser/config/version.txt`
fi fi
AC_SUBST(MOZ_PHOENIX) AC_SUBST(MOZ_PHOENIX)
@ -3346,6 +3354,8 @@ if test "$MOZ_THUNDERBIRD"; then
MOZ_XUL_APP=1 MOZ_XUL_APP=1
AC_DEFINE(MOZ_XUL_APP) AC_DEFINE(MOZ_XUL_APP)
MOZ_APP_NAME=thunderbird
MOZ_APP_VERSION=`cat $topsrcdir/mail/config/version.txt`
fi fi
AC_SUBST(MOZ_THUNDERBIRD) AC_SUBST(MOZ_THUNDERBIRD)
@ -3359,6 +3369,8 @@ if test "$MOZ_STANDALONE_COMPOSER"; then
MOZ_XUL_APP=1 MOZ_XUL_APP=1
AC_DEFINE(MOZ_XUL_APP) AC_DEFINE(MOZ_XUL_APP)
MOZ_APP_NAME=nvu
MOZ_APP_VERSION=0.17+
fi fi
AC_SUBST(MOZ_STANDALONE_COMPOSER) AC_SUBST(MOZ_STANDALONE_COMPOSER)
@ -4410,7 +4422,7 @@ dnl ========================================================
dnl = Define default location for MOZILLA_FIVE_HOME dnl = Define default location for MOZILLA_FIVE_HOME
dnl ======================================================== dnl ========================================================
MOZ_ARG_WITH_STRING(default-mozilla-five-home, MOZ_ARG_WITH_STRING(default-mozilla-five-home,
[ --enable-default-mozilla-five-home [ --with-default-mozilla-five-home
Set the default value for MOZILLA_FIVE_HOME], Set the default value for MOZILLA_FIVE_HOME],
[ val=`echo $withval` [ val=`echo $withval`
AC_DEFINE_UNQUOTED(MOZ_DEFAULT_MOZILLA_FIVE_HOME,"$val") ]) AC_DEFINE_UNQUOTED(MOZ_DEFAULT_MOZILLA_FIVE_HOME,"$val") ])
@ -5200,6 +5212,9 @@ AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
AC_SUBST(MOZ_REORDER) AC_SUBST(MOZ_REORDER)
AC_SUBST(MOZ_TIMELINE) AC_SUBST(MOZ_TIMELINE)
AC_SUBST(MOZ_APP_NAME)
AC_SUBST(MOZ_APP_VERSION)
dnl win32 options dnl win32 options
AC_SUBST(MOZ_PROFILE) AC_SUBST(MOZ_PROFILE)
AC_SUBST(MOZ_COVERAGE) AC_SUBST(MOZ_COVERAGE)
@ -5407,9 +5422,6 @@ esac
AC_SUBST(CYGDRIVE_MOUNT) AC_SUBST(CYGDRIVE_MOUNT)
dnl Get mozilla version from central milestone file
MOZILLA_VERSION=`$PERL $srcdir/config/milestone.pl -topsrcdir $srcdir`
AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION")
AC_SUBST(MOZILLA_VERSION) AC_SUBST(MOZILLA_VERSION)
. ${srcdir}/config/chrome-versions.sh . ${srcdir}/config/chrome-versions.sh

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

@ -359,14 +359,14 @@ CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
LOCAL_INCLUDES = -I$(srcdir) -I. LOCAL_INCLUDES = -I$(srcdir) -I.
ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
mozilla.1: mozilla.man.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk $(MOZ_APP_NAME).1: mozilla.man.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
@sed -e "s|\@bindir\@|${bindir}|" -e "s|\@libdir\@|${libdir}|" \ @sed -e "s|\@bindir\@|${bindir}|" -e "s|\@libdir\@|${libdir}|" \
-e "s|\@mozilla_version\@|${MOZILLA_VERSION}|" < $< > $@ -e "s|\@mozilla_version\@|${MOZ_APP_VERSION}|" < $< > $@
libs:: mozilla.1 libs:: $(MOZ_APP_NAME).1
$(INSTALL) $< $(DIST)/man/man1 $(INSTALL) $< $(DIST)/man/man1
install:: mozilla.1 install:: $(MOZ_APP_NAME).1
$(SYSINSTALL) $(IFLAGS1) $< $(DESTDIR)$(mandir)/man1 $(SYSINSTALL) $(IFLAGS1) $< $(DESTDIR)$(mandir)/man1
MOZILLA_SCRIPT=mozilla MOZILLA_SCRIPT=mozilla
@ -384,7 +384,7 @@ libs:: $(MOZILLA_SCRIPT)
install:: $(MOZILLA_SCRIPT) install:: $(MOZILLA_SCRIPT)
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir) $(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir)
GARBAGE += mozilla.1 $(MOZILLA_SCRIPT) GARBAGE += $(MOZ_APP_NAME).1 $(MOZILLA_SCRIPT)
endif endif

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

@ -46,7 +46,7 @@ endif
endif endif
endif # MOZ_PKG_FORMAT endif # MOZ_PKG_FORMAT
ifndef MOZ_PKG_APPNAME ifndef MOZ_PKG_APPNAME
MOZ_PKG_APPNAME = mozilla MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
endif endif
ifndef SDK_PKG_APPNAME ifndef SDK_PKG_APPNAME
SDK_PKG_APPNAME = gecko SDK_PKG_APPNAME = gecko