2796N/A# Copyright (c) 2005, 2008, Oracle
and/or its affiliates. All rights reserved.
2796N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2796N/A# This code is free software; you can redistribute it
and/or modify it
2796N/A# under the terms of the GNU General Public License version 2 only, as
2796N/A# published by the Free Software Foundation.
2796N/A# This code is distributed in the hope that it will be useful, but WITHOUT
2796N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2796N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2796N/A# version 2 for more details (a copy is included in the LICENSE file that
2796N/A# You should have received a copy of the GNU General Public License version
2796N/A# 2 along with this work; if not, write to the Free Software Foundation,
2796N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2796N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2796N/A# 1. We use relative names for cscope.
2796N/A# enough to only build what has changed. It can be confused, however,
2796N/A# if files are renamed or removed, so it may be necessary to manually
2796N/ACSDIRS = $(CS_TOP)/src $(CS_TOP)/build
2796N/A# Allow .java files to be added from the environment (CSCLASSES=yes).
2796N/AADDCLASSES= -o -name '*.java'
2796N/A# Adding CClassHeaders also pushes the file count of a full workspace up about
2796N/A# 200 files (these files also don't exist in a new workspace, and thus will
2796N/A# cause the recreation of the database as they get created, which might seem
2796N/A# a little confusing). Thus allow these files to be added from the environment
2796N/ARMCCHEADERS= -o -name CClassHeaders
2796N/A# Use CS_GENERATED=x to include auto-generated files in the build directories.
2796N/ACS_ADD_GENERATED = -o -name '*.incl'
2796N/ACS_PRUNE_GENERATED = -o -name '${OS}_*_core' -o -name '${OS}_*_compiler?'
2796N/A# OS-specific files for other systems are excluded by default. Use CS_OS=yes
2796N/A# to include platform-specific files for other platforms.
2796N/ACS_OS = linux macos solaris win32 bsd
2796N/ACS_PRUNE_OS = $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS}))
2796N/A# Processor-specific files for other processors are excluded by default. Use
2796N/A# CS_CPU=x to include platform-specific files for other platforms.
2796N/ACS_CPU = i486 sparc amd64 ia64
2796N/ACS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
2796N/A# What files should we include? A simple rule might be just those files under
2796N/A# SCCS control, however this would miss files we create like the opcodes and
2796N/A# CClassHeaders. The following attempts to find everything that is *useful*.
2796N/A# (.del files are created by sccsrm, demo directories contain many .java files
2796N/A# that probably aren't useful for development, and the pkgarchive may contain
2796N/A# duplicates of files within the source hierarchy).
2796N/ACS_PRUNE_STD = $(SCM_DIRS) \
2796N/ACS_PRUNE = $(CS_PRUNE_STD) \
2796N/ACSFILENAMES = -name '*.[ch]pp' \
2796N/A# The .raw file is reordered here in an attempt to make cscope display the most
2796N/A -egrep -v "\.java|\/make\/" $< >> $@
2796N/A -find $(CSDIRS) -type d \( $(CS_PRUNE) \) -prune -o \
2796N/A -type f \( $(CSFILENAMES) \) -print > $@
2796N/A egrep -v '^-|^$$' $< | etags --members -
2796N/A# normally no need to rebuild the cscope database. To force a rebuild of
2796N/A ( cmp -s $@ $< ) || ( cp $< $@ )
2796N/A# `hg status' is slightly faster than `hg fstatus'. Both are
2796N/A# quite a bit slower on an NFS mounted file system, so this is
2796N/A# really geared towards repos on local file systems.