autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating jar file using autotools


From: Peter Fodrek
Subject: Creating jar file using autotools
Date: Wed, 23 Nov 2011 13:47:38 +0100

Dear autotools experts,

I am stranger in builtools like autotols. My practice in Unix based  C and Java
programming  using manually created Makefiles lasts 15 years.

I am able to produce both ELF  binaries (from C source code and java source
using gcj) and class files form java source codes, but I am not able to produce
jar archive form class or java source files.

Would anybody describe me  where are my mistakes,please?
Would anybody describe me  possible solutions, please?

I was unable to find out soultion except
one at URL http://lists.gnu.org/archive/html/automake/2011-07/msg00015.html
that does not work for me.

Thank you for any answer

I look forward hearing form you

Yours faithfully

Peter Fodrek



P.S. 
My top level
configure.in 
file contanis 

AC_INIT(hello.c)

PACKAGE=helloworld
VERSION=0.1.0
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)

AC_PROG_CC = gcc
#INTI_REQUIRED_VERSION=1.0.7
#PKG_CHECK_MODULES(INTI, inti-1.0 >= $INTI_REQUIRED_VERSION)
#AC_SUBST(INTI_CFLAGS)
#AC_SUBST(INTI_LIBS)

AM_PROG_GCJ = gcj
AC_PROG_CC = gcj

AC_OUTPUT(Makefile java/Makefile)



my top level
Makefile.am
file con contains

bin_PROGRAMS = helloworld
SUBDIRS = . java

#AM_CFLAGS = $(INTI_CFLAGS)

AM_JAVAC = javac -d .

helloworld_SOURCES= hello.c


and Makaefile.am 
in the java directory contains


#bin_PROGRAMS = helloJ.jar
java_PROGRAMS = helloJAVA
#jar_ARCHIVES = helloJ

JARTARGET= jar
#JARS = jar

javadir = ./java
jardir = ./java
#_JAVA = jar
AM_JAVAC = javac

AM_JAR = jar

JAVACFLAGS = -d .

dist_java_JAVA = ./helloJ.java ./hello.java

dist_java_JAR = ./helloJ.java ./hello.java

jar_JARS = helloJ.jar
#helloJ_jar_SOURCES = ./helloJ.java ./hello.java



dir = java
AC_OUTPUT= java
helloJAVA_SOURCES= hello.java
helloJAVA_LDFLAGS=--main=hello



reply via email to

[Prev in Thread] Current Thread [Next in Thread]