ncurses 5.7 - patch 20090321
[ncurses.git] / Ada95 / gen / Makefile.in
index bccea45f57413775fd7cf3bf6cf570d38557c9cd..2a68951873fe530078a9038af656b982be72c49e 100644 (file)
@@ -1,5 +1,5 @@
 ##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
 ##############################################################################
 #
 #  Author:  Juergen Pfeifer, 1996
-#  Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en
 #
-#  Version Control
-#  $Revision: 1.41 $
+#  $Id: Makefile.in,v 1.63 2009/01/11 01:11:35 tom Exp $
 #
 .SUFFIXES:
 
@@ -44,15 +42,19 @@ DESTDIR             = @DESTDIR@
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
+bindir         = @bindir@
+
 ADA_INCLUDE    = $(DESTDIR)@ADA_INCLUDE@
 ADA_OBJECTS    = $(DESTDIR)@ADA_OBJECTS@
 
 INSTALL                = @INSTALL@
+INSTALL_PROG   = @INSTALL_PROGRAM@
 INSTALL_DATA   = @INSTALL_DATA@
 
 AWK            = @AWK@
 LN_S           = @LN_S@
 
+CC             = @CC@
 HOST_CC                = @BUILD_CC@
 CFLAGS         = @CFLAGS@
 
@@ -67,23 +69,26 @@ CFLAGS_SHARED       = $(CCFLAGS) @CC_SHARED_OPTS@
 
 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
 
+REL_VERSION    = @cf_cv_rel_version@
+ABI_VERSION    = @cf_cv_abi_version@
+LOCAL_LIBDIR   = @top_builddir@/lib
+
 LINK           = $(HOST_CC)
-LD_FLAGS       = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS)
+LD_FLAGS       = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) @TINFO_ARGS2@
 
 RANLIB         = @RANLIB@
 
-LIB_CURSES      = -L../../lib -lncurses@LIB_SUFFIX@
-
 M4             = m4
-M4FLAGS                =
+M4FLAGS                = -DNCURSES_EXT_FUNCS=@NCURSES_EXT_FUNCS@
 
+ADACURSES_CONFIG = adacurses@DFT_ARG_SUFFIX@-config
+
+WRAPPER                = sh $(top_srcdir)/misc/shlib
 GENERATE       = ./gen$x '@DFT_ARG_SUFFIX@'
 DEL_ADAMODE    = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
 
 GNATHTML       = `type -p gnathtml || type -p gnathtml.pl`
 GNATHP          = www.gnat.com
-MAIL            = www.familiepfeifer.de/Contact.aspx?Lang=en
-HOMEP           = www.familiepfeifer.de/juergen
 
 ################################################################################
 ALIB            = @cf_ada_package@
@@ -93,17 +98,18 @@ ADA_SRCDIR  = ../src
 
 GEN_FILES0      = Base_Defs
 
-GEN_FILES1      = Key_Definitions                              \
-                 Old_Keys                              \
-                 Character_Attribute_Set_Rep           \
+GEN_FILES1      = ACS_Map                                      \
                  AC_Rep                                \
+                 Base_Defs                             \
+                 Character_Attribute_Set_Rep           \
                  Color_Defs                            \
-                 ACS_Map                               \
+                 Key_Definitions                       \
                  Linker_Options                        \
-                 Base_Defs                             \
-                 Window_Offsets                        \
+                 Old_Keys                              \
+                 Public_Variables                      \
+                 Trace_Defs                            \
                  Version_Info                          \
-                 Trace_Defs
+                 Window_Offsets
 
 GEN_FILES2      = Menu_Opt_Rep                         \
                  Menu_Base_Defs                        \
@@ -124,6 +130,7 @@ GEN_FILES5  = Chtype_Def                            \
                  Eti_Defs
 
 GEN_TARGETS     = $(ADA_SRCDIR)/$(ABASE).ads                           \
+                 $(ADA_SRCDIR)/$(ABASE).adb                            \
                  $(ADA_SRCDIR)/$(ABASE)-aux.ads                        \
                  $(ADA_SRCDIR)/$(ABASE)-trace.ads                      \
                  $(ADA_SRCDIR)/$(ABASE)-menus.ads                      \
@@ -138,6 +145,7 @@ GEN_TARGETS     = $(ADA_SRCDIR)/$(ABASE).ads                                \
                  $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads
 
 GEN_SRC                = $(srcdir)/$(ABASE).ads.m4                             \
+                 $(srcdir)/$(ABASE).adb.m4                             \
                  $(srcdir)/$(ABASE)-aux.ads.m4                         \
                  $(srcdir)/$(ABASE)-trace.ads.m4                       \
                  $(srcdir)/$(ABASE)-menus.ads.m4                       \
@@ -154,26 +162,34 @@ GEN_SRC           = $(srcdir)/$(ABASE).ads.m4                             \
 
 all \
 libs : $(GEN_TARGETS)
-       @
+       @echo made $@
 
 sources:
 
+$(DESTDIR)$(bindir) \
 $(ADA_INCLUDE) \
 $(ADA_OBJECTS) :
