ncurses 5.0
[ncurses.git] / Ada95 / gen / Makefile.in
index 775c344f6883dea9243b2ef55fc18667f64b1727..32c660a311cbfcbb8bb2a2dee7e2058b082e621a 100644 (file)
@@ -1,31 +1,42 @@
-#----------------------------------------------------------------------------
-#                                                                          --
-#                            GNAT ncurses Binding                          --
-#                                gen/Makefile                              --
-#                                                                          --
-#  Version 00.92                                                           --
-#                                                                          --
-#  The ncurses Ada95 binding is copyrighted 1996 by                        --
-#  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
-#                                                                          --
-#  Permission is hereby granted to reproduce and distribute this           --
-#  binding by any means and for any fee, whether alone or as part          --
-#  of a larger distribution, in source or in binary form, PROVIDED         --
-#  this notice is included with any such distribution, and is not          --
-#  removed from any of its header files. Mention of ncurses and the        --
-#  author of this binding in any applications linked with it is            --
-#  highly appreciated.                                                     --
-#                                                                          --
-#  This binding comes AS IS with no warranty, implied or expressed.        --
-#----------------------------------------------------------------------------
+##############################################################################
+# Copyright (c) 1998 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"), #
+# to deal in the Software without restriction, including without limitation  #
+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the  #
+# following conditions:                                                      #
+#                                                                            #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software.                        #
+#                                                                            #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
+# DEALINGS IN THE SOFTWARE.                                                  #
+#                                                                            #
+# Except as contained in this notice, the name(s) of the above copyright     #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written               #
+# authorization.                                                             #
+##############################################################################
+#
+#  Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1996
+#
 #  Version Control
-#  $Revision: 1.8 $
+#  $Revision: 1.27 $
 #
 .SUFFIXES:
 
 SHELL          = /bin/sh
 THIS           = Makefile
 
+top_srcdir     = @top_srcdir@
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
@@ -33,6 +44,8 @@ libdir                = @libdir@
 includedir     = @includedir@
 datadir                = @datadir@
 ticdir         = $(datadir)/terminfo
+ADA_INCLUDE    = @ADA_INCLUDE@
+ADA_OBJECTS    = @ADA_OBJECTS@
 
 INSTALL                = @INSTALL@
 INSTALL_DATA   = @INSTALL_DATA@
@@ -47,7 +60,6 @@ CPPFLAGS      = @ACPPFLAGS@ \
                  -DHAVE_CONFIG_H -I$(srcdir)
 
 CCFLAGS                = $(CPPFLAGS) $(CFLAGS)
-
 CFLAGS_NORMAL  = $(CCFLAGS)
 CFLAGS_DEBUG   = $(CCFLAGS) @CC_G_OPT@ -DTRACE
 CFLAGS_PROFILE = $(CCFLAGS) -pg
@@ -60,20 +72,19 @@ LD_FLAGS    = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS)
 
 RANLIB         = @RANLIB@
 
-LIB_CURSES      = -L ../../lib -lncurses
+LIB_CURSES      = -L../../lib -lncurses
 
 M4             = m4
 M4FLAGS                =
 
+GENERATE       = ./gen '@DFT_ARG_SUFFIX@'
 DEL_ADAMODE    = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
 
 ################################################################################
-ALIB            = @nc_ada_package@
+ALIB            = @cf_ada_package@
 ABASE          = $(ALIB)-curses
 
-ADA_SRCDIR     = ../ada_include
-ADA_OBJDIR      = ../ada_objects
-OBJDIR          = ../objects
+ADA_SRCDIR     = ../src
 
 GEN_FILES0      = Base_Defs
 
@@ -84,7 +95,9 @@ GEN_FILES1      = Key_Definitions                             \
                  Color_Defs                            \
                  ACS_Map                               \
                  Linker_Options                        \
-                 Base_Defs
+                 Base_Defs                             \
+                 Window_Offsets                        \
+                 Version_Info
 
 GEN_FILES2      = Menu_Opt_Rep                         \
                  Menu_Base_Defs                        \
@@ -98,9 +111,14 @@ GEN_FILES3      = Form_Opt_Rep                              \
 
 GEN_FILES4      = Mouse_Base_Defs                              \
                  Mouse_Event_Rep                       \
+                 Mouse_Events                          \
                  Panel_Linker_Options
 
+GEN_FILES5     = Chtype_Def                            \
+                 Eti_Defs
+
 GEN_TARGETS     = $(ADA_SRCDIR)/$(ABASE).ads                           \
