tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Makefile.in (4330B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 
      5 dist_dest   = $(DIST)/$(MOZ_MACBUNDLE_NAME)
      6 
      7 # hardcode en-US for the moment
      8 AB_CD = en-US
      9 
     10 # Build a binary bootstrapping with XRE_main
     11 
     12 include $(topsrcdir)/config/config.mk
     13 
     14 # If we are trying to show an error dialog about the lack of SSE2 support,
     15 # make sure that code itself doesn't use SSE2.
     16 ifdef MOZ_LINUX_32_SSE2_STARTUP_ERROR
     17 CXX := $(filter-out -march=% -msse -msse2 -mfpmath=sse,$(CXX))
     18 CXX += -march=pentiumpro
     19 endif
     20 
     21 PROGRAMS_DEST = $(DIST)/bin
     22 objdir = $(topobjdir)/browser/app
     23 
     24 include $(topsrcdir)/config/rules.mk
     25 
     26 ifneq (,$(filter-out WINNT,$(OS_ARCH)))
     27 
     28 ifdef COMPILE_ENVIRONMENT
     29 ifndef MOZ_NO_PIE_COMPAT
     30 libs::
     31 cp -p $(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
     32 endif
     33 endif
     34 
     35 endif
     36 
     37 ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
     38 
     39 # channel-prefs.js has been removed on macOS.
     40 # channel-prefs.js is handled separately from other prefs due to bug 756325.
     41 # DO NOT change the content of channel-prefs.js without taking the appropriate
     42 # steps. See bug 1431342.
     43 libs:: $(srcdir)/profile/channel-prefs.js
     44 $(NSINSTALL) -D $(DIST)/bin/defaults/pref
     45 $(call py_action,preprocessor channel-prefs.js,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
     46 
     47 else
     48 
     49 MAC_APP_NAME = $(MOZ_APP_DISPLAYNAME)
     50 
     51 ifdef MOZ_DEBUG
     52 MAC_APP_NAME := $(MAC_APP_NAME)Debug
     53 endif
     54 
     55 AB_CD = $(MOZ_UI_LOCALE)
     56 
     57 ifeq (zh-TW,$(AB_CD))
     58 LPROJ_ROOT := $(subst -,_,$(AB_CD))
     59 else
     60 LPROJ_ROOT := $(firstword $(subst -, ,$(AB_CD)))
     61 endif
     62 LPROJ := Contents/Resources/$(LPROJ_ROOT).lproj
     63 
     64 repackage::
     65 $(RM) -r $(dist_dest)
     66 
     67 MAC_BUNDLE_VERSION = $(shell $(PYTHON3) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/buildid.h)
     68 
     69 .PHONY: repackage
     70 tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir)/macbuild/Contents/MacOS-files.txt
     71 rm -rf '$(dist_dest)'
     72 $(MKDIR) -p '$(dist_dest)/Contents/MacOS'
     73 $(MKDIR) -p '$(dist_dest)/$(LPROJ)'
     74 rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents '$(dist_dest)' --exclude English.lproj
     75 rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ '$(dist_dest)/$(LPROJ)'
     76 $(call py_action,preprocessor Info.plist,-Fsubstitution -DAPP_VERSION='$(MOZ_APP_VERSION)' -DMOZ_APP_NAME='$(MOZ_APP_NAME)' -DMAC_APP_NAME='$(MAC_APP_NAME)' -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' -DMAC_BUNDLE_VERSION='$(MAC_BUNDLE_VERSION)' -DMOZ_SMPRIVILEGEDEXECUTABLES_REQUIREMENTS='$(MOZ_SMPRIVILEGEDEXECUTABLES_REQUIREMENTS)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o '$(dist_dest)/Contents/Info.plist')
     77 $(call py_action,preprocessor InfoPlist.strings,-Fsubstitution --output-encoding utf-16 -DMAC_APP_NAME='$(MAC_APP_NAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o '$(dist_dest)/$(LPROJ)/InfoPlist.strings')
     78 rsync -a --exclude-from='$(objdir)/macbuild/Contents/MacOS-files.txt' $(DIST)/bin/ '$(dist_dest)/Contents/Resources'
     79 rsync -a --include-from='$(objdir)/macbuild/Contents/MacOS-files.txt' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS'
     80 # MacOS-files-copy.in is a list of files that should be copies rather
     81 # than symlinks and placed in .app/Contents/MacOS.
     82 rsync -aL --include-from='$(srcdir)/macbuild/Contents/MacOS-files-copy.in' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS'
     83 $(RM) '$(dist_dest)/Contents/MacOS/$(MOZ_APP_NAME)'
     84 rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(dist_dest)/Contents/MacOS'
     85 cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/firefox.icns '$(dist_dest)/Contents/Resources/firefox.icns'
     86 cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/document.icns '$(dist_dest)/Contents/Resources/document.icns'
     87 ifndef BASE_BROWSER_UPDATE
     88 $(MKDIR) -p '$(dist_dest)/Contents/Library/LaunchServices'
     89 ifdef MOZ_UPDATER
     90 cp -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices'
     91 endif
     92 endif
     93 $(MKDIR) -p '$(dist_dest)/Contents/Frameworks'
     94 mv '$(dist_dest)/Contents/Resources/ChannelPrefs.framework' '$(dist_dest)/Contents/Frameworks'
     95 printf APPLTORB > '$(dist_dest)/Contents/PkgInfo'
     96 endif