gecko-dev/raptor.mak

362 lines
8.4 KiB
Makefile
Raw Normal View History

1998-04-13 20:24:54 +00:00
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=.
IGNORE_MANIFEST=1
1998-04-14 21:38:20 +00:00
THIS_MAKEFILE=raptor.mak
THAT_MAKEFILE=makefile.win
!if !defined(MOZ_TOP)
#enable builds from changed top level directories
MOZ_TOP=mozilla
!endif
1998-04-14 21:38:20 +00:00
include <$(DEPTH)\config\config.mak>
# This section is copied from rules.mak
!if "$(WINOS)" == "WIN95"
W95MAKE=$(MOZ_SRC)\$(MOZ_TOP)\config\w95make.exe
1998-04-14 21:38:20 +00:00
W32OBJS = $(OBJS:.obj=.obj, )
W32LOBJS = $(OBJS: .= +-.)
!endif
######################################################################
# This makefile is designed to make building the raptor viewer
# application easy.
1998-04-13 20:24:54 +00:00
#
# Command macro defines
#
CVSCO = cvs -q co -P
# Branch tags we use
IMGLIB_BRANCH = MODULAR_IMGLIB_BRANCH
NETLIB_BRANCH = MODULAR_NETLIB_BRANCH
XPCOM_BRANCH = XPCOM_BRANCH
RAPTOR_BRANCH = RAPTOR_BRANCH
# CVS commands to pull the appropriate branch versions
CVSCO_XPCOM = $(CVSCO) -r $(XPCOM_BRANCH)
CVSCO_IMGLIB = $(CVSCO) -r $(IMGLIB_BRANCH)
CVSCO_NETLIB = $(CVSCO) -r $(NETLIB_BRANCH)
1998-04-13 20:39:27 +00:00
CVSCO_RAPTOR = $(CVSCO)
1998-04-13 20:24:54 +00:00
CVSCO_LIZARD = $(CVSCO)
1998-04-14 21:38:20 +00:00
# The list of directories that need to be built to build the
# standalone raptor test program. The order is important. The
# DIST_DIRS need to be built before the RAPTOR_DIRS.
DIST_DIRS = \
1998-04-13 20:24:54 +00:00
nsprpub \
include \
jpeg \
modules\libreg \
xpcom \
modules\zlib \
modules\libutil \
sun-java \
nav-java \
js \
modules\security\freenav \
modules\libpref \
modules\libimg \
lib\xp \
1998-04-14 21:38:20 +00:00
lib\libnet \
base
# The list of directories to build the raptor layout engine and
# related libraries.
RAPTOR_DIRS = \
1998-04-13 20:24:54 +00:00
htmlparser \
dom \
gfx \
view \
widget \
layout \
webshell
1998-04-14 21:38:20 +00:00
# Main rules
1998-04-13 20:24:54 +00:00
1998-04-14 21:38:20 +00:00
all:: all_dist all_raptor
1998-04-13 20:24:54 +00:00
1998-04-14 21:38:20 +00:00
export:: export_dist export_raptor
1998-04-13 20:24:54 +00:00
1998-04-14 21:38:20 +00:00
libs:: libs_dist libs_raptor
1998-04-13 20:24:54 +00:00
1998-04-14 21:38:20 +00:00
install:: install_dist install_raptor
1998-04-13 20:24:54 +00:00
1998-04-14 21:38:20 +00:00
depend:: depend_dist depend_raptor
1998-04-13 20:24:54 +00:00
1998-04-14 21:38:20 +00:00
clobber:: clobber_dist clobber_raptor
cd $(MOZ_SRC)\$(MOZ_TOP)
1998-04-14 21:38:20 +00:00
-rd /s /q dist
1998-04-13 20:24:54 +00:00
1998-04-14 21:38:20 +00:00
clobber_all:: clobber_all_dist clobber_all_raptor
cd $(MOZ_SRC)\$(MOZ_TOP)
1998-04-13 20:24:54 +00:00
-rd /s /q dist
1998-04-14 21:38:20 +00:00
######################################################################
1998-04-13 20:24:54 +00:00
1998-04-14 21:38:20 +00:00
# Rule to build subdirectories
$(DIST_DIRS) $(RAPTOR_DIRS)::
!if "$(WINOS)" == "WIN95"
@echo +++ make: cannot recursively make on win95 using command.com, use w95make.
!else
@echo +++ make: %MAKE_ARGS% in $(MAKEDIR)\$@
@cd $@
@$(NMAKE) -f $(THAT_MAKEFILE) %%MAKE_ARGS%%
@cd $(MAKEDIR)
!endif
######################################################################
1998-04-13 20:24:54 +00:00
# Rules for pulling the source from the cvs repository
pull_all: pull_lizard pull_xpcom pull_imglib pull_netlib pull_raptor
pull_lizard:
cd $(MOZ_SRC)\.
$(CVSCO_LIZARD) $(MOZ_TOP)/LICENSE
$(CVSCO_LIZARD) $(MOZ_TOP)/LEGAL
$(CVSCO_LIZARD) $(MOZ_TOP)/config
$(CVSCO_LIZARD) $(MOZ_TOP)/lib/liblayer
$(CVSCO_LIZARD) $(MOZ_TOP)/modules/zlib
$(CVSCO_LIZARD) $(MOZ_TOP)/modules/libutil
$(CVSCO_LIZARD) $(MOZ_TOP)/nsprpub
$(CVSCO_LIZARD) $(MOZ_TOP)/sun-java
$(CVSCO_LIZARD) $(MOZ_TOP)/nav-java
$(CVSCO_LIZARD) $(MOZ_TOP)/js
$(CVSCO_LIZARD) $(MOZ_TOP)/modules/security/freenav
$(CVSCO_XPCOM) $(MOZ_TOP)/modules/libpref
1998-04-13 20:24:54 +00:00
pull_xpcom:
@cd $(MOZ_SRC)\.
$(CVSCO_XPCOM) $(MOZ_TOP)/modules/libreg
$(CVSCO_XPCOM) $(MOZ_TOP)/xpcom
1998-04-13 20:24:54 +00:00
pull_imglib:
@cd $(MOZ_SRC)\.
$(CVSCO_IMGLIB) $(MOZ_TOP)/jpeg
$(CVSCO_IMGLIB) $(MOZ_TOP)/modules/libutil
$(CVSCO_IMGLIB) $(MOZ_TOP)/modules/libimg
1998-04-13 20:24:54 +00:00
pull_netlib:
@cd $(MOZ_SRC)\.
$(CVSCO_NETLIB) $(MOZ_TOP)/lib/xp
$(CVSCO_NETLIB) $(MOZ_TOP)/lib/libnet
$(CVSCO_NETLIB) $(MOZ_TOP)/include
1998-04-13 20:24:54 +00:00
pull_raptor:
@cd $(MOZ_SRC)\.
$(CVSCO_RAPTOR) $(MOZ_TOP)/base
$(CVSCO_RAPTOR) $(MOZ_TOP)/dom
$(CVSCO_RAPTOR) $(MOZ_TOP)/gfx
$(CVSCO_RAPTOR) $(MOZ_TOP)/htmlparser
$(CVSCO_RAPTOR) $(MOZ_TOP)/layout
$(CVSCO_RAPTOR) $(MOZ_TOP)/view
$(CVSCO_RAPTOR) $(MOZ_TOP)/webshell
$(CVSCO_RAPTOR) $(MOZ_TOP)/widget
1998-04-14 21:38:20 +00:00
######################################################################
# Build rules for the "dist" portion. The "dist" contains those things
# which are imported by the raptor test programs.
all_dist:
@cd $(MOZ_SRC)\$(MOZ_TOP)
1998-04-14 21:38:20 +00:00
$(NMAKE) -f $(THIS_MAKEFILE) export_dist
$(NMAKE) -f $(THIS_MAKEFILE) libs_dist
$(NMAKE) -f $(THIS_MAKEFILE) install_dist
export_dist::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) export $(MAKEDIR) $(DIST_DIRS)
!else
@set MAKE_ARGS=export
export_dist:: $(DIST_DIRS)
!endif
libs_dist::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) libs $(MAKEDIR) $(DIST_DIRS)
!else
@set MAKE_ARGS=libs
libs_dist:: $(DIST_DIRS)
!endif
install_dist::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) install $(MAKEDIR) $(DIST_DIRS)
!else
@set MAKE_ARGS=install
install_dist:: $(DIST_DIRS)
!endif
depend_dist::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) depend $(MAKEDIR) $(DIST_DIRS)
!else
@set MAKE_ARGS=depend
depend_dist:: $(DIST_DIRS)
!endif
clobber_dist::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) clobber $(MAKEDIR) $(DIST_DIRS)
!else
@set MAKE_ARGS=clobber
clobber_dist:: $(DIST_DIRS)
!endif
clobber_all_dist::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) clobber_all $(MAKEDIR) $(DIST_DIRS)
!else
@set MAKE_ARGS=clobber_all
clobber_all_dist:: $(DIST_DIRS)
!endif
######################################################################
# Build rules for the "raptor" portion. This builds the raptor software
# including the sample webshell viewer application.
all_raptor:
cd $(MOZ_SRC)\$(MOZ_TOP)
1998-04-14 21:38:20 +00:00
$(NMAKE) -f $(THIS_MAKEFILE) export_raptor
$(NMAKE) -f $(THIS_MAKEFILE) libs_raptor
$(NMAKE) -f $(THIS_MAKEFILE) install_raptor
export_raptor::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) export $(MAKEDIR) $(RAPTOR_DIRS)
!else
@set MAKE_ARGS=export
export_raptor:: $(RAPTOR_DIRS)
!endif
libs_raptor::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) libs $(MAKEDIR) $(RAPTOR_DIRS)
!else
@set MAKE_ARGS=libs
libs_raptor:: $(RAPTOR_DIRS)
!endif
install_raptor::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) install $(MAKEDIR) $(RAPTOR_DIRS)
!else
@set MAKE_ARGS=install
install_raptor:: $(RAPTOR_DIRS)
!endif
depend_raptor::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) depend $(MAKEDIR) $(RAPTOR_DIRS)
!else
@set MAKE_ARGS=depend
depend_raptor:: $(RAPTOR_DIRS)
!endif
clobber_raptor::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) clobber $(MAKEDIR) $(RAPTOR_DIRS)
!else
@set MAKE_ARGS=clobber
clobber_raptor:: $(RAPTOR_DIRS)
!endif
clobber_all_raptor::
!if "$(WINOS)" == "WIN95"
@$(W95MAKE) clobber_all $(MAKEDIR) $(RAPTOR_DIRS)
!else
@set MAKE_ARGS=clobber_all
clobber_all_raptor:: $(RAPTOR_DIRS)
!endif
######################################################################
1998-04-14 17:29:44 +00:00
# Build raptor Doc++ documentation
1998-04-14 21:38:20 +00:00
DOCXX = $(MOZ_TOOLS)\bin\docxx
DOCXX_RAPTOR = $(DOCXX) -H -A -p -f -B c:\fake_banner-file_name -j -a
DOCXX_DESTDIR = $(MOZ_SRC)\$(MOZ_TOP)\dist\documentation
1998-04-14 17:29:44 +00:00
doc_raptor:
1998-04-14 21:38:20 +00:00
-rm -rf $(DOCXX_DESTDIR)
-@mkdir $(DOCXX_DESTDIR)
@for %d in (raptor xpcom img dom netlib) do \
$(DOCXX_RAPTOR) -d $(DOCXX_DESTDIR)\%d $(MOZ_SRC)\$(MOZ_TOP)\dist\public\%d\*.h
1998-04-14 21:38:20 +00:00
@echo Documentation written to $(DOCXX_DESTDIR)
######################################################################
# Build tarball
DATE_CMD=unix_date
1998-04-15 18:14:33 +00:00
!if [$(DATE_CMD) +%Y%m%d > today.inc]
!endif
DATE=\
!include "today.inc"
DATE=$(DATE: =)^
!if [del today.inc]
!endif
1998-04-14 21:38:20 +00:00
TAR = tar
ZIP = $(MOZ_TOOLS)\bin\zip
GZIP = gzip
1998-04-15 18:14:33 +00:00
TARBALL = $(MOZ_SRC)\win-$(DATE).tar
TARBALL_ZIP = $(MOZ_SRC)\win-$(DATE).zip
TARFILES = mozilla README\\raptor
1998-04-14 21:38:20 +00:00
1998-04-14 21:44:21 +00:00
tarballs: tarball_zip tarball_gz
1998-04-14 21:43:16 +00:00
tarball_zip: prepare_for_tarballing
1998-04-14 21:38:20 +00:00
@echo Making $(TARBALL_ZIP)
cd $(MOZ_SRC)\.
1998-04-14 21:43:59 +00:00
rm -f $(TARBALL_ZIP)
1998-04-15 18:14:33 +00:00
$(ZIP) -9 -r -q $(TARBALL_ZIP) $(TARFILES)
1998-04-14 21:38:20 +00:00
1998-04-14 21:54:00 +00:00
tarball_gz: prepare_for_tarballing
@echo Making $(TARBALL)
1998-04-14 21:38:20 +00:00
cd $(MOZ_SRC)\.
1998-04-14 21:54:00 +00:00
rm -f $(TARBALL) $(TARBALL).gz
1998-04-15 18:14:33 +00:00
$(TAR) cf $(TARBALL) $(TARFILES)
1998-04-14 21:54:00 +00:00
@echo Making gzip of $(TARBALL)
1998-04-14 21:43:16 +00:00
$(GZIP) -9 -q $(TARBALL)
1998-04-14 21:38:20 +00:00
prepare_for_tarballing:
$(NMAKE) -f $(THIS_MAKEFILE) clobber clobber_all