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 | 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 | 41 | #---[ Library configuration ]------------------------------------------------------------ |
28 | 42 | |
29 | 43 | SONAME=@SONAME@ |
... | ... | @@ -33,28 +47,28 @@ INSTALL_PACKAGES=@INSTALL_PACKAGES@ |
33 | 47 | GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ |
34 | 48 | |
35 | 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 | 70 | TEST_SOURCES= \ |
57 | - $(wildcard src/testprogram/*.c) | |
71 | + $(wildcard $(srcdir)/src/testprogram/*.c) | |
58 | 72 | |
59 | 73 | #---[ Tools ]---------------------------------------------------------------------------- |
60 | 74 | |
... | ... | @@ -76,42 +90,28 @@ ZIP=@ZIP@ |
76 | 90 | DLLTOOL=@DLLTOOL@ |
77 | 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 | 100 | OBJDBG=$(OBJDIR)/Debug |
98 | 101 | OBJRLS=$(OBJDIR)/Release |
99 | 102 | |
100 | -BINDIR=$(BASEDIR)/.bin | |
103 | +BINDIR=$(BUILDDIR)/.bin | |
101 | 104 | BINDBG=$(BINDIR)/Debug |
102 | 105 | BINRLS=$(BINDIR)/Release |
103 | 106 | |
104 | 107 | #---[ Rules ]---------------------------------------------------------------------------- |
105 | 108 | |
106 | 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 | 116 | DATE_FMT = +%Y%m%d |
117 | 117 | ifdef SOURCE_DATE_EPOCH |
... | ... | @@ -123,6 +123,7 @@ CFLAGS= \ |
123 | 123 | @CFLAGS@ \ |
124 | 124 | -g \ |
125 | 125 | -Isrc/include \ |
126 | + -I$(srcdir)/src/include \ | |
126 | 127 | -DBUILD_DATE=$(BUILD_DATE) \ |
127 | 128 | -DLOCALEDIR=$(localedir) \ |
128 | 129 | @LIB3270_CFLAGS@ \ |
... | ... | @@ -233,16 +234,16 @@ install-%: \ |
233 | 234 | |
234 | 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 | 240 | @echo $@ ... |
240 | 241 | @$(MKDIR) $(@D) |
241 | 242 | |
242 | 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 | 248 | @echo $@ ... |
248 | 249 | @$(MKDIR) $(@D) |
... | ... | @@ -250,7 +251,7 @@ src/dialogs/settings/marshal.h: \ |
250 | 251 | @$(GENMARSHAL) --prefix=v3270 --header $< > $@ |
251 | 252 | |
252 | 253 | $(OBJDIR)/marshal/v3270.c: \ |
253 | - src/terminal/marshal | |
254 | + $(srcdir)/src/terminal/marshal | |
254 | 255 | |
255 | 256 | @echo $@ ... |
256 | 257 | @$(MKDIR) $(@D) |
... | ... | @@ -258,8 +259,8 @@ $(OBJDIR)/marshal/v3270.c: \ |
258 | 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 | 265 | @echo $@ ... |
265 | 266 | @$(MKDIR) $(@D) |
... | ... | @@ -267,15 +268,15 @@ src/filetransfer/marshal.h: \ |
267 | 268 | @$(GENMARSHAL) --prefix=v3270ft --header $< > $@ |
268 | 269 | |
269 | 270 | $(OBJDIR)/marshal/v3270ft.c: \ |
270 | - src/filetransfer/marshal | |
271 | + $(srcdir)/src/filetransfer/marshal | |
271 | 272 | |
272 | 273 | @echo $@ ... |
273 | 274 | @$(MKDIR) $(@D) |
274 | 275 | |
275 | 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 | 281 | @echo $@ ... |
281 | 282 | @$(MKDIR) $(@D) |
... | ... | @@ -283,14 +284,13 @@ src/trace/marshal.h: \ |
283 | 284 | @$(GENMARSHAL) --prefix=v3270trace --header $< > $@ |
284 | 285 | |
285 | 286 | $(OBJDIR)/marshal/trace.c: \ |
286 | - src/trace/marshal | |
287 | + $(srcdir)/src/trace/marshal | |
287 | 288 | |
288 | 289 | @echo $@ ... |
289 | 290 | @$(MKDIR) $(@D) |
290 | 291 | |
291 | 292 | @$(GENMARSHAL) --prefix=v3270trace --body $< > $@ |
292 | 293 | |
293 | - | |
294 | 294 | $(OBJDIR)/marshal/%.o: \ |
295 | 295 | $(OBJDIR)/marshal/%.c \ |
296 | 296 | $(DEPENDS) |
... | ... | @@ -389,7 +389,7 @@ install-windows-lib: \ |
389 | 389 | |
390 | 390 | zip: \ |
391 | 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 | 394 | install-static: \ |
395 | 395 | $(BINRLS)/static/$(LIBNAME).a |
... | ... | @@ -584,7 +584,7 @@ clean: \ |
584 | 584 | cleanDebug \ |
585 | 585 | cleanRelease |
586 | 586 | |
587 | - @rm -fr $(BASEDIR)/.tmp/$(LIBNAME) | |
587 | + @rm -fr $(BUILDDIR)/.tmp/$(LIBNAME) | |
588 | 588 | @rm -fr $(POTDIR)/$(LIBNAME) |
589 | 589 | @rm -fr src/include/marshal |
590 | 590 | @rm -fr locale/$(LIBNAME).pot | ... | ... |
autogen.sh
1 | 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 | 10 | mkdir -p scripts |
9 | 11 | mkdir -p m4 |
... | ... | @@ -45,7 +47,9 @@ automake --add-missing 2> /dev/null | true |
45 | 47 | |
46 | 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 | 361 | dnl --------------------------------------------------------------------------- |
362 | 362 | |
363 | 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 | 366 | dnl --------------------------------------------------------------------------- |
367 | 367 | dnl Configure which files to generate. | ... | ... |
src/dialogs/colorscheme.c
src/dialogs/settings/url.c
src/dialogs/settings/widget.c
src/filetransfer/activitylist.c
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | #include <internals.h> |
31 | 31 | #include <v3270/dialogs.h> |
32 | 32 | #include "private.h" |
33 | - #include "marshal.h" | |
33 | + #include <marshal/filetransfer.h> | |
34 | 34 | |
35 | 35 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ |
36 | 36 | ... | ... |
src/filetransfer/settings.c
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | #include <string.h> |
31 | 31 | #include <internals.h> |
32 | 32 | #include "private.h" |
33 | - #include "marshal.h" | |
33 | + #include <marshal/filetransfer.h> | |
34 | 34 | #include <v3270/filetransfer.h> |
35 | 35 | |
36 | 36 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ | ... | ... |
src/filetransfer/v3270ftprogress.c
src/filetransfer/worker.c
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | #include <string.h> |
31 | 31 | #include <internals.h> |
32 | 32 | #include "private.h" |
33 | - #include "marshal.h" | |
33 | + #include <marshal/filetransfer.h> | |
34 | 34 | #include <v3270/filetransfer.h> |
35 | 35 | |
36 | 36 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ | ... | ... |
src/terminal/widget.c
src/trace/trace.c
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | #include <lib3270/properties.h> |
44 | 44 | #include <internals.h> |
45 | 45 | #include <v3270/dialogs.h> |
46 | - #include "marshal.h" | |
46 | + #include <marshal/trace.h> | |
47 | 47 | |
48 | 48 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
49 | 49 | ... | ... |