From 971fa093e54e598d9fa8524d01955dff642ff198 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 5 Dec 2018 15:21:07 -0200 Subject: [PATCH] Separando libv3270 e ajustando processo de compilação para usá-la (provisóriamente) como um sub-módulo. --- .gitmodules | 3 +++ Makefile.in | 23 ++++++++++++++++++++--- autogen.sh | 1 + configure.ac | 7 ++++++- modules/lib3270 | 2 +- modules/libv3270 | 1 + src/pw3270/Makefile.in | 25 +++++++++++++++---------- 7 files changed, 47 insertions(+), 15 deletions(-) create mode 160000 modules/libv3270 diff --git a/.gitmodules b/.gitmodules index 4feb586..06f9bf1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "modules/lib3270"] path = modules/lib3270 url = https://github.com/PerryWerneck/lib3270.git +[submodule "modules/libv3270"] + path = modules/libv3270 + url = http://softwarepublico.gov.br/gitlab/pw3270/libv3270.git diff --git a/Makefile.in b/Makefile.in index e844183..27f308c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -81,10 +81,11 @@ Release: \ #---[ Debug Rules ]---------------------------------------------------------------------- -$(BINDBG)/@DLLPREFIX@3270@DLLEXT@: \ +$(BINDBG)/@DLLPREFIX@@LIB3270_NAME@@DLLEXT@: \ modules/lib3270/* \ modules/lib3270/src/lib3270/* \ - modules/lib3270/src/include/* + modules/lib3270/src/include/* \ + modules/lib3270/src/include/lib3270/* @$(MKDIR) `dirname $@` @$(MAKE) -C modules/lib3270 Debug @@ -92,8 +93,21 @@ $(BINDBG)/@DLLPREFIX@3270@DLLEXT@: \ @$(MKDIR) $(BINDBG) @cp ./modules/lib3270/.bin/Debug/* $(BINDBG) +$(BINDBG)/@DLLPREFIX@v@LIB3270_NAME@@DLLEXT@: \ + modules/libv3270/* \ + modules/libv3270/src/v3270/* \ + modules/libv3270/src/include/* \ + modules/libv3270/src/include/v3270/* \ + + @$(MKDIR) `dirname $@` + @$(MAKE) -C modules/libv3270 Debug + + @$(MKDIR) $(BINDBG) + @cp ./modules/libv3270/.bin/Debug/* $(BINDBG) + $(BINDBG)/%@EXEEXT@: \ - $(BINDBG)/@DLLPREFIX@3270@DLLEXT@ \ + $(BINDBG)/@DLLPREFIX@@LIB3270_NAME@@DLLEXT@ \ + $(BINDBG)/@DLLPREFIX@v@LIB3270_NAME@@DLLEXT@ \ src/% \ src/%/* @@ -140,6 +154,7 @@ $(DESTDIR)/$(libdir)/pw3270-plugins/%@DLLEXT@: \ install: \ locale/$(PACKAGE_TARNAME).pot \ install-lib3270 \ + install-libv3270 \ install-pw3270 \ install-branding \ install-ui \ @@ -252,6 +267,7 @@ cleanDebug: @rm -fr $(OBJDBG) @rm -fr $(BINDBG) @$(MAKE) -C modules/lib3270 $@ + @$(MAKE) -C modules/libv3270 $@ @$(MAKE) -C src/pw3270 $@ cleanRelease: @@ -259,6 +275,7 @@ cleanRelease: @rm -fr $(OBJRLS) @rm -fr $(BINRLS) @$(MAKE) -C modules/lib3270 $@ + @$(MAKE) -C modules/libv3270 $@ @$(MAKE) -C src/pw3270 $@ diff --git a/autogen.sh b/autogen.sh index 909b6e6..e970f15 100755 --- a/autogen.sh +++ b/autogen.sh @@ -56,6 +56,7 @@ if test $? != 0 ; then fi NOCONFIGURE=1 ./modules/lib3270/autogen.sh +NOCONFIGURE=1 ./modules/libv3270/autogen.sh echo "Package set to revision $PACKAGE_REVISION and source $PACKAGE_SOURCE" diff --git a/configure.ac b/configure.ac index 4eb4ec8..7f6c610 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,7 @@ AC_INIT([pw3270], [5.2], [perry.werneck@gmail.com]) dnl Place auxilliary scripts here. AC_CONFIG_AUX_DIR([scripts]) AC_CONFIG_SUBDIRS([modules/lib3270]) +AC_CONFIG_SUBDIRS([modules/libv3270]) dnl Compute the canonical host-system type AC_CANONICAL_HOST @@ -401,11 +402,15 @@ dnl --------------------------------------------------------------------------- AC_ARG_WITH([libname], [AS_HELP_STRING([--with-libname], [Setup library name])], [ app_cv_libname="$withval" ],[ app_cv_libname="3270" ]) -AC_SUBST(LIB3270_INCLUDEPATH,$ac_pwd/modules/lib3270/src/include/lib3270) +AC_SUBST(LIB3270_INCLUDEPATH,$ac_pwd/modules/lib3270/src/include) +AC_SUBST(LIBV3270_INCLUDEPATH,$ac_pwd/modules/libv3270/src/include) AC_SUBST(LIB3270_CFLAGS,-I$ac_pwd/modules/lib3270/src/include) AC_SUBST(LIB3270_LIBS,-l$app_cv_libname) +AC_SUBST(LIBV3270_CFLAGS,-I$ac_pwd/modules/libv3270/src/include) +AC_SUBST(LIBV3270_LIBS,-lv$app_cv_libname) + AC_SUBST(PW3270_CFLAGS,-I$ac_pwd/src/include) AC_SUBST(PW3270_LIBS,-l$PACKAGE_TARNAME) diff --git a/modules/lib3270 b/modules/lib3270 index 83a5155..7ee2d8e 160000 --- a/modules/lib3270 +++ b/modules/lib3270 @@ -1 +1 @@ -Subproject commit 83a5155f08d7c7a6b20d717f733ea88d26411b29 +Subproject commit 7ee2d8ee2d5343d0879f4a2b11862502ed967ca5 diff --git a/modules/libv3270 b/modules/libv3270 new file mode 160000 index 0000000..64bfb1a --- /dev/null +++ b/modules/libv3270 @@ -0,0 +1 @@ +Subproject commit 64bfb1a610ab503c915cca28b791a5fdfefc5774 diff --git a/src/pw3270/Makefile.in b/src/pw3270/Makefile.in index 877456e..bbfc23b 100644 --- a/src/pw3270/Makefile.in +++ b/src/pw3270/Makefile.in @@ -31,7 +31,7 @@ LIB_SOURCES=window.c actions.c fonts.c dialog.c hostdialog.c print.c colors.c \ APP_SOURCES=main.c @APP_RESOURCES@ -MODULES=v3270 uiparser v3270ft common +MODULES=uiparser common #---[ Configuration values ]------------------------------------------------------------- @@ -76,15 +76,23 @@ MSGCAT=@MSGCAT@ CONVERT=@CONVERT@ WINDRES=@WINDRES@ -CFLAGS=@CFLAGS@ \ +CFLAGS= \ + @CFLAGS@ \ @LIB3270_CFLAGS@ \ @PW3270_CFLAGS@ \ -Wno-deprecated-declarations \ - @LIBSSL_CFLAGS@ @GTK_CFLAGS@ \ + @LIBSSL_CFLAGS@ \ + @GTK_CFLAGS@ \ -DLIBDIR=\"$(libdir)\" \ -DDATAROOTDIR=\"$(datarootdir)\" -LIBS=@LIBS@ @LIBSSL_LIBS@ @GTK_LIBS@ @LIB3270_LIBS@ +LIBS= \ + @LIBS@ \ + @LIBSSL_LIBS@ \ + @GTK_LIBS@ \ + @LIB3270_LIBS@ \ + @LIBV3270_LIBS@ + LDFLAGS=@LDFLAGS@ APP_LDFLAGS=@APP_LDFLAGS@ @@ -93,8 +101,9 @@ APP_LDFLAGS=@APP_LDFLAGS@ DEPENDS=\ $(BASEDIR)/src/include/*.h \ @LIB3270_INCLUDEPATH@/*.h \ - $(BASEDIR)/src/include/pw3270/*.h \ - $(BASEDIR)/src/include/v3270/*.h \ + @LIB3270_INCLUDEPATH@/lib3270/*.h \ + @LIBV3270_INCLUDEPATH@/*.h \ + @LIB3270_INCLUDEPATH@/v3270/*.h \ *.h \ Makefile @@ -339,8 +348,6 @@ cleanDebug: $(BINDBG)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@ \ $(BINDBG)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ - @make -C v3270 cleanDebug - @make -C v3270ft cleanDebug @make -C uiparser cleanDebug @make -C common cleanDebug @@ -351,8 +358,6 @@ cleanRelease: $(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@ \ $(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ - @make -C v3270 cleanRelease - @make -C v3270ft cleanRelease @make -C uiparser cleanRelease @make -C common cleanRelease -- libgit2 0.21.2