java (1496:9e14c63773be) java (1532:4b4d0c3ce94b)
1
2# Copyright (C) NGINX, Inc.
3
4
5shift
6
7NXT_JAVA_HOME=${JAVA_HOME-}
8NXT_JAR_REPO=https://repo1.maven.org/maven2/

--- 213 unchanged lines hidden (view full) ---

222NXT_UNIT_JAR=nginx-unit-jsc-${NXT_JAVA_MODULE}-$NXT_VERSION.jar
223NXT_WS_API_JAR=websocket-api-${NXT_JAVA_MODULE}-$NXT_VERSION.jar
224
225NXT_JAVA_BUILD_CP=$NXT_BUILD_DIR/$NXT_JAVA_MODULE
226NXT_JAVA_INSTALL_JARS=
227NXT_JAVA_UNINSTALL_JARS=
228
229NXT_JAVA_JARS=$NXT_BUILD_DIR/$NXT_JAVA_MODULE/nxt_jars.h
1
2# Copyright (C) NGINX, Inc.
3
4
5shift
6
7NXT_JAVA_HOME=${JAVA_HOME-}
8NXT_JAR_REPO=https://repo1.maven.org/maven2/

--- 213 unchanged lines hidden (view full) ---

222NXT_UNIT_JAR=nginx-unit-jsc-${NXT_JAVA_MODULE}-$NXT_VERSION.jar
223NXT_WS_API_JAR=websocket-api-${NXT_JAVA_MODULE}-$NXT_VERSION.jar
224
225NXT_JAVA_BUILD_CP=$NXT_BUILD_DIR/$NXT_JAVA_MODULE
226NXT_JAVA_INSTALL_JARS=
227NXT_JAVA_UNINSTALL_JARS=
228
229NXT_JAVA_JARS=$NXT_BUILD_DIR/$NXT_JAVA_MODULE/nxt_jars.h
230NXT_JAVA_MOUNTS_HEADER=$NXT_BUILD_DIR/$NXT_JAVA_MODULE/nxt_java_mounts.h
231mkdir -p $NXT_BUILD_DIR/$NXT_JAVA_MODULE
232
233cat << END > $NXT_JAVA_JARS
234#ifndef _NXT_JAVA_JARS_INCLUDED_
235#define _NXT_JAVA_JARS_INCLUDED_
236
237#define NXT_JARS "$NXT_JARS"
238

--- 74 unchanged lines hidden (view full) ---

313
314if [ "$NXT_SYSTEM" = "Darwin" ]; then
315NXT_JAVA_LIBC_DIR="/usr/lib"
316else
317NXT_JAVA_LIBC_DIR=`ldd "$NXT_JAVA_LIBJVM" | grep libc.so | cut -d' ' -f3`
318NXT_JAVA_LIBC_DIR=`dirname $NXT_JAVA_LIBC_DIR`
319fi
320
230mkdir -p $NXT_BUILD_DIR/$NXT_JAVA_MODULE
231
232cat << END > $NXT_JAVA_JARS
233#ifndef _NXT_JAVA_JARS_INCLUDED_
234#define _NXT_JAVA_JARS_INCLUDED_
235
236#define NXT_JARS "$NXT_JARS"
237

--- 74 unchanged lines hidden (view full) ---

312
313if [ "$NXT_SYSTEM" = "Darwin" ]; then
314NXT_JAVA_LIBC_DIR="/usr/lib"
315else
316NXT_JAVA_LIBC_DIR=`ldd "$NXT_JAVA_LIBJVM" | grep libc.so | cut -d' ' -f3`
317NXT_JAVA_LIBC_DIR=`dirname $NXT_JAVA_LIBC_DIR`
318fi
319
321cat << END > $NXT_JAVA_MOUNTS_HEADER
320
321NXT_JAVA_MOUNTS_HEADER=nxt_${NXT_JAVA_MODULE}_mounts.h
322
323cat << END > $NXT_BUILD_DIR/$NXT_JAVA_MOUNTS_HEADER
322#ifndef _NXT_JAVA_MOUNTS_H_INCLUDED_
323#define _NXT_JAVA_MOUNTS_H_INCLUDED_
324
325
326static const nxt_fs_mount_t nxt_java_mounts[] = {
327 {(u_char *) "proc", (u_char *) "/proc", (u_char *) "proc", 0, NULL},
328 {(u_char *) "$NXT_JAVA_LIBC_DIR", (u_char *) "$NXT_JAVA_LIBC_DIR",
329 (u_char *) "bind", NXT_MS_BIND | NXT_MS_REC, NULL},

--- 36 unchanged lines hidden (view full) ---

366 nxt_dep_flags=`nxt_gen_dep_flags`
367 nxt_dep_post=`nxt_gen_dep_post`
368 nxt_objs="$nxt_objs $NXT_BUILD_DIR/$nxt_obj"
369
370 cat << END >> $NXT_MAKEFILE
371
372$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
373 mkdir -p $NXT_BUILD_DIR/src/java
324#ifndef _NXT_JAVA_MOUNTS_H_INCLUDED_
325#define _NXT_JAVA_MOUNTS_H_INCLUDED_
326
327
328static const nxt_fs_mount_t nxt_java_mounts[] = {
329 {(u_char *) "proc", (u_char *) "/proc", (u_char *) "proc", 0, NULL},
330 {(u_char *) "$NXT_JAVA_LIBC_DIR", (u_char *) "$NXT_JAVA_LIBC_DIR",
331 (u_char *) "bind", NXT_MS_BIND | NXT_MS_REC, NULL},

--- 36 unchanged lines hidden (view full) ---

368 nxt_dep_flags=`nxt_gen_dep_flags`
369 nxt_dep_post=`nxt_gen_dep_post`
370 nxt_objs="$nxt_objs $NXT_BUILD_DIR/$nxt_obj"
371
372 cat << END >> $NXT_MAKEFILE
373
374$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
375 mkdir -p $NXT_BUILD_DIR/src/java
374 \$(CC) -c \$(CFLAGS) \$(NXT_INCS) $NXT_JAVA_INCLUDE \\
376 \$(CC) -c \$(CFLAGS) -DNXT_JAVA_MOUNTS_H=\"$NXT_JAVA_MOUNTS_HEADER\" \\
377 \$(NXT_INCS) $NXT_JAVA_INCLUDE \\
375 $nxt_dep_flags \\
376 -o $NXT_BUILD_DIR/$nxt_obj $nxt_src
377 $nxt_dep_post
378
379-include $NXT_BUILD_DIR/$nxt_dep
380
381END
382

--- 257 unchanged lines hidden ---
378 $nxt_dep_flags \\
379 -o $NXT_BUILD_DIR/$nxt_obj $nxt_src
380 $nxt_dep_post
381
382-include $NXT_BUILD_DIR/$nxt_dep
383
384END
385

--- 257 unchanged lines hidden ---