-       $(top_srcdir)/mkinstalldirs $@
+       sh $(top_srcdir)/mkdirs.sh $@
 
 install \
 install.libs :: $(ADA_INCLUDE)
        @echo installing package $(ALIB) in $(ADA_INCLUDE)
+       @$(top_srcdir)/tar-copy.sh '$(ALIB)*.ad?' $(ADA_SRCDIR) $(ADA_INCLUDE)
        @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ad?' $(ADA_SRCDIR) $(ADA_INCLUDE)
+       @test $(srcdir) != ./ && $(top_srcdir)/tar-copy.sh '$(ALIB)*.ad?' $(srcdir)/../src $(ADA_INCLUDE)
        @test $(srcdir) != ./ && $(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ad?' $(srcdir)/../src $(ADA_INCLUDE)
 
 install \
 install.libs :: $(ADA_OBJECTS)
        @echo installing package $(ALIB) in $(ADA_OBJECTS)
-       @chmod a-wx $(ADA_SRCDIR)/*.ali
+       @-chmod a-wx $(ADA_SRCDIR)/*.ali
+       @$(top_srcdir)/tar-copy.sh '$(ALIB)*.ali' $(ADA_SRCDIR) $(ADA_OBJECTS)
        @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ali' $(ADA_SRCDIR) $(ADA_OBJECTS)
-       @chmod u+x $(ADA_SRCDIR)/*.ali
+       @-chmod u+x $(ADA_SRCDIR)/*.ali
+
+install \
+install.libs :: $(DESTDIR)$(bindir) $(ADACURSES_CONFIG)
+       $(INSTALL_PROG) $(ADACURSES_CONFIG) $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
 
 uninstall \
 uninstall.libs ::
@@ -185,93 +201,106 @@ uninstall.libs ::
        @echo removing package $(ALIB) from $(ADA_OBJECTS)
        -@cd $(ADA_OBJECTS) && rm -f $(ALIB)[-.]*
 
+uninstall \
+uninstall.libs ::
+       -rm -f $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
+
 gen$x: gen.o
-       @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@ $(LIB_CURSES)
+       @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@
 
 gen.o: $(srcdir)/gen.c
        $(HOST_CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
-
+################################################################################
 Character_Attribute_Set_Rep: gen$x
-       $(GENERATE) B A >$@
+       $(WRAPPER) "$(GENERATE) B A" >$@
 
 Base_Defs: gen$x
-       $(GENERATE) B B >$@
+       $(WRAPPER) "$(GENERATE) B B" >$@
 
 Color_Defs: gen$x
-       $(GENERATE) B C >$@
+       $(WRAPPER) "$(GENERATE) B C" >$@
+
+Window_Offsets: gen$x
+       $(WRAPPER) "$(GENERATE) B D" >$@
 
 Key_Definitions: gen$x
-       $(GENERATE) B K >$@
+       $(WRAPPER) "$(GENERATE) B K" >$@
 
-Old_Keys: gen$x
-       $(GENERATE) B O >$@
+Linker_Options: gen$x
+       $(WRAPPER) "$(GENERATE) B L" >$@
 
 ACS_Map: gen$x
-       $(GENERATE) B M >$@
+       $(WRAPPER) "$(GENERATE) B M" >$@
 
-AC_Rep: gen$x
-       $(GENERATE) B R >$@
+Old_Keys: gen$x
+       $(WRAPPER) "$(GENERATE) B O" >$@
 
-Linker_Options: gen$x
-       $(GENERATE) B L >$@
+Public_Variables: gen$x
+       $(WRAPPER) "$(GENERATE) B P" >$@
 
-Version_Info: gen$x
-       $(GENERATE) B V >$@
+AC_Rep: gen$x
+       $(WRAPPER) "$(GENERATE) B R" >$@
 
-Window_Offsets: gen$x
-       $(GENERATE) B D >$@
+Version_Info: gen$x
+       $(WRAPPER) "$(GENERATE) B V" >$@
 
 Trace_Defs: gen$x
-       $(GENERATE) B T >$@
-
+       $(WRAPPER) "$(GENERATE) B T" >$@
+################################################################################
 Menu_Opt_Rep: gen$x
-       $(GENERATE) M R >$@
+       $(WRAPPER) "$(GENERATE) M R" >$@
 
 Menu_Base_Defs: gen$x
-       $(GENERATE) M B >$@
+       $(WRAPPER) "$(GENERATE) M B" >$@
 
 Menu_Linker_Options: gen$x
-       $(GENERATE) M L >$@
+       $(WRAPPER) "$(GENERATE) M L" >$@
 
 Item_Rep: gen$x
-       $(GENERATE) M I >$@
-
+       $(WRAPPER) "$(GENERATE) M I" >$@
+################################################################################
 Form_Opt_Rep: gen$x
-       $(GENERATE) F R >$@
+       $(WRAPPER) "$(GENERATE) F R" >$@
 
 Form_Base_Defs: gen$x
-       $(GENERATE) F B >$@
+       $(WRAPPER) "$(GENERATE) F B" >$@
 
 Form_Linker_Options: gen$x
-       $(GENERATE) F L >$@
+       $(WRAPPER) "$(GENERATE) F L" >$@
 
 Field_Rep: gen$x
-       $(GENERATE) F I >$@
-
+       $(WRAPPER) "$(GENERATE) F I" >$@
+################################################################################
 Mouse_Base_Defs: gen$x
-       $(GENERATE) P B >$@
+       $(WRAPPER) "$(GENERATE) P B" >$@
 
 Mouse_Event_Rep: gen$x
-       $(GENERATE) P M >$@
+       $(WRAPPER) "$(GENERATE) P M" >$@
 
 Mouse_Events: gen$x
-       $(GENERATE) B E >$@
+       $(WRAPPER) "$(GENERATE) B E" >$@
 
 Panel_Linker_Options: gen$x
-       $(GENERATE) P L >$@
+       $(WRAPPER) "$(GENERATE) P L" >$@
 
 Chtype_Def: gen$x
-       $(GENERATE) E C >$@
+       $(WRAPPER) "$(GENERATE) E C" >$@
 
 Eti_Defs: gen$x
-       $(GENERATE) E E >$@
-
+       $(WRAPPER) "$(GENERATE) E E" >$@
+################################################################################
 $(ADA_SRCDIR)/$(ABASE).ads:    $(srcdir)/$(ABASE).ads.m4 \
                                $(GEN_FILES1) $(srcdir)/normal.m4
        $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
        $(srcdir)/$(ABASE).ads.m4 |\
        $(DEL_ADAMODE) >$@
 
+$(ADA_SRCDIR)/$(ABASE).adb:    $(srcdir)/$(ABASE).adb.m4 \
+                               $(GEN_FILES1) $(srcdir)/normal.m4
+       $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
+       $(srcdir)/$(ABASE).adb.m4 |\
+       $(DEL_ADAMODE) >$@
+
 $(ADA_SRCDIR)/$(ABASE)-aux.ads: $(srcdir)/$(ABASE)-aux.ads.m4 \
                                $(GEN_FILES5) $(srcdir)/normal.m4
        $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
@@ -355,8 +384,8 @@ install.progs ::
 tags:
        ctags *.[ch]
 
-TAGS:
-       etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@      etags *.[ch]
 
 mostlyclean ::
        -rm -f a.out core gen$x *.o
@@ -370,7 +399,8 @@ clean :: mostlyclean
        -rm -f $(GEN_TARGETS) instab.tmp *.ad[bs] *.html *.ali *.tmp
 
 distclean :: clean
-       rm -f Makefile
+       -rm -f $(ADACURSES_CONFIG)
+       -rm -f Makefile
 
 realclean :: distclean
 
@@ -402,13 +432,18 @@ $(HTML_DIR)/table.html : instab.tmp
        @rm -f instab.tmp
 
 adahtml:
-       @rm -rf $(HTML_DIR)/
+       @find $(HTML_DIR) -type f -exec rm -f {} \;
        @mkdir -p $(HTML_DIR)
        cp -p ../src/*.ad[sb] . && chmod +w *.ad[sb]
        ln -sf ../src/*.ali .
-       for f in $(GEN_SRC); do \
+       @echo "Filtering generated files"
+       @for f in $(GEN_SRC); do \
+          h=`basename $$f` ;\
           g=`basename $$f .ads.m4` ;\
-          $(M4) $(M4FLAGS) -DM4MACRO=html.m4 $$f | $(DEL_ADAMODE) > $$g.ads ;\
+          if test "$$g" != "$$h" ; then \
+             $(M4) $(M4FLAGS) -DM4MACRO=html.m4 $$f | $(DEL_ADAMODE) > $$g.ads ;\
+             echo "... $$g.ads" ;\
+          fi \
        done
        @-rm -f $(HTML_DIR)/$(ALIB)*.htm*
        $(GNATHTML) -d -f $(ALIB)*.ads
@@ -420,11 +455,9 @@ adahtml:
           sed -e 's%">%">%g' |\
           sed -e 's/3X/3x/g' |\
           sed -e 's/$$\([ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxz0123456789_]*:.*\)\$$/@\1@/' |\
-          sed -e 's%Juergen Pfeifer%<A HREF="http://$(HOMEP)">J\&uuml;rgen Pfeifer</A>%g' |\
-          sed -e 's%http://$(MAIL)%<A HREF="http://$(MAIL)">$(MAIL)</A>%g' |\
           sed -e 's%&lt;/A&gt;%</A>%g' > $$a.tmp ;\
-           mv $$a.tmp $$f ;\
-        done
+          mv $$a.tmp $$f ;\
+       done
        @rm -f *.ad[sb] *.ali *.tmp
        @for f in funcs.htm main.htm ; do \
          sed -e "\%<A HREF=funcs/ .htm>\[ \]</A>%d" < html/$$f > $$f ;\
@@ -435,7 +468,7 @@ adahtml:
        @rm -rf html
 
 html : adahtml $(HTML_DIR)/table.html
-       @
+       @echo made $@
 
 ###############################################################################
 # The remainder of this file is automatically generated during configuration