+                 $(ADA_SRCDIR)/$(ABASE)-aux.ads                        \
                  $(ADA_SRCDIR)/$(ABASE)-menus.ads                      \
                  $(ADA_SRCDIR)/$(ABASE)-forms.ads                      \
                  $(ADA_SRCDIR)/$(ABASE)-mouse.ads                      \
@@ -108,10 +126,12 @@ GEN_TARGETS     = $(ADA_SRCDIR)/$(ABASE).ads                              \
                  $(ADA_SRCDIR)/$(ABASE)-menus-menu_user_data.ads       \
                  $(ADA_SRCDIR)/$(ABASE)-menus-item_user_data.ads       \
                  $(ADA_SRCDIR)/$(ABASE)-forms-form_user_data.ads       \
+                 $(ADA_SRCDIR)/$(ABASE)-forms-field_types.ads          \
                  $(ADA_SRCDIR)/$(ABASE)-forms-field_user_data.ads      \
                  $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads
 
 GEN_SRC                = $(srcdir)/$(ABASE).ads.m4                             \
+                 $(srcdir)/$(ABASE)-aux.ads.m4                         \
                  $(srcdir)/$(ABASE)-menus.ads.m4                       \
                  $(srcdir)/$(ABASE)-forms.ads.m4                       \
                  $(srcdir)/$(ABASE)-mouse.ads.m4                       \
@@ -119,15 +139,42 @@ GEN_SRC           = $(srcdir)/$(ABASE).ads.m4                             \
                  $(srcdir)/$(ABASE)-menus-menu_user_data.ads.m4        \
                  $(srcdir)/$(ABASE)-menus-item_user_data.ads.m4        \
                  $(srcdir)/$(ABASE)-forms-form_user_data.ads.m4        \
+                 $(srcdir)/$(ABASE)-forms-field_types.ads.m4           \
                  $(srcdir)/$(ABASE)-forms-field_user_data.ads.m4       \
                  $(srcdir)/$(ABASE)-panels-user_data.ads.m4
 
 
-all:   $(GEN_TARGETS) dirs
+all:   $(GEN_TARGETS)
        @
 
