The MinGW.org Installation Manager Tool
Révision | 9309a0763261b39e703b2e184dc742a29f882541 (tree) |
---|---|
l'heure | 2013-04-11 03:55:47 |
Auteur | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Fix MinGW-Bug #1601 (on new issues tracker).
@@ -1,3 +1,28 @@ | ||
1 | +2013-04-10 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Fix MinGW-Bug #1601 (on new issues tracker). | |
4 | + | |
5 | + * aclocal.m4 (makeopts.m4): New build-aux module; include it. | |
6 | + (MINGW_AC_PROG_LEX): New macro; implement it. | |
7 | + | |
8 | + * configure.ac (AC_INIT): Make version number tripartite. | |
9 | + (MINGW_AC_MAKE_NO_PRINT_DIRECTORY): Use this new makeopts.m4 macro. | |
10 | + (MINGW_AC_PROG_LEX): Use it, in place of... | |
11 | + (AC_PROG_LEX): ...this. | |
12 | + | |
13 | + * Makefile.in (MAKE): New macro; assign using autoconf's SET_MAKE. | |
14 | + (QUIET_MAKE): New macro; derive it from $(MAKE) --no-print-directory. | |
15 | + (LEX_COMMAND, LEX_COMMAND_ABORT): New macros; define them. | |
16 | + (LEX_MISSING, LEX_MISSING_MESSAGE, LEX_OUTPUT): Likewise. | |
17 | + (FORMAT_MESSAGE, MESSAGE_FOLD_WIDTH): Likewise; implemented from... | |
18 | + (AWK_CLEAR_LINE_BUFFER, AWK_FLUSH_BUFFER, AWK_PRINT_AND_CLEAR_BUFFER): | |
19 | + (AWK_COLLECT_MESSAGE, AWK_COLLECT_BLANK_LINE, AWK_PRINT_LINE_BUFFER): | |
20 | + ...this collection of internal helper macros; define them. | |
21 | + (%.c: %.l): Replacement for built-in rule; it handles "missing lex" in | |
22 | + a manner consistent with expectations of autoconf's AC_PROG_LEX. | |
23 | + (execute-command): New phoney build goal; it is used with... | |
24 | + (WITH_REQUEST): ...this new macro, to invoke commands recursively. | |
25 | + | |
1 | 26 | 2013-03-25 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 27 | |
3 | 28 | Adapt DMH for use in setup tool. |
@@ -33,12 +33,23 @@ GUI_RELEASE_CLASS = @GUI_RELEASE_CLASS@ | ||
33 | 33 | BUILD_TAG = `>> build.tag; cat build.tag` |
34 | 34 | DEBUGLEVEL = @DEBUGLEVEL@ |
35 | 35 | |
36 | +# Establish the appropriate mechanism for invoking 'make' recursively, | |
37 | +# WITHOUT incurring the noise of its "Entering directory..." messages. | |
38 | +# | |
39 | +@SET_MAKE@ | |
40 | +QUIET_MAKE = $(MAKE)@NO_PRINT_DIRECTORY@ | |
41 | + | |
42 | +# Establish source code directory organisation, and set reference | |
43 | +# paths for access to source files. | |
44 | +# | |
36 | 45 | srcdir = @srcdir@ |
37 | 46 | abs_top_srcdir = @abs_top_srcdir@ |
38 | 47 | |
39 | 48 | vpath %.ico @srcdir@/icons |
40 | 49 | VPATH = @top_srcdir@/src:@top_srcdir@/src/pkginfo:@top_srcdir@/tinyxml |
41 | 50 | |
51 | +# Identify common build tools, and set their default options. | |
52 | +# | |
42 | 53 | CC = @CC@ |
43 | 54 | CFLAGS = @CFLAGS@ |
44 | 55 | CPPFLAGS = @CPPFLAGS@ -D DEBUGLEVEL=$(DEBUGLEVEL) $(INCLUDES) |
@@ -48,11 +59,65 @@ CXXFLAGS = $(CFLAGS) | ||
48 | 59 | |
49 | 60 | INCLUDES = -I ${srcdir}/src -I ${srcdir}/src/pkginfo -I ${srcdir}/tinyxml |
50 | 61 | |
51 | -LEX = @LEX@ | |
52 | - | |
53 | 62 | AR = @AR@ |
54 | 63 | ARFLAGS = @ARFLAGS@ |
55 | 64 | |
65 | +# A 'lex' compatible LALR(1) scanner is required for SCM sourced builds, | |
66 | +# or if the user modifies any 'lex' source. This AC_PROG_LEX compatible | |
67 | +# macro set facilitates the handling of any situation where 'lex' is not | |
68 | +# available, but is required to complete the build. | |
69 | +# | |
70 | +LEX = @LEX@ | |
71 | +LEX_COMMAND = $(LEX) $(LFLAGS) -t $< > $(LEX_OUTPUT) | |
72 | +LEX_COMMAND_ABORT = { $(LEX_MISSING); rm -f $(LEX_OUTPUT); exit 2; } | |
73 | +LEX_MISSING = (echo; echo $(LEX_MISSING_MESSAGE); echo) | $(FORMAT_MESSAGE) | |
74 | +LEX_MISSING_MESSAGE = "I cannot find the program 'lex' on your system; \ | |
75 | +it is required because you either do not have the file '$@', or you appear \ | |
76 | +to have modified the file '$<'. If neither of these is the case, then you \ | |
77 | +may wish to update the time stamp of '$@', so that it appears to be newer \ | |
78 | +than '$<', before you run make again." | |
79 | +LEX_OUTPUT = @LEX_OUTPUT_ROOT@.c | |
80 | + | |
81 | +# The following macro uses 'awk' to emulate a rudimentary 'nroff' filter, | |
82 | +# for formatting notification messages, such as those which are emitted to | |
83 | +# report the above "missing 'lex'" condition. | |
84 | +# | |
85 | +FORMAT_MESSAGE = awk '\ | |
86 | + BEGIN { $(AWK_CLEAR_LINE_BUFFER) }\ | |
87 | + /^\. *br$$/ { $(AWK_PRINT_AND_CLEAR_BUFFER) }\ | |
88 | + NF == 0 { $(AWK_COLLECT_BLANK_LINE) }\ | |
89 | + /^[^.]/ { $(AWK_COLLECT_MESSAGE) }\ | |
90 | + END { $(AWK_FLUSH_LINE_BUFFER) }' | |
91 | + | |
92 | +# Establish a default line length for formatting messages. | |
93 | +# | |
94 | +MESSAGE_FOLD_WIDTH = 68 | |
95 | + | |
96 | +# The following macros implement the internals of the message formatter. | |
97 | +# | |
98 | +AWK_CLEAR_LINE_BUFFER = linebuf = ""; | |
99 | +AWK_FLUSH_LINE_BUFFER = if( linebuf != "" ){ $(AWK_PRINT_AND_CLEAR_BUFFER) } | |
100 | +AWK_PRINT_AND_CLEAR_BUFFER = $(AWK_PRINT_LINE_BUFFER) $(AWK_CLEAR_LINE_BUFFER) | |
101 | +AWK_COLLECT_MESSAGE = \ | |
102 | + for( i = 0; i < NF; ) \ | |
103 | + { if( linebuf == "" ) newbuf = $$++i; else \ | |
104 | + { newbuf = linebuf; \ | |
105 | + if( match( linebuf, "[.!?]$$" ) ) newbuf = newbuf " "; \ | |
106 | + newbuf = newbuf " " $$++i; \ | |
107 | + } \ | |
108 | + if( length( newbuf ) > $(MESSAGE_FOLD_WIDTH) ) \ | |
109 | + { print linebuf; \ | |
110 | + linebuf = $$i; \ | |
111 | + } \ | |
112 | + else linebuf = newbuf; \ | |
113 | + } | |
114 | +AWK_COLLECT_BLANK_LINE = $(AWK_FLUSH_LINE_BUFFER) $(AWK_PRINT_LINE_BUFFER) | |
115 | +AWK_PRINT_LINE_BUFFER = print linebuf; | |
116 | + | |
117 | +# Identify an appropriate resource compiler, for GUI builds, | |
118 | +# and define a set of script macros to propagate the build-time | |
119 | +# specific package meta-data into the compile resource modules. | |
120 | +# | |
56 | 121 | RC = @RC@ |
57 | 122 | RC_SCRIPT = tag=$(BUILD_TAG); \ |
58 | 123 | test "x$$tag" != x && tag="-$(GUI_RELEASE_CLASS)-$$tag"; \ |
@@ -70,6 +135,9 @@ TAG_SCRIPT = sed \ | ||
70 | 135 | |
71 | 136 | RC_INCLUDES = -I ${srcdir}/src -I ${srcdir}/icons |
72 | 137 | |
138 | +# Specify extensions, and link-time requirements, for binary | |
139 | +# package deliverables. | |
140 | +# | |
73 | 141 | OBJEXT = @OBJEXT@ |
74 | 142 | EXEEXT = @EXEEXT@ |
75 | 143 |
@@ -77,6 +145,8 @@ LDFLAGS = @LDFLAGS@ | ||
77 | 145 | GUI_LDFLAGS = -mwindows $(LDFLAGS) |
78 | 146 | LIBS = -Wl,-Bstatic -llua -lz -lbz2 -llzma -Wl,-Bdynamic -lwininet |
79 | 147 | |
148 | +# Define the content of package deliverables. | |
149 | +# | |
80 | 150 | CORE_DLL_OBJECTS = climain.$(OBJEXT) pkgshow.$(OBJEXT) dmhcore.$(OBJEXT) \ |
81 | 151 | pkgbind.$(OBJEXT) pkginet.$(OBJEXT) pkgstrm.$(OBJEXT) pkgname.$(OBJEXT) \ |
82 | 152 | pkgexec.$(OBJEXT) pkgfind.$(OBJEXT) pkginfo.$(OBJEXT) pkgspec.$(OBJEXT) \ |
@@ -126,11 +196,33 @@ lastrites$(EXEEXT): rites.$(OBJEXT) | ||
126 | 196 | mingw-get-0.dll: $(CORE_DLL_OBJECTS) |
127 | 197 | $(CXX) -shared -o $@ $(CXXFLAGS) $(LDFLAGS) $+ $(LIBS) |
128 | 198 | |
199 | +# The following recursive invocation hook provides a mechanism for | |
200 | +# accessing make's facility for reporting what it is doing, even when | |
201 | +# the command to be invoked is encapsulated within a more complex block, | |
202 | +# which has been marked for explicit silent execution; usage is: | |
203 | +# | |
204 | +# $(WITH_REQUEST)='command to be executed' execute-command | |
205 | +# | |
206 | +# (with no intervening white space around the assignment operator, and | |
207 | +# ensuring that the command to be executed is appropriately quoted). | |
208 | +# | |
209 | +WITH_REQUEST = $(QUIET_MAKE) COMMAND | |
210 | +execute-command: | |
211 | + $(COMMAND) | |
212 | + | |
129 | 213 | # Compilation and dependency tracking... |
130 | 214 | # |
131 | 215 | DEPFLAGS = -MM -MP -MD |
132 | 216 | sinclude *.d |
133 | 217 | |
218 | +%.c: %.l | |
219 | + @test x$(LEX) = x: \ | |
220 | + && { $(QUIET_MAKE) LEX=lex $(@F) || $(LEX_COMMAND_ABORT); } \ | |
221 | + || $(WITH_REQUEST)='$(LEX_COMMAND)' execute-command | |
222 | + @test -f $(LEX_OUTPUT) && test -n "`cat $(LEX_OUTPUT)`" \ | |
223 | + && $(WITH_REQUEST)='mv $(LEX_OUTPUT) $(@F)' execute-command \ | |
224 | + || $(WITH_REQUEST)='rm -f $(LEX_OUTPUT)' execute-command | |
225 | + | |
134 | 226 | %.$(OBJEXT): %.c |
135 | 227 | $(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) $< |
136 | 228 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< |
@@ -23,6 +23,7 @@ | ||
23 | 23 | # arising from the use of this software. |
24 | 24 | # |
25 | 25 | m4_include([build-aux/m4/missing.m4]) |
26 | +m4_include([build-aux/m4/makeopts.m4]) | |
26 | 27 | |
27 | 28 | # MINGW_AC_OUTPUT |
28 | 29 | # --------------- |
@@ -33,5 +34,22 @@ AC_DEFUN([MINGW_AC_OUTPUT], | ||
33 | 34 | [AC_REQUIRE([_MINGW_AC_ABORT_IF_MISSING_PREREQ])dnl |
34 | 35 | AC_OUTPUT($@)dnl |
35 | 36 | ])# MINGW_AC_OUTPUT |
37 | + | |
38 | +# MINGW_AC_PROG_LEX | |
39 | +# ----------------- | |
40 | +# A wrapper for AC_PROG_LEX; it causes configure to abort, issuing a | |
41 | +# missing lex diagnostic, when building from SCM sources, (as indicated | |
42 | +# by absence of ${srcdir}/src/pkginfo/pkginfo.c), when no lex processor | |
43 | +# appears to be available. Furthermore, if AC_PROG_LEX fails to assign | |
44 | +# a sane value to LEX_OUTPUT_ROOT, this provides lex.yy as default. | |
45 | +# | |
46 | +AC_DEFUN([MINGW_AC_PROG_LEX], | |
47 | +[AC_REQUIRE([AC_PROG_LEX])dnl | |
48 | + AS_IF([test x${LEX_OUTPUT_ROOT} = x],[LEX_OUTPUT_ROOT=lex.yy]) | |
49 | + AS_IF([test x${LEX} != x:],,[test -f ${srcdir}/src/pkginfo/pkginfo.c],, | |
50 | + [MINGW_AC_ASSERT_MISSING([lex (or for preference, flex)], | |
51 | + [flex-2.5.35-2-msys-1.0.13-bin.tar.lzma (or equivalent)])dnl | |
52 | + ])dnl | |
53 | +])# MINGW_AC_PROG_LEX | |
36 | 54 | # |
37 | 55 | # $RCSfile$: end of file |
@@ -22,7 +22,7 @@ | ||
22 | 22 | # MinGW.org Project, accept liability for any damages, however caused, |
23 | 23 | # arising from the use of this software. |
24 | 24 | # |
25 | - AC_INIT([mingw-get],[0.6],[http://mingw.org/Reporting_Bugs]) | |
25 | + AC_INIT([mingw-get],[0.6.0],[http://mingw.org/Reporting_Bugs]) | |
26 | 26 | |
27 | 27 | AC_SUBST([COPYRIGHT_HOLDER],["MinGW.org Project"]) |
28 | 28 | AC_SUBST([YEARS_OF_ISSUE],["2009-2013"]) |
@@ -58,6 +58,11 @@ | ||
58 | 58 | build_alias=`${srcdir}/build-aux/config.guess` |
59 | 59 | AC_CANONICAL_HOST |
60 | 60 | |
61 | +# Establish the appropriate mechanism for invoking 'make' recursively, | |
62 | +# WITHOUT incurring the noise of its "Entering directory..." messages. | |
63 | +# | |
64 | + MINGW_AC_MAKE_NO_PRINT_DIRECTORY | |
65 | + | |
61 | 66 | # We need both C and C++ compilers; check how to invoke them |
62 | 67 | # |
63 | 68 | AC_PROG_CC |
@@ -67,7 +72,7 @@ | ||
67 | 72 | # and a lexical analyser generator |
68 | 73 | # |
69 | 74 | AC_CHECK_TOOL([RC],[windres],[windres]) |
70 | - AC_PROG_LEX | |
75 | + MINGW_AC_PROG_LEX | |
71 | 76 | |
72 | 77 | # Ensure that (at least the headers for) prerequisite libraries, |
73 | 78 | # zlib, libbz2, liblzma, liblua, and libwtklite are available |