1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
##
## File: Makefile.am
## Package: gov.llnl.babel
## Revision: $Revision: 4475 $
## Modified: $Date: 2005-03-24 09:51:05 -0800 (Thu, 24 Mar 2005) $
## Description: automake makefile for the Babel compiler system
##
## Copyright (c) 2000-2001, The Regents of the University of Calfornia.
## Produced at the Lawrence Livermore National Laboratory.
## Written by the Components Team <components@llnl.gov>
## UCRL-CODE-2002-054
## All rights reserved.
##
## This file is part of Babel. For more information, see
## http://www.llnl.gov/CASC/components/. Please read the COPYRIGHT file
## for Our Notice and the LICENSE file for the GNU Lesser General Public
## License.
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU Lesser General Public License (as published by
## the Free Software Foundation) version 2.1 dated February 1999.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
## conditions of the GNU Lesser General Public License for more details.
##
## You should have recieved a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
JAR = @JAR@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
JARFILE = ../lib/$(PACKAGE)-$(VERSION).jar
#
# Java classpath path information for jar files needed for compilation
#
CP = ../lib/java-getopt-1.0.7.jar:../lib/xerces-2.4.0.jar:../lib/jcert-1.0.1.jar:../lib/jnet-1.0.1.jar:../lib/external/jsse-1.0.1.jar:../lib/xml-apis.jar
if SUPPORT_CYGWIN
CLASSPATH = `cygpath --path --windows "$(CP)"`
else
CLASSPATH = $(CP)
endif
#
# Compile the Babel jar file. Recompile only if the jar file does not
# exist or if any of the java sources are newer than the jar file.
#
all-local: jarfile
$(JARFILE): jarfile
jarfile:
@if test ! -f $(JARFILE); then \
$(MAKE) $(AM_MAKEFLAGS) force-jarfile; \
else \
newfiles=`find $(srcdir)/gov -name SCCS -prune -o \
-name CVS -prune -o \
-name .svn -prune -o \
-name "*.java" -newer $(JARFILE) -print`; \
if test "x$$newfiles" != "x"; then \
$(MAKE) $(AM_MAKEFLAGS) force-jarfile; \
fi \
fi
JAVAC_FLAGS = -g -d . -classpath "$(CLASSPATH)"
force-jarfile:
@javafiles=`find $(srcdir)/gov -name SCCS -prune -o \
-name CVS -prune -o \
-name .svn -prune -o \
-name "*.java" -print`; \
echo "$(JAVAC) $(JAVAC_FLAGS) $$javafiles"; \
if $(JAVAC) $(JAVAC_FLAGS) $$javafiles; then \
if test "X$srcdir" != "X."; then \
dtdfiles=`cd $(srcdir) ; \
find gov -name .svn -prune -o -name '*.dtd' -print`; \
cfiles=`cd $(srcdir) ; find gov -name .svn -prune -o \( -name '*.c' -o -name '*.h' \) -print`; \
for f in $$dtdfiles $$cfiles; do \
echo mkdir -p `dirname $$f`; \
mkdir -p `dirname $$f`; \
echo cp -f $(srcdir)/$$f $$f; \
cp -f $(srcdir)/$$f $$f; \
done; \
fi; \
files=`find gov -name .svn -prune -o \( -name '*.class' -o -name "*.dtd" -o -name "*.c" -o -name "*.h" \) -print`; \
echo $(JAR) cf $(JARFILE) $$files; \
$(JAR) cf $(JARFILE) $$files; \
else \
exit 1; \
fi
#
# Make the parser. This can only be done in the source directory, since it
# will over-write the java files.
#
SIDLDIR=$(srcdir)/gov/llnl/babel/parsers/sidl
parser:
@echo Compiling sidl.jj; \
cd $(SIDLDIR); ../../../../../../bin/javacc sidl.jj
#
# Make clean and copy distribution files to the distribution directory
#
clean-local:
@if test -d gov; then \
find gov -name '*.class' -exec rm -f {} \; ;\
if test "X$(srcdir)" != "X."; then \
find gov -name '*.dtd' -exec rm -f {} \; ;\
fi \
fi
dist-hook: jarfile
dirs=`cd $(srcdir); find gov -type d \( -name CVS -prune -o \
-name SCCS -prune -o -name .svn -prune -o -print \)`; \
for d in $$dirs; do \
mkdir -p $(distdir)/$$d; \
done
files=`cd $(srcdir); find gov \( -name CVS -prune \) -o \
\( -name SCCS -prune \) -o \( -name .svn -prune \) -o \
\( -name "*.java" -o \
-name "*.dtd" -o -name "*.dtd.in" -o -name "sidl.jj" \
-o -name "*.c" -o -name "*.h" \) -print`; \
for f in $$files; do \
echo cp $(srcdir)/$$f $(distdir)/$$f; \
cp $(srcdir)/$$f $(distdir)/$$f; \
done
|