2 # check.mk -- Run make -f check.mk for integrated unit testing
3 # Copyright (C) 2007 Sergey Yanovich
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 top_srcdir
:= $(shell cd ..
&& pwd
)
20 HOST_OS_GUESS
=$(shell ..
/build
/autoconf
/config.guess
)
21 HOST_OS
=$(shell ..
/build
/autoconf
/config.sub
$(HOST_OS_GUESS
))
23 ifneq (,$(findstring mingw
,$(HOST_OS
)))
25 LIBXULPATH
=/src
/xulrunner-build
/dist/
27 ifneq (,$(findstring linux
,$(HOST_OS
)))
29 LIBXULPATH
=$(shell PKG_CONFIG_PATH
=$PKG_CONFIG_PATH:/usr
/local
/lib
/pkgconfig pkg-config
--variable
=sdkdir libxul
)
31 $(error
"platform not supported, yet")
37 setup
: objdir
/Makefile
39 mozconfig
: app
/test/unit
/mozconfig.
$(OS_ARCH
)
42 objdir
/Makefile
: mozconfig
$(top_srcdir
)/configure
$(top_srcdir
)/nsprpub
/configure
43 test -d objdir || mkdir objdir
46 MOZCONFIG
=$(top_srcdir
)/abstract
/mozconfig
$(top_srcdir
)/configure \
47 --with-libxul-sdk
=$(LIBXULPATH
)
50 $(top_srcdir
)/configure
: $(top_srcdir
)/configure.in
51 cd
$(top_srcdir
) && autoconf
53 $(top_srcdir
)/nsprpub
/configure
: $(top_srcdir
)/nsprpub
/configure.in
54 cd
$(top_srcdir
)/nsprpub
&& autoconf
56 objdir
/nsprpub
/config
/nspr-config
: objdir
/Makefile
57 test -d objdir
/nsprpub
/config || mkdir
-p objdir
/nsprpub
/config
60 build
: objdir
/Makefile objdir
/nsprpub
/config
/nspr-config
63 clean: objdir
/Makefile
64 $(MAKE
) -C objdir
clean
66 install: objdir
/Makefile
67 $(MAKE
) -C objdir
install
69 objpkg
/Makefile
: $(top_srcdir
)/configure
70 test -d objpkg || mkdir objpkg
72 MOZCONFIG
=$(top_srcdir
)/abstract
/installer
/mozconfig
$(top_srcdir
)/configure \
73 --with-libxul-sdk
=$(LIBXULPATH
)
75 installer
: objpkg
/Makefile
77 $(MAKE
) -C objpkg installer
79 package
: objpkg
/Makefile
81 $(MAKE
) -C objpkg package
83 .PHONY
: all setup
clean build
install package installer