Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / nsprpub / config / Makefile.in
blob54357b7c6a1828be3e91ba8e05f22da0e7daff69
1 #! gmake
2 #
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 MOD_DEPTH = ..
8 topsrcdir = @top_srcdir@
9 srcdir = @srcdir@
10 VPATH = @srcdir@
12 include $(MOD_DEPTH)/config/autoconf.mk
14 # Indicate that this directory builds build tools.
15 INTERNAL_TOOLS = 1
17 # For sanity's sake, we compile nsinstall without the wrapped system
18 # headers, so that we can use it to set up the wrapped system headers.
19 VISIBILITY_FLAGS =
21 # autoconf.mk must be deleted last (from the top-level directory)
22 # because it is included by every makefile.
23 DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config nspr.pc
25 RELEASE_BINS = nspr-config
27 include $(topsrcdir)/config/config.mk
29 CSRCS = now.c
31 CSRCS += nsinstall.c
32 PLSRCS = nfspwd.pl
34 ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
35 PROG_SUFFIX = .exe
36 else
37 PROG_SUFFIX =
38 endif
40 # Temporary workaround to disable the generation of
41 # library build time because now.c uses the 'long long'
42 # data type that's not available on some platforms.
43 ifeq (,$(filter-out QNX,$(OS_ARCH)))
44 DEFINES += -DOMIT_LIB_BUILD_TIME
45 endif
47 ifeq ($(OS_ARCH), HP-UX)
48 ifeq ($(USE_64),1)
49 XLDOPTS += +DD64
50 endif
51 endif
53 include $(topsrcdir)/config/rules.mk
55 PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
57 ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
58 TARGETS = $(PROGS)
59 else
60 ifeq (,$(filter-out WINCE,$(OS_ARCH)))
61 TARGETS = $(PROGS)
62 else
63 PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
64 TARGETS = $(PROGS) $(PLSRCS:.pl=)
65 endif
66 endif
68 OUTOPTION = -o # end of the line
69 ifeq (,$(filter-out WINNT WIN95 WINCE,$(OS_TARGET)))
70 ifndef NS_USE_GCC
71 OUTOPTION = -Fe
72 endif
73 endif
75 # Redefine MAKE_OBJDIR for just this directory
76 define MAKE_OBJDIR
77 if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
78 endef
80 export:: $(TARGETS)
81 rm -f $(dist_bindir)/nspr-config
83 ifdef WRAP_SYSTEM_INCLUDES
84 export::
85 if test ! -d system_wrappers; then mkdir system_wrappers; fi
86 $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers < $(srcdir)/system-headers
87 $(INSTALL) system_wrappers $(dist_includedir)
88 endif
90 $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
91 @$(MAKE_OBJDIR)
92 $(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
94 install:: nspr.m4
95 $(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
96 $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
98 install:: nspr.pc
99 $(NSINSTALL) -D $(DESTDIR)$(libdir)/pkgconfig
100 $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(libdir)/pkgconfig