Commit ee65b52840e4c7153c69bff2b1eba893c2bfa5e1
1 parent
d9e8ef65
Exists in
master
and in
1 other branch
Updating build methods.
Showing
13 changed files
with
77 additions
and
72 deletions
Show diff stats
.gitignore
Makefile.in
@@ -24,6 +24,20 @@ | @@ -24,6 +24,20 @@ | ||
24 | # erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | 24 | # erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) |
25 | # | 25 | # |
26 | 26 | ||
27 | +#---[ Paths ]---------------------------------------------------------------------------- | ||
28 | + | ||
29 | +prefix=@prefix@ | ||
30 | +exec_prefix=@exec_prefix@ | ||
31 | +bindir=@bindir@ | ||
32 | +srcdir=@srcdir@ | ||
33 | +sbindir=@sbindir@ | ||
34 | +libdir=@libdir@ | ||
35 | +includedir=@includedir@ | ||
36 | +datarootdir=@datarootdir@ | ||
37 | +localedir=@localedir@ | ||
38 | +docdir=@docdir@ | ||
39 | +sysconfdir=@sysconfdir@ | ||
40 | + | ||
27 | #---[ Library configuration ]------------------------------------------------------------ | 41 | #---[ Library configuration ]------------------------------------------------------------ |
28 | 42 | ||
29 | SONAME=@SONAME@ | 43 | SONAME=@SONAME@ |
@@ -33,28 +47,28 @@ INSTALL_PACKAGES=@INSTALL_PACKAGES@ | @@ -33,28 +47,28 @@ INSTALL_PACKAGES=@INSTALL_PACKAGES@ | ||
33 | GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ | 47 | GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ |
34 | 48 | ||
35 | SOURCES= \ | 49 | SOURCES= \ |
36 | - $(wildcard src/terminal/*.c) \ | ||
37 | - $(wildcard src/terminal/@OSNAME@/*.rc) \ | ||
38 | - $(wildcard src/terminal/@OSNAME@/*.c) \ | ||
39 | - $(wildcard src/terminal/properties/*.c) \ | ||
40 | - $(wildcard src/terminal/drawing/*.c) \ | ||
41 | - $(wildcard src/terminal/font/*.c) \ | ||
42 | - $(wildcard src/terminal/keyboard/*.c) \ | ||
43 | - $(wildcard src/terminal/actions/*.c) \ | ||
44 | - $(wildcard src/filetransfer/*.c) \ | ||
45 | - $(wildcard src/selection/*.c) \ | ||
46 | - $(wildcard src/selection/@OSNAME@/*.c) \ | ||
47 | - $(wildcard src/trace/*.c) \ | ||
48 | - $(wildcard src/dialogs/*.c) \ | ||
49 | - $(wildcard src/dialogs/@OSNAME@/*.c) \ | ||
50 | - $(wildcard src/dialogs/print/*.c) \ | ||
51 | - $(wildcard src/dialogs/save/*.c) \ | ||
52 | - $(wildcard src/dialogs/font/*.c) \ | ||
53 | - $(wildcard src/dialogs/settings/*.c) \ | ||
54 | - $(wildcard src/tools/*.c) | 50 | + $(wildcard $(srcdir)/src/terminal/*.c) \ |
51 | + $(wildcard $(srcdir)/src/terminal/@OSNAME@/*.rc) \ | ||
52 | + $(wildcard $(srcdir)/src/terminal/@OSNAME@/*.c) \ | ||
53 | + $(wildcard $(srcdir)/src/terminal/properties/*.c) \ | ||
54 | + $(wildcard $(srcdir)/src/terminal/drawing/*.c) \ | ||
55 | + $(wildcard $(srcdir)/src/terminal/font/*.c) \ | ||
56 | + $(wildcard $(srcdir)/src/terminal/keyboard/*.c) \ | ||
57 | + $(wildcard $(srcdir)/src/terminal/actions/*.c) \ | ||
58 | + $(wildcard $(srcdir)/src/filetransfer/*.c) \ | ||
59 | + $(wildcard $(srcdir)/src/selection/*.c) \ | ||
60 | + $(wildcard $(srcdir)/src/selection/@OSNAME@/*.c) \ | ||
61 | + $(wildcard $(srcdir)/src/trace/*.c) \ | ||
62 | + $(wildcard $(srcdir)/src/dialogs/*.c) \ | ||
63 | + $(wildcard $(srcdir)/src/dialogs/@OSNAME@/*.c) \ | ||
64 | + $(wildcard $(srcdir)/src/dialogs/print/*.c) \ | ||
65 | + $(wildcard $(srcdir)/src/dialogs/save/*.c) \ | ||
66 | + $(wildcard $(srcdir)/src/dialogs/font/*.c) \ | ||
67 | + $(wildcard $(srcdir)/src/dialogs/settings/*.c) \ | ||
68 | + $(wildcard $(srcdir)/src/tools/*.c) | ||
55 | 69 | ||
56 | TEST_SOURCES= \ | 70 | TEST_SOURCES= \ |
57 | - $(wildcard src/testprogram/*.c) | 71 | + $(wildcard $(srcdir)/src/testprogram/*.c) |
58 | 72 | ||
59 | #---[ Tools ]---------------------------------------------------------------------------- | 73 | #---[ Tools ]---------------------------------------------------------------------------- |
60 | 74 | ||
@@ -76,42 +90,28 @@ ZIP=@ZIP@ | @@ -76,42 +90,28 @@ ZIP=@ZIP@ | ||
76 | DLLTOOL=@DLLTOOL@ | 90 | DLLTOOL=@DLLTOOL@ |
77 | STRIP=@STRIP@ | 91 | STRIP=@STRIP@ |
78 | 92 | ||
79 | -#---[ Paths ]---------------------------------------------------------------------------- | 93 | +#---[ Build Paths ]---------------------------------------------------------------------- |
80 | 94 | ||
81 | -prefix=@prefix@ | ||
82 | -exec_prefix=@exec_prefix@ | ||
83 | -bindir=@bindir@ | ||
84 | -sbindir=@sbindir@ | ||
85 | -libdir=@libdir@ | ||
86 | -includedir=@includedir@ | ||
87 | -datarootdir=@datarootdir@ | ||
88 | -localedir=@localedir@ | ||
89 | -docdir=@docdir@ | ||
90 | -sysconfdir=@sysconfdir@ | ||
91 | - | ||
92 | -BASEDIR=@BASEDIR@ | 95 | +BUILDDIR=@BUILDDIR@ |
93 | 96 | ||
94 | -POTDIR=$(BASEDIR)/.pot | 97 | +POTDIR=$(BUILDDIR)/.pot |
95 | 98 | ||
96 | -OBJDIR=$(BASEDIR)/.obj/$(LIBNAME) | 99 | +OBJDIR=$(BUILDDIR)/.obj/$(LIBNAME) |
97 | OBJDBG=$(OBJDIR)/Debug | 100 | OBJDBG=$(OBJDIR)/Debug |
98 | OBJRLS=$(OBJDIR)/Release | 101 | OBJRLS=$(OBJDIR)/Release |
99 | 102 | ||
100 | -BINDIR=$(BASEDIR)/.bin | 103 | +BINDIR=$(BUILDDIR)/.bin |
101 | BINDBG=$(BINDIR)/Debug | 104 | BINDBG=$(BINDIR)/Debug |
102 | BINRLS=$(BINDIR)/Release | 105 | BINRLS=$(BINDIR)/Release |
103 | 106 | ||
104 | #---[ Rules ]---------------------------------------------------------------------------- | 107 | #---[ Rules ]---------------------------------------------------------------------------- |
105 | 108 | ||
106 | DEPENDS= \ | 109 | DEPENDS= \ |
107 | - Makefile \ | ||
108 | - src/include/*.h \ | ||
109 | - src/include/v3270/*.h \ | ||
110 | - src/filetransfer/marshal.h \ | ||
111 | - src/filetransfer/private.h \ | ||
112 | - src/terminal/marshal.h \ | ||
113 | - src/trace/marshal.h \ | ||
114 | - src/dialogs/settings/marshal.h | 110 | + src/include/config.h \ |
111 | + src/include/marshal/filetransfer.h \ | ||
112 | + src/include/marshal/terminal.h \ | ||
113 | + src/include/marshal/trace.h \ | ||
114 | + src/include/marshal/dialogs.h | ||
115 | 115 | ||
116 | DATE_FMT = +%Y%m%d | 116 | DATE_FMT = +%Y%m%d |
117 | ifdef SOURCE_DATE_EPOCH | 117 | ifdef SOURCE_DATE_EPOCH |
@@ -123,6 +123,7 @@ CFLAGS= \ | @@ -123,6 +123,7 @@ CFLAGS= \ | ||
123 | @CFLAGS@ \ | 123 | @CFLAGS@ \ |
124 | -g \ | 124 | -g \ |
125 | -Isrc/include \ | 125 | -Isrc/include \ |
126 | + -I$(srcdir)/src/include \ | ||
126 | -DBUILD_DATE=$(BUILD_DATE) \ | 127 | -DBUILD_DATE=$(BUILD_DATE) \ |
127 | -DLOCALEDIR=$(localedir) \ | 128 | -DLOCALEDIR=$(localedir) \ |
128 | @LIB3270_CFLAGS@ \ | 129 | @LIB3270_CFLAGS@ \ |
@@ -233,16 +234,16 @@ install-%: \ | @@ -233,16 +234,16 @@ install-%: \ | ||
233 | 234 | ||
234 | #---[ Marshal Targets ]------------------------------------------------------------------ | 235 | #---[ Marshal Targets ]------------------------------------------------------------------ |
235 | 236 | ||
236 | -src/terminal/marshal.h: \ | ||
237 | - src/terminal/marshal | 237 | +src/include/marshal/terminal.h: \ |
238 | + $(srcdir)/src/terminal/marshal | ||
238 | 239 | ||
239 | @echo $@ ... | 240 | @echo $@ ... |
240 | @$(MKDIR) $(@D) | 241 | @$(MKDIR) $(@D) |
241 | 242 | ||
242 | @$(GENMARSHAL) --prefix=v3270 --header $< > $@ | 243 | @$(GENMARSHAL) --prefix=v3270 --header $< > $@ |
243 | 244 | ||
244 | -src/dialogs/settings/marshal.h: \ | ||
245 | - src/dialogs/settings/marshal | 245 | +src/include/marshal/dialogs.h: \ |
246 | + $(srcdir)/src/dialogs/settings/marshal | ||
246 | 247 | ||
247 | @echo $@ ... | 248 | @echo $@ ... |
248 | @$(MKDIR) $(@D) | 249 | @$(MKDIR) $(@D) |
@@ -250,7 +251,7 @@ src/dialogs/settings/marshal.h: \ | @@ -250,7 +251,7 @@ src/dialogs/settings/marshal.h: \ | ||
250 | @$(GENMARSHAL) --prefix=v3270 --header $< > $@ | 251 | @$(GENMARSHAL) --prefix=v3270 --header $< > $@ |
251 | 252 | ||
252 | $(OBJDIR)/marshal/v3270.c: \ | 253 | $(OBJDIR)/marshal/v3270.c: \ |
253 | - src/terminal/marshal | 254 | + $(srcdir)/src/terminal/marshal |
254 | 255 | ||
255 | @echo $@ ... | 256 | @echo $@ ... |
256 | @$(MKDIR) $(@D) | 257 | @$(MKDIR) $(@D) |
@@ -258,8 +259,8 @@ $(OBJDIR)/marshal/v3270.c: \ | @@ -258,8 +259,8 @@ $(OBJDIR)/marshal/v3270.c: \ | ||
258 | @$(GENMARSHAL) --prefix=v3270 --body $< > $@ | 259 | @$(GENMARSHAL) --prefix=v3270 --body $< > $@ |
259 | 260 | ||
260 | 261 | ||
261 | -src/filetransfer/marshal.h: \ | ||
262 | - src/filetransfer/marshal | 262 | +src/include/marshal/filetransfer.h: \ |
263 | + $(srcdir)/src/filetransfer/marshal | ||
263 | 264 | ||
264 | @echo $@ ... | 265 | @echo $@ ... |
265 | @$(MKDIR) $(@D) | 266 | @$(MKDIR) $(@D) |
@@ -267,15 +268,15 @@ src/filetransfer/marshal.h: \ | @@ -267,15 +268,15 @@ src/filetransfer/marshal.h: \ | ||
267 | @$(GENMARSHAL) --prefix=v3270ft --header $< > $@ | 268 | @$(GENMARSHAL) --prefix=v3270ft --header $< > $@ |
268 | 269 | ||
269 | $(OBJDIR)/marshal/v3270ft.c: \ | 270 | $(OBJDIR)/marshal/v3270ft.c: \ |
270 | - src/filetransfer/marshal | 271 | + $(srcdir)/src/filetransfer/marshal |
271 | 272 | ||
272 | @echo $@ ... | 273 | @echo $@ ... |
273 | @$(MKDIR) $(@D) | 274 | @$(MKDIR) $(@D) |
274 | 275 | ||
275 | @$(GENMARSHAL) --prefix=v3270ft --body $< > $@ | 276 | @$(GENMARSHAL) --prefix=v3270ft --body $< > $@ |
276 | 277 | ||
277 | -src/trace/marshal.h: \ | ||
278 | - src/trace/marshal | 278 | +src/include/marshal/trace.h: \ |
279 | + $(srcdir)/src/trace/marshal | ||
279 | 280 | ||
280 | @echo $@ ... | 281 | @echo $@ ... |
281 | @$(MKDIR) $(@D) | 282 | @$(MKDIR) $(@D) |
@@ -283,14 +284,13 @@ src/trace/marshal.h: \ | @@ -283,14 +284,13 @@ src/trace/marshal.h: \ | ||
283 | @$(GENMARSHAL) --prefix=v3270trace --header $< > $@ | 284 | @$(GENMARSHAL) --prefix=v3270trace --header $< > $@ |
284 | 285 | ||
285 | $(OBJDIR)/marshal/trace.c: \ | 286 | $(OBJDIR)/marshal/trace.c: \ |
286 | - src/trace/marshal | 287 | + $(srcdir)/src/trace/marshal |
287 | 288 | ||
288 | @echo $@ ... | 289 | @echo $@ ... |
289 | @$(MKDIR) $(@D) | 290 | @$(MKDIR) $(@D) |
290 | 291 | ||
291 | @$(GENMARSHAL) --prefix=v3270trace --body $< > $@ | 292 | @$(GENMARSHAL) --prefix=v3270trace --body $< > $@ |
292 | 293 | ||
293 | - | ||
294 | $(OBJDIR)/marshal/%.o: \ | 294 | $(OBJDIR)/marshal/%.o: \ |
295 | $(OBJDIR)/marshal/%.c \ | 295 | $(OBJDIR)/marshal/%.c \ |
296 | $(DEPENDS) | 296 | $(DEPENDS) |
@@ -389,7 +389,7 @@ install-windows-lib: \ | @@ -389,7 +389,7 @@ install-windows-lib: \ | ||
389 | 389 | ||
390 | zip: \ | 390 | zip: \ |
391 | $(BINRLS)/$(SONAME) | 391 | $(BINRLS)/$(SONAME) |
392 | - @$(ZIP) -9 -j $(BASEDIR)/@PACKAGE_NAME@-@PACKAGE_VERSION@-@PACKAGE_RELEASE@-@host_cpu@.zip $(BINRLS)/$(SONAME) | 392 | + @$(ZIP) -9 -j $(BUILDDIR)/@PACKAGE_NAME@-@PACKAGE_VERSION@-@PACKAGE_RELEASE@-@host_cpu@.zip $(BINRLS)/$(SONAME) |
393 | 393 | ||
394 | install-static: \ | 394 | install-static: \ |
395 | $(BINRLS)/static/$(LIBNAME).a | 395 | $(BINRLS)/static/$(LIBNAME).a |
@@ -584,7 +584,7 @@ clean: \ | @@ -584,7 +584,7 @@ clean: \ | ||
584 | cleanDebug \ | 584 | cleanDebug \ |
585 | cleanRelease | 585 | cleanRelease |
586 | 586 | ||
587 | - @rm -fr $(BASEDIR)/.tmp/$(LIBNAME) | 587 | + @rm -fr $(BUILDDIR)/.tmp/$(LIBNAME) |
588 | @rm -fr $(POTDIR)/$(LIBNAME) | 588 | @rm -fr $(POTDIR)/$(LIBNAME) |
589 | @rm -fr src/include/marshal | 589 | @rm -fr src/include/marshal |
590 | @rm -fr locale/$(LIBNAME).pot | 590 | @rm -fr locale/$(LIBNAME).pot |
autogen.sh
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | -test -n "$mydir" || mydir=$(readlink -f $(dirname "$0")) | ||
4 | -test -n "$mydir" || mydir=. | 3 | +builddir=${PWD} |
5 | 4 | ||
6 | -cd "${mydir}" | 5 | +test -n "$srcdir" || srcdir=`dirname "$0"` |
6 | +test -n "$srcdir" || srcdir=. | ||
7 | + | ||
8 | +cd "$srcdir" | ||
7 | 9 | ||
8 | mkdir -p scripts | 10 | mkdir -p scripts |
9 | mkdir -p m4 | 11 | mkdir -p m4 |
@@ -45,7 +47,9 @@ automake --add-missing 2> /dev/null | true | @@ -45,7 +47,9 @@ automake --add-missing 2> /dev/null | true | ||
45 | 47 | ||
46 | autopoint | 48 | autopoint |
47 | 49 | ||
48 | -test -n "$NOCONFIGURE" || "./configure" "$@" | 50 | +cd "${builddir}" |
51 | + | ||
52 | +test -n "$NOCONFIGURE" || "$srcdir/configure" --srcdir=${srcdir} $@ | ||
49 | 53 | ||
50 | 54 | ||
51 | 55 |
configure.ac
@@ -361,7 +361,7 @@ dnl Directory config | @@ -361,7 +361,7 @@ dnl Directory config | ||
361 | dnl --------------------------------------------------------------------------- | 361 | dnl --------------------------------------------------------------------------- |
362 | 362 | ||
363 | AC_ARG_WITH([build-dir], [AS_HELP_STRING([--with-build-dir], [Setup build path])], [ app_cv_buildir="$withval" ],[ app_cv_buildir="$ac_pwd" ]) | 363 | AC_ARG_WITH([build-dir], [AS_HELP_STRING([--with-build-dir], [Setup build path])], [ app_cv_buildir="$withval" ],[ app_cv_buildir="$ac_pwd" ]) |
364 | -AC_SUBST(BASEDIR,$app_cv_buildir) | 364 | +AC_SUBST(BUILDDIR,$app_cv_buildir) |
365 | 365 | ||
366 | dnl --------------------------------------------------------------------------- | 366 | dnl --------------------------------------------------------------------------- |
367 | dnl Configure which files to generate. | 367 | dnl Configure which files to generate. |
src/dialogs/colorscheme.c
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | #include <v3270.h> | 34 | #include <v3270.h> |
35 | #include <lib3270/log.h> | 35 | #include <lib3270/log.h> |
36 | #include <v3270/colorscheme.h> | 36 | #include <v3270/colorscheme.h> |
37 | - #include "../terminal/marshal.h" | 37 | + #include <marshal/terminal.h> |
38 | 38 | ||
39 | #define V3270_COLOR_BASE V3270_COLOR_GRAY+1 | 39 | #define V3270_COLOR_BASE V3270_COLOR_GRAY+1 |
40 | 40 |
src/dialogs/settings/url.c
src/dialogs/settings/widget.c
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "../private.h" | 30 | #include "../private.h" |
31 | - #include "../terminal/marshal.h" | 31 | + #include <marshal/terminal.h> |
32 | #include <internals.h> | 32 | #include <internals.h> |
33 | #include <v3270/settings.h> | 33 | #include <v3270/settings.h> |
34 | #include <lib3270/log.h> | 34 | #include <lib3270/log.h> |
src/filetransfer/activitylist.c
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | #include <internals.h> | 30 | #include <internals.h> |
31 | #include <v3270/dialogs.h> | 31 | #include <v3270/dialogs.h> |
32 | #include "private.h" | 32 | #include "private.h" |
33 | - #include "marshal.h" | 33 | + #include <marshal/filetransfer.h> |
34 | 34 | ||
35 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ | 35 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ |
36 | 36 |
src/filetransfer/settings.c
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | #include <string.h> | 30 | #include <string.h> |
31 | #include <internals.h> | 31 | #include <internals.h> |
32 | #include "private.h" | 32 | #include "private.h" |
33 | - #include "marshal.h" | 33 | + #include <marshal/filetransfer.h> |
34 | #include <v3270/filetransfer.h> | 34 | #include <v3270/filetransfer.h> |
35 | 35 | ||
36 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ | 36 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ |
src/filetransfer/v3270ftprogress.c
src/filetransfer/worker.c
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | #include <string.h> | 30 | #include <string.h> |
31 | #include <internals.h> | 31 | #include <internals.h> |
32 | #include "private.h" | 32 | #include "private.h" |
33 | - #include "marshal.h" | 33 | + #include <marshal/filetransfer.h> |
34 | #include <v3270/filetransfer.h> | 34 | #include <v3270/filetransfer.h> |
35 | 35 | ||
36 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ | 36 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ |
src/terminal/widget.c
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | 19 | ||
20 | #include <config.h> | 20 | #include <config.h> |
21 | #include <terminal.h> | 21 | #include <terminal.h> |
22 | - #include "marshal.h" | 22 | + #include <marshal/terminal.h> |
23 | 23 | ||
24 | #include <lib3270.h> | 24 | #include <lib3270.h> |
25 | #include <lib3270/log.h> | 25 | #include <lib3270/log.h> |
src/trace/trace.c
@@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
43 | #include <lib3270/properties.h> | 43 | #include <lib3270/properties.h> |
44 | #include <internals.h> | 44 | #include <internals.h> |
45 | #include <v3270/dialogs.h> | 45 | #include <v3270/dialogs.h> |
46 | - #include "marshal.h" | 46 | + #include <marshal/trace.h> |
47 | 47 | ||
48 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 48 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
49 | 49 |