1 ##############################################################################
2 # Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. #
4 # Permission is hereby granted, free of charge, to any person obtaining a #
5 # copy of this software and associated documentation files (the "Software"), #
6 # to deal in the Software without restriction, including without limitation #
7 # the rights to use, copy, modify, merge, publish, distribute, distribute #
8 # with modifications, sublicense, and/or sell copies of the Software, and to #
9 # permit persons to whom the Software is furnished to do so, subject to the #
10 # following conditions: #
12 # The above copyright notice and this permission notice shall be included in #
13 # all copies or substantial portions of the Software. #
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
18 # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
19 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
20 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
21 # DEALINGS IN THE SOFTWARE. #
23 # Except as contained in this notice, the name(s) of the above copyright #
24 # holders shall not be used in advertising or otherwise to promote the sale, #
25 # use or other dealings in this Software without prior written #
27 ##############################################################################
29 # Author: Juergen Pfeifer, 1996
31 # $Id: Makefile.in,v 1.85 2015/08/05 23:06:31 tom Exp $
41 top_srcdir
= @top_srcdir@
45 exec_prefix = @
exec_prefix@
47 includedir = @
includedir@
50 INSTALL_PROG
= @INSTALL_PROGRAM@
51 INSTALL_DATA
= @INSTALL_DATA@
60 HOST_CFLAGS
= @BUILD_CFLAGS@
63 HOST_CPPFLAGS
= @ACPPFLAGS@ @BUILD_CPPFLAGS@ \
64 -DHAVE_CONFIG_H
-I
$(srcdir)
66 CCFLAGS
= $(HOST_CPPFLAGS
) $(HOST_CFLAGS
)
67 CFLAGS_NORMAL
= $(CCFLAGS
)
68 CFLAGS_DEBUG
= $(CCFLAGS
) @CC_G_OPT@
-DTRACE
69 CFLAGS_PROFILE
= $(CCFLAGS
) -pg
70 CFLAGS_SHARED
= $(CCFLAGS
) @CC_SHARED_OPTS@
72 CFLAGS_DEFAULT
= $(CFLAGS_@DFT_UPR_MODEL@
)
74 REL_VERSION
= @cf_cv_rel_version@
75 ABI_VERSION
= @cf_cv_abi_version@
76 LOCAL_LIBDIR
= @top_builddir@
/lib
82 # For the wide-character configuration combined with broken_linker, we need
83 # addresses of ACS_xxx constants, which requires linking with the newly built
84 # ncurses library. If cross-compiling, the developer has to fill in a workable
85 # native library for this purpose.
86 NATIVE_LDFLAGS
= @LD_MODEL@
$(LOCAL_LIBS
) @TINFO_LDFLAGS2@
$(LDFLAGS
) @LIBS@ @LOCAL_LDFLAGS2@
$(LDFLAGS
) @TINFO_LIBS@
87 CROSS_LDFLAGS
= @BUILD_LDFLAGS@ @BUILD_LIBS@
89 ACTUAL_LDFLAGS
= @ADAGEN_LDFLAGS@
94 M4FLAGS
= -DNCURSES_EXT_FUNCS
=@NCURSES_EXT_FUNCS@
96 ADACURSES_CONFIG
= adacurses@USE_CFG_SUFFIX@
-config
98 WRAPPER
= @NCURSES_SHLIB2@
100 PROG_GENERATE
= .
/generate
$x
101 GENERATE
= $(PROG_GENERATE
) '@DFT_ARG_SUFFIX@'
102 DEL_ADAMODE
= sed
-e
'/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
104 GNATHTML
= `type -p gnathtml || type -p gnathtml.pl 2>/dev/null`
105 GNATHP
= www.gnat.com
107 ################################################################################
108 ALIB
= @cf_ada_package@
109 ABASE
= $(ALIB
)-curses
113 GEN_TARGETS
= $(ADA_SRCDIR
)/$(ABASE
).ads \
114 $(ADA_SRCDIR
)/$(ABASE
).adb \
115 $(ADA_SRCDIR
)/$(ABASE
)-aux.ads \
116 $(ADA_SRCDIR
)/$(ABASE
)-trace.ads \
117 $(ADA_SRCDIR
)/$(ABASE
)-menus.ads \
118 $(ADA_SRCDIR
)/$(ABASE
)-forms.ads \
119 $(ADA_SRCDIR
)/$(ABASE
)-mouse.ads \
120 $(ADA_SRCDIR
)/$(ABASE
)-panels.ads \
121 $(ADA_SRCDIR
)/$(ABASE
)-menus-menu_user_data.ads \
122 $(ADA_SRCDIR
)/$(ABASE
)-menus-item_user_data.ads \
123 $(ADA_SRCDIR
)/$(ABASE
)-forms-form_user_data.ads \
124 $(ADA_SRCDIR
)/$(ABASE
)-forms-field_types.ads \
125 $(ADA_SRCDIR
)/$(ABASE
)-forms-field_user_data.ads \
126 $(ADA_SRCDIR
)/$(ABASE
)-panels-user_data.ads \
127 $(ADA_SRCDIR
)/$(ABASE
)_constants.ads
129 GEN_SRC
= $(srcdir)/$(ABASE
).ads.m4 \
130 $(srcdir)/$(ABASE
).adb.m4 \
131 $(srcdir)/$(ABASE
)-aux.ads.m4 \
132 $(srcdir)/$(ABASE
)-trace.ads.m4 \
133 $(srcdir)/$(ABASE
)-menus.ads.m4 \
134 $(srcdir)/$(ABASE
)-forms.ads.m4 \
135 $(srcdir)/$(ABASE
)-mouse.ads.m4 \
136 $(srcdir)/$(ABASE
)-panels.ads.m4 \
137 $(srcdir)/$(ABASE
)-menus-menu_user_data.ads.m4 \
138 $(srcdir)/$(ABASE
)-menus-item_user_data.ads.m4 \
139 $(srcdir)/$(ABASE
)-forms-form_user_data.ads.m4 \
140 $(srcdir)/$(ABASE
)-forms-field_types.ads.m4 \
141 $(srcdir)/$(ABASE
)-forms-field_user_data.ads.m4 \
142 $(srcdir)/$(ABASE
)-panels-user_data.ads.m4
146 libs
: $(GEN_TARGETS
)
151 $(DESTDIR
)$(bindir) :
155 install.libs
:: $(DESTDIR
)$(bindir) $(ADACURSES_CONFIG
)
156 $(INSTALL_PROG
) $(ADACURSES_CONFIG
) $(DESTDIR
)$(bindir)/$(ADACURSES_CONFIG
)
160 -rm -f
$(DESTDIR
)$(bindir)/$(ADACURSES_CONFIG
)
162 $(PROG_GENERATE
): gen.o
163 @ECHO_LD@
$(LINK
) $(CFLAGS_NORMAL
) gen.o
$(ACTUAL_LDFLAGS
) -o
$@
165 gen.o
: $(srcdir)/gen.c
166 $(HOST_CC
) $(CFLAGS_NORMAL
) -c
-o
$@
$(srcdir)/gen.c
168 $(ADA_SRCDIR
)/$(ABASE
)_constants.ads
: $(PROG_GENERATE
)
169 $(WRAPPER
) "$(GENERATE)" >$@
170 ################################################################################
171 $(ADA_SRCDIR
)/$(ABASE
).ads
: $(srcdir)/$(ABASE
).ads.m4 \
173 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
174 $(srcdir)/$(ABASE
).ads.m4 |\
177 $(ADA_SRCDIR
)/$(ABASE
).adb
: $(srcdir)/$(ABASE
).adb.m4 \
179 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
180 $(srcdir)/$(ABASE
).adb.m4 |\
183 $(ADA_SRCDIR
)/$(ABASE
)-aux.ads
: $(srcdir)/$(ABASE
)-aux.ads.m4 \
185 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
186 $(srcdir)/$(ABASE
)-aux.ads.m4 |\
189 $(ADA_SRCDIR
)/$(ABASE
)-trace.ads
: $(srcdir)/$(ABASE
)-trace.ads.m4 \
191 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
192 $(srcdir)/$(ABASE
)-trace.ads.m4 |\
195 $(ADA_SRCDIR
)/$(ABASE
)-menus.ads
: $(srcdir)/$(ABASE
)-menus.ads.m4 \
197 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
198 $(srcdir)/$(ABASE
)-menus.ads.m4 |\
201 $(ADA_SRCDIR
)/$(ABASE
)-forms.ads
: $(srcdir)/$(ABASE
)-forms.ads.m4 \
203 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
204 $(srcdir)/$(ABASE
)-forms.ads.m4 |\
207 $(ADA_SRCDIR
)/$(ABASE
)-mouse.ads
: $(srcdir)/$(ABASE
)-mouse.ads.m4 \
209 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
210 $(srcdir)/$(ABASE
)-mouse.ads.m4 |\
213 $(ADA_SRCDIR
)/$(ABASE
)-panels.ads
: $(srcdir)/$(ABASE
)-panels.ads.m4 \
215 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
216 $(srcdir)/$(ABASE
)-panels.ads.m4 |\
219 $(ADA_SRCDIR
)/$(ABASE
)-menus-menu_user_data.ads
: \
220 $(srcdir)/$(ABASE
)-menus-menu_user_data.ads.m4 \
222 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
223 $(srcdir)/$(ABASE
)-menus-menu_user_data.ads.m4 |\
226 $(ADA_SRCDIR
)/$(ABASE
)-menus-item_user_data.ads
: \
227 $(srcdir)/$(ABASE
)-menus-item_user_data.ads.m4 \
229 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
230 $(srcdir)/$(ABASE
)-menus-item_user_data.ads.m4 |\
233 $(ADA_SRCDIR
)/$(ABASE
)-forms-form_user_data.ads
: \
234 $(srcdir)/$(ABASE
)-forms-form_user_data.ads.m4 \
236 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
237 $(srcdir)/$(ABASE
)-forms-form_user_data.ads.m4 |\
240 $(ADA_SRCDIR
)/$(ABASE
)-forms-field_types.ads
: \
241 $(srcdir)/$(ABASE
)-forms-field_types.ads.m4 \
243 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
244 $(srcdir)/$(ABASE
)-forms-field_types.ads.m4 |\
247 $(ADA_SRCDIR
)/$(ABASE
)-forms-field_user_data.ads
: \
248 $(srcdir)/$(ABASE
)-forms-field_user_data.ads.m4 \
250 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
251 $(srcdir)/$(ABASE
)-forms-field_user_data.ads.m4 |\
254 $(ADA_SRCDIR
)/$(ABASE
)-panels-user_data.ads
: \
255 $(srcdir)/$(ABASE
)-panels-user_data.ads.m4 \
257 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
258 $(srcdir)/$(ABASE
)-panels-user_data.ads.m4 |\
266 @MAKE_UPPER_TAGS@TAGS
:
267 @MAKE_UPPER_TAGS@ etags
*.
[ch
]
270 -rm -f a.out core
$(PROG_GENERATE
) *.o
273 -rm -f
$(GEN_TARGETS
) instab.tmp
*.ad
[bs
] *.html
*.ali
*.tmp
276 -rm -f
$(ADACURSES_CONFIG
)
279 realclean :: distclean
281 HTML_DIR
= @ADAHTML_DIR@
283 instab.tmp
: table.m4
$(GEN_SRC
)
285 @for f in
$(GEN_SRC
) ; do \
286 $(M4
) $(M4FLAGS
) -DM4MACRO
=table.m4
$$f |
$(DEL_ADAMODE
) >> $@
;\
289 $(HTML_DIR
)/table.html
: instab.tmp
292 @echo
'<!DOCTYPE HTML' > $@
293 @echo
'PUBLIC "-//IETF//DTD HTML 3.0//EN">' >> $@
296 @echo
'<TITLE>Correspondence between ncurses C and Ada functions</TITLE>' >>$@
297 @echo
'</HEAD>' >> $@
299 @echo
'<H1>Correspondence between ncurses C and Ada functions</H1>' >>$@
300 @echo
'<H2>Sorted by C function name</H2>' >>$@
301 @echo
'<TABLE ALIGN=CENTER BORDER>' >>$@
302 @echo
'<TR ALIGN=LEFT>' >>$@
303 @echo
'<TH>C name</TH><TH>Ada name</TH><TH>man page</TH></TR>' >>$@
304 @
sort < instab.tmp
>> $@
305 @echo
'</TABLE></BODY></HTML>' >>$@
309 test -n
"$(GNATHTML)" || exit
1
310 @find
$(HTML_DIR
) -type f
-exec
rm -f
{} \
;
311 @mkdir
-p
$(HTML_DIR
)
312 cp
-p ..
/src
/*.ad
[sb
] .
&& chmod
+w
*.ad
[sb
]
313 @USE_OLD_MAKERULES@ ln
-sf ..
/src
/*.ali .
314 @USE_GNAT_PROJECTS@ ln
-sf ..
/static-ali
/*.ali .
315 @echo
"Filtering generated files"
316 @for f in
$(GEN_SRC
); do \
318 g
=`basename $$f .ads.m4` ;\
319 if
test "$$g" != "$$h" ; then \
320 $(M4
) $(M4FLAGS
) -DM4MACRO
=html.m4
$$f |
$(DEL_ADAMODE
) > $$g.ads
;\
321 echo
"... $$g.ads" ;\
324 @
-rm -f
$(HTML_DIR
)/$(ALIB
)*.htm
*
325 $(GNATHTML
) -d
-f
$(ALIB
)*.ads
326 for f in html
/$(ALIB
)*.htm
*; do \
328 sed
-e
's/You may also.*body.*//' <$$f |\
329 sed
-e
's%GNAT%<A HREF="http://$(GNATHP)">GNAT</A>%g' |\
330 sed
-e
's%<A HREF%<A HREF%g' |\
331 sed
-e
's%">%">%g' |\
332 sed
-e
's/3X/3x/g' |\
333 sed
-e
's/$$\([ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxz0123456789_]*:.*\)\$$/@\1@/' |\
334 sed
-e
's%</A>%</A>%g' > $$a.tmp
;\
337 @
rm -f
*.ad
[sb
] *.ali
*.tmp
338 @for f in funcs.htm main.htm
; do \
339 sed
-e
"\%<A HREF=funcs/ .htm>\[ \]</A>%d" < html
/$$f > $$f ;\
342 @
rm -f
"html/funcs/ .htm"
343 @cp
-pdrf html
/* $(HTML_DIR
)/
346 html
: adahtml
$(HTML_DIR
)/table.html
349 ###############################################################################
350 # The remainder of this file is automatically generated during configuration
351 ###############################################################################