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))
pkg_config_files=mozilla-nspr.pc mozilla-xpcom.pc mozilla-js.pc \
mozilla-gtkmozembed.pc mozilla-nss.pc \
mozilla-plugin.pc
pkg_config_files=$(MOZ_APP_NAME)-nspr.pc $(MOZ_APP_NAME)-xpcom.pc \
$(MOZ_APP_NAME)-js.pc $(MOZ_APP_NAME)-gtkmozembed.pc \
$(MOZ_APP_NAME)-nss.pc $(MOZ_APP_NAME)-plugin.pc
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 \
-e "s|%prefix%|$(prefix)|" \
-e "s|%exec_prefix%|$(exec_prefix)|" \
-e "s|%includedir%|$(includedir)|" \
-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|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
-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 \
-e "s|%prefix%|$(prefix)|" \
-e "s|%exec_prefix%|$(exec_prefix)|" \
-e "s|%includedir%|$(includedir)|" \
-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|%DEFS%|$(_DEFS)|" \
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
libs:: mozilla-config
libs:: $(MOZ_APP_NAME)-config
chmod 755 $<
$(INSTALL) -m 755 $< $(DIST)/bin
@ -91,7 +92,7 @@ endif
install:: run-mozilla.sh
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)
install:: mozilla-config
install:: $(MOZ_APP_NAME)-config
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir)
install:: $(pkg_config_files)

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

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

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

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

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

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

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

@ -558,6 +558,12 @@ TARGET_MD_ARCH=unix
DIRENT_INO=d_ino
CYGWIN_WRAPPER=
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_LIBS='-L$(DIST)/lib -lmozjpeg'
@ -3331,6 +3337,8 @@ if test "$MOZ_PHOENIX"; then
AC_DEFINE(MOZ_PHOENIX)
MOZ_XUL_APP=1
AC_DEFINE(MOZ_XUL_APP)
MOZ_APP_NAME=firefox
MOZ_APP_VERSION=`cat $topsrcdir/browser/config/version.txt`
fi
AC_SUBST(MOZ_PHOENIX)
@ -3346,6 +3354,8 @@ if test "$MOZ_THUNDERBIRD"; then
MOZ_XUL_APP=1
AC_DEFINE(MOZ_XUL_APP)
MOZ_APP_NAME=thunderbird
MOZ_APP_VERSION=`cat $topsrcdir/mail/config/version.txt`
fi
AC_SUBST(MOZ_THUNDERBIRD)
@ -3359,6 +3369,8 @@ if test "$MOZ_STANDALONE_COMPOSER"; then
MOZ_XUL_APP=1
AC_DEFINE(MOZ_XUL_APP)
MOZ_APP_NAME=nvu
MOZ_APP_VERSION=0.17+
fi
AC_SUBST(MOZ_STANDALONE_COMPOSER)
@ -4410,7 +4422,7 @@ dnl ========================================================
dnl = Define default location for MOZILLA_FIVE_HOME
dnl ========================================================
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],
[ val=`echo $withval`
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_TIMELINE)
AC_SUBST(MOZ_APP_NAME)
AC_SUBST(MOZ_APP_VERSION)
dnl win32 options
AC_SUBST(MOZ_PROFILE)
AC_SUBST(MOZ_COVERAGE)
@ -5407,9 +5422,6 @@ esac
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)
. ${srcdir}/config/chrome-versions.sh

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

@ -359,14 +359,14 @@ CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
LOCAL_INCLUDES = -I$(srcdir) -I.
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}|" \
-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:: mozilla.1
install:: $(MOZ_APP_NAME).1
$(SYSINSTALL) $(IFLAGS1) $< $(DESTDIR)$(mandir)/man1
MOZILLA_SCRIPT=mozilla
@ -384,7 +384,7 @@ libs:: $(MOZILLA_SCRIPT)
install:: $(MOZILLA_SCRIPT)
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir)
GARBAGE += mozilla.1 $(MOZILLA_SCRIPT)
GARBAGE += $(MOZ_APP_NAME).1 $(MOZILLA_SCRIPT)
endif

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

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