1 ##############################################################################
2 # Copyright (c) 1998-2010,2011 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.74 2011/03/26 23:36:30 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 CPPFLAGS
= @ACPPFLAGS@ @CPPFLAGS@ \
61 -DHAVE_CONFIG_H
-I
$(srcdir)
63 CCFLAGS
= $(CPPFLAGS
) $(CFLAGS
)
64 CFLAGS_NORMAL
= $(CCFLAGS
)
65 CFLAGS_DEBUG
= $(CCFLAGS
) @CC_G_OPT@
-DTRACE
66 CFLAGS_PROFILE
= $(CCFLAGS
) -pg
67 CFLAGS_SHARED
= $(CCFLAGS
) @CC_SHARED_OPTS@
69 CFLAGS_DEFAULT
= $(CFLAGS_@DFT_UPR_MODEL@
)
71 REL_VERSION
= @cf_cv_rel_version@
72 ABI_VERSION
= @cf_cv_abi_version@
73 LOCAL_LIBDIR
= @top_builddir@
/lib
76 LD_FLAGS
= @LD_MODEL@
$(LOCAL_LIBS
) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@
$(LDFLAGS
) @TINFO_ARGS2@
81 M4FLAGS
= -DNCURSES_EXT_FUNCS
=@NCURSES_EXT_FUNCS@
83 ADACURSES_CONFIG
= adacurses@DFT_ARG_SUFFIX@
-config
85 WRAPPER
= @NCURSES_SHLIB2@
87 PROG_GENERATE
= .
/generate
$x
88 GENERATE
= $(PROG_GENERATE
) '@DFT_ARG_SUFFIX@'
89 DEL_ADAMODE
= sed
-e
'/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
91 GNATHTML
= `type -p gnathtml || type -p gnathtml.pl 2>/dev/null`
94 ################################################################################
95 ALIB
= @cf_ada_package@
96 ABASE
= $(ALIB
)-curses
100 GEN_FILES0
= Base_Defs
102 GEN_FILES1
= ACS_Map \
105 Character_Attribute_Set_Rep \
115 GEN_FILES2
= Menu_Opt_Rep \
117 Menu_Linker_Options \
120 GEN_FILES3
= Form_Opt_Rep \
122 Form_Linker_Options \
125 GEN_FILES4
= Mouse_Base_Defs \
130 GEN_FILES5
= Chtype_Def \
133 GEN_TARGETS
= $(ADA_SRCDIR
)/$(ABASE
).ads \
134 $(ADA_SRCDIR
)/$(ABASE
).adb \
135 $(ADA_SRCDIR
)/$(ABASE
)-aux.ads \
136 $(ADA_SRCDIR
)/$(ABASE
)-trace.ads \
137 $(ADA_SRCDIR
)/$(ABASE
)-menus.ads \
138 $(ADA_SRCDIR
)/$(ABASE
)-forms.ads \
139 $(ADA_SRCDIR
)/$(ABASE
)-mouse.ads \
140 $(ADA_SRCDIR
)/$(ABASE
)-panels.ads \
141 $(ADA_SRCDIR
)/$(ABASE
)-menus-menu_user_data.ads \
142 $(ADA_SRCDIR
)/$(ABASE
)-menus-item_user_data.ads \
143 $(ADA_SRCDIR
)/$(ABASE
)-forms-form_user_data.ads \
144 $(ADA_SRCDIR
)/$(ABASE
)-forms-field_types.ads \
145 $(ADA_SRCDIR
)/$(ABASE
)-forms-field_user_data.ads \
146 $(ADA_SRCDIR
)/$(ABASE
)-panels-user_data.ads
148 GEN_SRC
= $(srcdir)/$(ABASE
).ads.m4 \
149 $(srcdir)/$(ABASE
).adb.m4 \
150 $(srcdir)/$(ABASE
)-aux.ads.m4 \
151 $(srcdir)/$(ABASE
)-trace.ads.m4 \
152 $(srcdir)/$(ABASE
)-menus.ads.m4 \
153 $(srcdir)/$(ABASE
)-forms.ads.m4 \
154 $(srcdir)/$(ABASE
)-mouse.ads.m4 \
155 $(srcdir)/$(ABASE
)-panels.ads.m4 \
156 $(srcdir)/$(ABASE
)-menus-menu_user_data.ads.m4 \
157 $(srcdir)/$(ABASE
)-menus-item_user_data.ads.m4 \
158 $(srcdir)/$(ABASE
)-forms-form_user_data.ads.m4 \
159 $(srcdir)/$(ABASE
)-forms-field_types.ads.m4 \
160 $(srcdir)/$(ABASE
)-forms-field_user_data.ads.m4 \
161 $(srcdir)/$(ABASE
)-panels-user_data.ads.m4
165 libs
: $(GEN_TARGETS
)
170 $(DESTDIR
)$(bindir) :
174 install.libs
:: $(DESTDIR
)$(bindir) $(ADACURSES_CONFIG
)
175 $(INSTALL_PROG
) $(ADACURSES_CONFIG
) $(DESTDIR
)$(bindir)/$(ADACURSES_CONFIG
)
179 -rm -f
$(DESTDIR
)$(bindir)/$(ADACURSES_CONFIG
)
181 $(PROG_GENERATE
): gen.o
182 @ECHO_LINK@
$(LINK
) $(CFLAGS_NORMAL
) gen.o
$(LD_FLAGS
) -o
$@
184 gen.o
: $(srcdir)/gen.c
185 $(HOST_CC
) $(CFLAGS_NORMAL
) -c
-o
$@
$(srcdir)/gen.c
186 ################################################################################
187 Character_Attribute_Set_Rep
: $(PROG_GENERATE
)
188 $(WRAPPER
) "$(GENERATE) B A" >$@
190 Base_Defs
: $(PROG_GENERATE
)
191 $(WRAPPER
) "$(GENERATE) B B" >$@
193 Color_Defs
: $(PROG_GENERATE
)
194 $(WRAPPER
) "$(GENERATE) B C" >$@
196 Window_Offsets
: $(PROG_GENERATE
)
197 $(WRAPPER
) "$(GENERATE) B D" >$@
199 Key_Definitions
: $(PROG_GENERATE
)
200 $(WRAPPER
) "$(GENERATE) B K" >$@
202 Linker_Options
: $(PROG_GENERATE
)
203 $(WRAPPER
) "$(GENERATE) B L" >$@
205 ACS_Map
: $(PROG_GENERATE
)
206 $(WRAPPER
) "$(GENERATE) B M" >$@
208 Old_Keys
: $(PROG_GENERATE
)
209 $(WRAPPER
) "$(GENERATE) B O" >$@
211 Public_Variables
: $(PROG_GENERATE
)
212 $(WRAPPER
) "$(GENERATE) B P" >$@
214 AC_Rep
: $(PROG_GENERATE
)
215 $(WRAPPER
) "$(GENERATE) B R" >$@
217 Version_Info
: $(PROG_GENERATE
)
218 $(WRAPPER
) "$(GENERATE) B V" >$@
220 Trace_Defs
: $(PROG_GENERATE
)
221 $(WRAPPER
) "$(GENERATE) B T" >$@
222 ################################################################################
223 Menu_Opt_Rep
: $(PROG_GENERATE
)
224 $(WRAPPER
) "$(GENERATE) M R" >$@
226 Menu_Base_Defs
: $(PROG_GENERATE
)
227 $(WRAPPER
) "$(GENERATE) M B" >$@
229 Menu_Linker_Options
: $(PROG_GENERATE
)
230 $(WRAPPER
) "$(GENERATE) M L" >$@
232 Item_Rep
: $(PROG_GENERATE
)
233 $(WRAPPER
) "$(GENERATE) M I" >$@
234 ################################################################################
235 Form_Opt_Rep
: $(PROG_GENERATE
)
236 $(WRAPPER
) "$(GENERATE) F R" >$@
238 Form_Base_Defs
: $(PROG_GENERATE
)
239 $(WRAPPER
) "$(GENERATE) F B" >$@
241 Form_Linker_Options
: $(PROG_GENERATE
)
242 $(WRAPPER
) "$(GENERATE) F L" >$@
244 Field_Rep
: $(PROG_GENERATE
)
245 $(WRAPPER
) "$(GENERATE) F I" >$@
246 ################################################################################
247 Mouse_Base_Defs
: $(PROG_GENERATE
)
248 $(WRAPPER
) "$(GENERATE) P B" >$@
250 Mouse_Event_Rep
: $(PROG_GENERATE
)
251 $(WRAPPER
) "$(GENERATE) P M" >$@
253 Mouse_Events
: $(PROG_GENERATE
)
254 $(WRAPPER
) "$(GENERATE) B E" >$@
256 Panel_Linker_Options
: $(PROG_GENERATE
)
257 $(WRAPPER
) "$(GENERATE) P L" >$@
259 Chtype_Def
: $(PROG_GENERATE
)
260 $(WRAPPER
) "$(GENERATE) E C" >$@
262 Eti_Defs
: $(PROG_GENERATE
)
263 $(WRAPPER
) "$(GENERATE) E E" >$@
264 ################################################################################
265 $(ADA_SRCDIR
)/$(ABASE
).ads
: $(srcdir)/$(ABASE
).ads.m4 \
266 $(GEN_FILES1
) $(srcdir)/normal.m4
267 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
268 $(srcdir)/$(ABASE
).ads.m4 |\
271 $(ADA_SRCDIR
)/$(ABASE
).adb
: $(srcdir)/$(ABASE
).adb.m4 \
272 $(GEN_FILES1
) $(srcdir)/normal.m4
273 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
274 $(srcdir)/$(ABASE
).adb.m4 |\
277 $(ADA_SRCDIR
)/$(ABASE
)-aux.ads
: $(srcdir)/$(ABASE
)-aux.ads.m4 \
278 $(GEN_FILES5
) $(srcdir)/normal.m4
279 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
280 $(srcdir)/$(ABASE
)-aux.ads.m4 |\
283 $(ADA_SRCDIR
)/$(ABASE
)-trace.ads
: $(srcdir)/$(ABASE
)-trace.ads.m4 \
284 $(GEN_FILES5
) $(srcdir)/normal.m4
285 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
286 $(srcdir)/$(ABASE
)-trace.ads.m4 |\
289 $(ADA_SRCDIR
)/$(ABASE
)-menus.ads
: $(srcdir)/$(ABASE
)-menus.ads.m4 \
290 $(GEN_FILES2
) $(srcdir)/normal.m4
291 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
292 $(srcdir)/$(ABASE
)-menus.ads.m4 |\
295 $(ADA_SRCDIR
)/$(ABASE
)-forms.ads
: $(srcdir)/$(ABASE
)-forms.ads.m4 \
296 $(GEN_FILES3
) $(srcdir)/normal.m4
297 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
298 $(srcdir)/$(ABASE
)-forms.ads.m4 |\
301 $(ADA_SRCDIR
)/$(ABASE
)-mouse.ads
: $(srcdir)/$(ABASE
)-mouse.ads.m4 \
302 $(GEN_FILES4
) $(srcdir)/normal.m4
303 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
304 $(srcdir)/$(ABASE
)-mouse.ads.m4 |\
307 $(ADA_SRCDIR
)/$(ABASE
)-panels.ads
: $(srcdir)/$(ABASE
)-panels.ads.m4 \
310 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
311 $(srcdir)/$(ABASE
)-panels.ads.m4 |\
314 $(ADA_SRCDIR
)/$(ABASE
)-menus-menu_user_data.ads
: \
315 $(srcdir)/$(ABASE
)-menus-menu_user_data.ads.m4 \
317 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
318 $(srcdir)/$(ABASE
)-menus-menu_user_data.ads.m4 |\
321 $(ADA_SRCDIR
)/$(ABASE
)-menus-item_user_data.ads
: \
322 $(srcdir)/$(ABASE
)-menus-item_user_data.ads.m4 \
324 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
325 $(srcdir)/$(ABASE
)-menus-item_user_data.ads.m4 |\
328 $(ADA_SRCDIR
)/$(ABASE
)-forms-form_user_data.ads
: \
329 $(srcdir)/$(ABASE
)-forms-form_user_data.ads.m4 \
331 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
332 $(srcdir)/$(ABASE
)-forms-form_user_data.ads.m4 |\
335 $(ADA_SRCDIR
)/$(ABASE
)-forms-field_types.ads
: \
336 $(srcdir)/$(ABASE
)-forms-field_types.ads.m4 \
338 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
339 $(srcdir)/$(ABASE
)-forms-field_types.ads.m4 |\
342 $(ADA_SRCDIR
)/$(ABASE
)-forms-field_user_data.ads
: \
343 $(srcdir)/$(ABASE
)-forms-field_user_data.ads.m4 \
345 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
346 $(srcdir)/$(ABASE
)-forms-field_user_data.ads.m4 |\
349 $(ADA_SRCDIR
)/$(ABASE
)-panels-user_data.ads
: \
350 $(srcdir)/$(ABASE
)-panels-user_data.ads.m4 \
352 $(M4
) $(M4FLAGS
) -DM4MACRO
=$(srcdir)/normal.m4 \
353 $(srcdir)/$(ABASE
)-panels-user_data.ads.m4 |\
361 @MAKE_UPPER_TAGS@TAGS
:
362 @MAKE_UPPER_TAGS@ etags
*.
[ch
]
365 -rm -f a.out core
$(PROG_GENERATE
) *.o
373 -rm -f
$(GEN_TARGETS
) instab.tmp
*.ad
[bs
] *.html
*.ali
*.tmp
376 -rm -f
$(ADACURSES_CONFIG
)
379 realclean :: distclean
381 HTML_DIR
= @ADAHTML_DIR@
383 instab.tmp
: table.m4
$(GEN_SRC
)
385 @for f in
$(GEN_SRC
) ; do \
386 $(M4
) $(M4FLAGS
) -DM4MACRO
=table.m4
$$f |
$(DEL_ADAMODE
) >> $@
;\
389 $(HTML_DIR
)/table.html
: instab.tmp
392 @echo
'<!DOCTYPE HTML' > $@
393 @echo
'PUBLIC "-//IETF//DTD HTML 3.0//EN">' >> $@
396 @echo
'<TITLE>Correspondence between ncurses C and Ada functions</TITLE>' >>$@
397 @echo
'</HEAD>' >> $@
399 @echo
'<H1>Correspondence between ncurses C and Ada functions</H1>' >>$@
400 @echo
'<H2>Sorted by C function name</H2>' >>$@
401 @echo
'<TABLE ALIGN=CENTER BORDER>' >>$@
402 @echo
'<TR ALIGN=LEFT>' >>$@
403 @echo
'<TH>C name</TH><TH>Ada name</TH><TH>man page</TH></TR>' >>$@
404 @
sort < instab.tmp
>> $@
405 @echo
'</TABLE></BODY></HTML>' >>$@
409 test -n
"$(GNATHTML)" || exit
1
410 @find
$(HTML_DIR
) -type f
-exec
rm -f
{} \
;
411 @mkdir
-p
$(HTML_DIR
)
412 cp
-p ..
/src
/*.ad
[sb
] .
&& chmod
+w
*.ad
[sb
]
413 @USE_OLD_MAKERULES@ ln
-sf ..
/src
/*.ali .
414 @USE_GNAT_PROJECTS@ ln
-sf ..
/static-ali
/*.ali .
415 @echo
"Filtering generated files"
416 @for f in
$(GEN_SRC
); do \
418 g
=`basename $$f .ads.m4` ;\
419 if
test "$$g" != "$$h" ; then \
420 $(M4
) $(M4FLAGS
) -DM4MACRO
=html.m4
$$f |
$(DEL_ADAMODE
) > $$g.ads
;\
421 echo
"... $$g.ads" ;\
424 @
-rm -f
$(HTML_DIR
)/$(ALIB
)*.htm
*
425 $(GNATHTML
) -d
-f
$(ALIB
)*.ads
426 for f in html
/$(ALIB
)*.htm
*; do \
428 sed
-e
's/You may also.*body.*//' <$$f |\
429 sed
-e
's%GNAT%<A HREF="http://$(GNATHP)">GNAT</A>%g' |\
430 sed
-e
's%<A HREF%<A HREF%g' |\
431 sed
-e
's%">%">%g' |\
432 sed
-e
's/3X/3x/g' |\
433 sed
-e
's/$$\([ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxz0123456789_]*:.*\)\$$/@\1@/' |\
434 sed
-e
's%</A>%</A>%g' > $$a.tmp
;\
437 @
rm -f
*.ad
[sb
] *.ali
*.tmp
438 @for f in funcs.htm main.htm
; do \
439 sed
-e
"\%<A HREF=funcs/ .htm>\[ \]</A>%d" < html
/$$f > $$f ;\
442 @
rm -f
"html/funcs/ .htm"
443 @cp
-pdrf html
/* $(HTML_DIR
)/
446 html
: adahtml
$(HTML_DIR
)/table.html
449 ###############################################################################
450 # The remainder of this file is automatically generated during configuration
451 ###############################################################################