-dirs:
-       @-mkdir $(OBJDIR) $(ADA_OBJDIR)
+sources:
+
+$(ADA_INCLUDE) \
+$(ADA_OBJECTS) :
+       $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$@
+
+install \
+install.libs :: $(ADA_INCLUDE)
+       @echo installing package $(ALIB) in $(INSTALL_PREFIX)$(ADA_INCLUDE)
+       @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ad?' $(ADA_SRCDIR) $(INSTALL_PREFIX)$(ADA_INCLUDE)
+       @test $(srcdir) != ./ && $(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ad?' $(srcdir)/../src $(INSTALL_PREFIX)$(ADA_INCLUDE)
+
+install \
+install.libs :: $(ADA_OBJECTS)
+       @echo installing package $(ALIB) in $(INSTALL_PREFIX)$(ADA_OBJECTS)
+       @chmod a-wx $(ADA_SRCDIR)/*.ali
+       @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ali' $(ADA_SRCDIR) $(INSTALL_PREFIX)$(ADA_OBJECTS)
+       @chmod u+x $(ADA_SRCDIR)/*.ali
+
+uninstall \
+uninstall.libs ::
+       @echo removing package $(ALIB) from $(INSTALL_PREFIX)$(ADA_INCLUDE)
+       -@cd $(INSTALL_PREFIX)$(ADA_INCLUDE) && rm -f $(ALIB)[-.]*
+
+uninstall \
+uninstall.libs ::
+       @echo removing package $(ALIB) from $(INSTALL_PREFIX)$(ADA_OBJECTS)
+       -@cd $(INSTALL_PREFIX)$(ADA_OBJECTS) && rm -f $(ALIB)[-.]*
 
 gen:   gen.o
        @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@ $(LIB_CURSES)
@@ -136,61 +183,76 @@ gen.o:    $(srcdir)/gen.c
        $(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
 
 Character_Attribute_Set_Rep: gen
-       ./gen B A >$@
+       $(GENERATE) B A >$@
 
 Base_Defs: gen
-       ./gen B B >$@
+       $(GENERATE) B B >$@
 
 Color_Defs: gen
-       ./gen B C >$@
+       $(GENERATE) B C >$@
 
 Key_Definitions: gen
-       ./gen B K >$@
+       $(GENERATE) B K >$@
 
 Old_Keys: gen
-       ./gen B O >$@
+       $(GENERATE) B O >$@
 
 ACS_Map: gen
-       ./gen B M >$@
+       $(GENERATE) B M >$@
 
 AC_Rep: gen
-       ./gen B R >$@
+       $(GENERATE) B R >$@
 
 Linker_Options: gen
-       ./gen B L >$@
+       $(GENERATE) B L >$@
+
+Version_Info: gen
+       $(GENERATE) B V >$@
+
+Window_Offsets: gen
+       $(GENERATE) B D >$@
 
 Menu_Opt_Rep: gen
-       ./gen M R >$@
+       $(GENERATE) M R >$@
 
 Menu_Base_Defs: gen
-       ./gen M B >$@
+       $(GENERATE) M B >$@
 
 Menu_Linker_Options: gen
-       ./gen M L >$@
+       $(GENERATE) M L >$@
 
 Item_Rep: gen
-       ./gen M I >$@
+       $(GENERATE) M I >$@
 
 Form_Opt_Rep: gen
-       ./gen F R >$@
+       $(GENERATE) F R >$@
 
 Form_Base_Defs: gen
-       ./gen F B >$@
+       $(GENERATE) F B >$@
 
 Form_Linker_Options: gen
-       ./gen F L >$@
+       $(GENERATE) F L >$@
 
 Field_Rep: gen
-       ./gen F I >$@
+       $(GENERATE) F I >$@
 
 Mouse_Base_Defs: gen
-       ./gen P B >$@
+       $(GENERATE) P B >$@
 
 Mouse_Event_Rep: gen
-       ./gen P M >$@
+       $(GENERATE) P M >$@
+
+Mouse_Events: gen
+       $(GENERATE) B E >$@
 
 Panel_Linker_Options: gen
-       ./gen P L >$@
+       $(GENERATE) P L >$@
+
+Chtype_Def: gen
+       $(GENERATE) E C >$@
+
+Eti_Defs: gen
+       $(GENERATE) E E >$@
 
 $(ADA_SRCDIR)/$(ABASE).ads:    $(srcdir)/$(ABASE).ads.m4 \
                                $(GEN_FILES1) $(srcdir)/normal.m4
@@ -198,6 +260,12 @@ $(ADA_SRCDIR)/$(ABASE).ads:        $(srcdir)/$(ABASE).ads.m4 \
        $(srcdir)/$(ABASE).ads.m4 |\
        $(DEL_ADAMODE) >$@
 
+$(ADA_SRCDIR)/$(ABASE)-aux.ads: $(srcdir)/$(ABASE)-aux.ads.m4 \
+                               $(GEN_FILES5) $(srcdir)/normal.m4
+       $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
+       $(srcdir)/$(ABASE)-aux.ads.m4 |\
+       $(DEL_ADAMODE) >$@
+
 $(ADA_SRCDIR)/$(ABASE)-menus.ads: $(srcdir)/$(ABASE)-menus.ads.m4 \
                                  $(GEN_FILES2) $(srcdir)/normal.m4
        $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
@@ -243,6 +311,13 @@ $(ADA_SRCDIR)/$(ABASE)-forms-form_user_data.ads: \
        $(srcdir)/$(ABASE)-forms-form_user_data.ads.m4 |\
        $(DEL_ADAMODE) >$@
 
+$(ADA_SRCDIR)/$(ABASE)-forms-field_types.ads: \
+               $(srcdir)/$(ABASE)-forms-field_types.ads.m4 \
+               $(srcdir)/normal.m4
+       $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
+       $(srcdir)/$(ABASE)-forms-field_types.ads.m4 |\
+       $(DEL_ADAMODE) >$@
+
 $(ADA_SRCDIR)/$(ABASE)-forms-field_user_data.ads: \
                $(srcdir)/$(ABASE)-forms-field_user_data.ads.m4 \
                $(srcdir)/normal.m4
@@ -257,10 +332,6 @@ $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads: \
        $(srcdir)/$(ABASE)-panels-user_data.ads.m4 |\
        $(DEL_ADAMODE) >$@
 
-install :: 
-
-install.libs ::
-
 install.progs ::
 
 tags:
@@ -269,13 +340,18 @@ tags:
 TAGS:
        etags *.[ch]
 
-clean ::
-       rm -f a.out core gen *.o $(GEN_FILES1) $(GEN_FILES2) $(GEN_FILES3) \
-       $(GEN_FILES4) $(GEN_TARGETS)
+mostlyclean ::
+       -rm -f a.out core gen *.o
+       -rm -f $(GEN_FILES1)
+       -rm -f $(GEN_FILES2)
+       -rm -f $(GEN_FILES3)
+       -rm -f $(GEN_FILES4)
+       -rm -f $(GEN_FILES5)
 
-mostlyclean :: clean
+clean :: mostlyclean
+       -rm -f $(GEN_TARGETS)
 
-distclean :: mostlyclean
+distclean :: clean
        rm -f Makefile
 
 realclean :: distclean