Skip to content

Commit

Permalink
Add dblibj/Makefile.am (#39)
Browse files Browse the repository at this point in the history
* Add dblibj/Makefile.am to make the installation procedure easier
* Update .gitignore slightly
  • Loading branch information
yutaro-sakamoto authored Aug 28, 2023
1 parent e435840 commit 5225c92
Show file tree
Hide file tree
Showing 9 changed files with 552 additions and 14 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,11 @@ jobs:
# Build and Install Open COBOL ESQL 4J
- name: Install Open COBOL ESQL 4J
run: |
cp $OCESQL4J_POSTGRESQL_JDBC_PATH dblibj/lib
cp $COBOL4J_LIBCOBJ_JAR_PATH dblibj/lib
sh configure --prefix=/usr/
make
make install
cp $OCESQL4J_POSTGRESQL_JDBC_PATH dblibj/lib
cp $COBOL4J_LIBCOBJ_JAR_PATH dblibj/lib
cd dblibj
sbt assembly
cp target/scala-2.13/ocesql4j.jar $OCESQL4J_OCESQL4J_JAR_PATH
# Run Autotest for PostgreSQL 9.6
- name: Run tests for PostgreSQL 9.6
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,5 @@ tests/cobol_data
tests/misc
tests/sql_data
tests/sqlca
configure~
tests/*~
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ else
endif

#SUBDIRS = dblib $(OCESQL)
SUBDIRS = $(OCESQL) tests
SUBDIRS = $(OCESQL) tests dblibj
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
DIST_SUBDIRS = ocesql tests
DIST_SUBDIRS = ocesql tests dblibj
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
COPYING ChangeLog INSTALL NEWS README compile config.guess \
config.sub depcomp install-sh ltmain.sh missing ylwrap
Expand Down Expand Up @@ -335,7 +335,7 @@ top_srcdir = @top_srcdir@
@DISABLE_OCESQL_TRUE@OCESQL =

#SUBDIRS = dblib $(OCESQL)
SUBDIRS = $(OCESQL) tests
SUBDIRS = $(OCESQL) tests dblibj
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

Expand Down
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -19161,7 +19161,7 @@ then :
fi


ac_config_files="$ac_config_files Makefile ocesql/Makefile tests/Makefile"
ac_config_files="$ac_config_files Makefile ocesql/Makefile tests/Makefile dblibj/Makefile"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
Expand Down Expand Up @@ -20282,6 +20282,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"ocesql/Makefile") CONFIG_FILES="$CONFIG_FILES ocesql/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"dblibj/Makefile") CONFIG_FILES="$CONFIG_FILES dblibj/Makefile" ;;

*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ AC_CHECK_FUNCS([memmove memset setenv strcasecmp strchr strdup strrchr strstr])

AC_CONFIG_FILES([Makefile
ocesql/Makefile
tests/Makefile])
tests/Makefile
dblibj/Makefile])
AC_OUTPUT
46 changes: 46 additions & 0 deletions dblibj/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
MAIN_SRC_FILES = \
./src/main/scala/Common.scala \
./src/main/scala/Connect.scala \
./src/main/scala/ConnectionInfo.scala \
./src/main/scala/ConstValues.scala \
./src/main/scala/Cursor.scala \
./src/main/scala/DBtype.scala \
./src/main/scala/Disconnect.scala \
./src/main/scala/GlobalState.scala \
./src/main/scala/Main.scala \
./src/main/scala/OCDBState.scala \
./src/main/scala/OccursInfo.scala \
./src/main/scala/Operation.scala \
./src/main/scala/Prepare.scala \
./src/main/scala/PreparedStatementCache.scala \
./src/main/scala/QueryInfo.scala \
./src/main/scala/SQLVar.scala \
./src/main/scala/Select.scala \
./src/main/scala/SqlCA.scala

TEST_SRC_FILES = \
./src/test/scala/ConnectTest.scala

SETTING_FILES = \
build.sbt \
scalastyle-config.xml

JAR_DEPENDENCIES = \
lib/libcobj.jar \
lib/postgresql.jar

TARGET_JAR = target/scala-2.13/ocesql4j.jar

all: $(TARGET_JAR)

clean:
rm -rf $(TARGET_JAR)

$(TARGET_JAR): $(MAIN_SRC_FILES) $(TEST_SRC_FILES) $(SETTING_FILES) $(JAR_DEPENDENCIES)
sbt assembly

install: $(TARGET_JAR)
mkdir -p $(DESTDIR)$(prefix)/lib/Open-COBOL-ESQL-4j/
install $(TARGET_JAR) $(DESTDIR)$(prefix)/lib/Open-COBOL-ESQL-4j/

.PHONY: all install clean
Loading

0 comments on commit 5225c92

Please sign in to comment.