mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Hi Rich, automake's policy on what to remove via "make clean" is reasonable: if running build rules creates it, then "make clean" can and should remove it. However, even if build rules happen to create backup files, please remove only the specific ones they can create, not all of the ones in a directory. Just in case someone relies on those and expect them to hang around... >From 1e8be391ac17b4ddcf9671e8413d2660844e6993 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Thu, 30 Apr 2009 15:47:52 +0200 Subject: [PATCH] build: don't tell "make clean" to remove my '~' backup files * Makefile.am (CLEANFILES): Don't remove '~' backup files. * daemon/Makefile.am: Ditto. * examples/Makefile.am: Ditto. * fish/Makefile.am: Ditto. * images/Makefile.am: Ditto. * inspector/Makefile.am: Ditto. * java/Makefile.am: Ditto. * ocaml/Makefile.am: Ditto. * ocaml/examples/Makefile.am: Ditto. * perl/Makefile.am: Ditto. * python/Makefile.am: Ditto. * ruby/Makefile.am: Ditto. * src/Makefile.am: Ditto.
99 lines
2.8 KiB
Makefile
99 lines
2.8 KiB
Makefile
# libguestfs Java bindings
|
|
# Copyright (C) 2009 Red Hat Inc.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# 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
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
CPTH = com/redhat/et/libguestfs
|
|
|
|
java_sources = \
|
|
$(CPTH)/LibGuestFSException.java \
|
|
$(CPTH)/IntBool.java \
|
|
$(CPTH)/PV.java \
|
|
$(CPTH)/VG.java \
|
|
$(CPTH)/LV.java \
|
|
$(CPTH)/Stat.java \
|
|
$(CPTH)/StatVFS.java \
|
|
$(CPTH)/GuestFS.java
|
|
|
|
java_tests = \
|
|
t/GuestFS005Load.java \
|
|
t/GuestFS010Launch.java \
|
|
t/GuestFS050LVCreate.java
|
|
|
|
EXTRA_DIST = \
|
|
$(java_sources) \
|
|
$(java_tests) \
|
|
run-java-test
|
|
|
|
CLEANFILES = doc-stamp
|
|
|
|
if HAVE_JAVA
|
|
|
|
# Java source.
|
|
|
|
libguestfs_jardir = $(JAR_INSTALL_DIR)
|
|
libguestfs_jar_DATA = libguestfs-${VERSION}.jar
|
|
libguestfs_jar_class_files = $(java_sources:.java=.class)
|
|
$(libguestfs_jar_class_files): %.class: %.java
|
|
$(JAVAC) $(JAVAC_FLAGS) -classpath $(CPTH) $(java_sources)
|
|
|
|
libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files)
|
|
$(JAR) cf $@ $^
|
|
|
|
# JNI source.
|
|
|
|
lib_LTLIBRARIES = libguestfs_jni.la
|
|
libguestfs_jni_la_SOURCES = \
|
|
com_redhat_et_libguestfs_GuestFS.h \
|
|
com_redhat_et_libguestfs_GuestFS.c
|
|
|
|
libguestfs_jni_la_LIBADD = $(top_builddir)/src/libguestfs.la
|
|
libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO)
|
|
libguestfs_jni_la_CFLAGS = -Wall -I$(top_builddir)/src $(JNI_CFLAGS)
|
|
|
|
BUILT_SOURCES = com_redhat_et_libguestfs_GuestFS.h
|
|
|
|
com_redhat_et_libguestfs_GuestFS.h: $(CPTH)/GuestFS.class
|
|
$(JAVAH) -classpath .:$(CPTH) com.redhat.et.libguestfs.GuestFS
|
|
|
|
# Documentation.
|
|
|
|
noinst_SCRIPTS = doc-stamp
|
|
|
|
doc-stamp: $(java_sources)
|
|
$(JAVADOC) $(JAVADOC_FLAGS) -d api \
|
|
-sourcepath $(srcdir) \
|
|
-windowtitle "libguestfs java $(VERSION) API reference" \
|
|
-doctitle "libguestfs java $(VERSION) API reference" \
|
|
com.redhat.et.libguestfs
|
|
touch $@
|
|
|
|
install-data-hook:
|
|
mkdir -p $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)-java-$(PACKAGE_VERSION)
|
|
cp -a api/* $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)-java-$(PACKAGE_VERSION)
|
|
|
|
# Tests (not comprehensive).
|
|
|
|
TESTS = $(java_tests:.java=.class)
|
|
TESTS_ENVIRONMENT = \
|
|
JAVA=$(JAVA) \
|
|
CLASSPATH=t:libguestfs-$(VERSION).jar \
|
|
LIBGUESTFS_PATH=$(abs_top_builddir) \
|
|
./run-java-test
|
|
|
|
t/%.class: t/%.java
|
|
$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar $<
|
|
|
|
endif |