ncurses 5.9 - patch 20150418
[ncurses.git] / Ada95 / gen / Makefile.in
index cd538fa1712fdc0d176e6672a1d3302e811e0bc1..9e69e32e74436d6a52d6e850dc347a29d0979edf 100644 (file)
@@ -1,5 +1,5 @@
 ##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
+# Copyright (c) 1998-2014,2015 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"), #
 # authorization.                                                             #
 ##############################################################################
 #
-#  Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1996
+#  Author:  Juergen Pfeifer, 1996
 #
-#  Version Control
-#  $Revision: 1.30 $
+#  $Id: Makefile.in,v 1.82 2015/04/18 17:06:24 tom Exp $
 #
 .SUFFIXES:
 
 SHELL          = /bin/sh
+VPATH          = @srcdir@
 THIS           = Makefile
 
+x              = @EXEEXT@
+
 top_srcdir     = @top_srcdir@
+DESTDIR                = @DESTDIR@
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
-libdir         = @libdir@
+bindir         = @bindir@
 includedir     = @includedir@
-datadir                = @datadir@
-ticdir         = $(datadir)/terminfo
-ADA_INCLUDE    = @ADA_INCLUDE@
-ADA_OBJECTS    = @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@
 
-CPPFLAGS       = @ACPPFLAGS@ \
+CPPFLAGS       = @ACPPFLAGS@ @CPPFLAGS@ \
                  -DHAVE_CONFIG_H -I$(srcdir)
 
 CCFLAGS                = $(CPPFLAGS) $(CFLAGS)
@@ -67,23 +68,28 @@ CFLAGS_SHARED       = $(CCFLAGS) @CC_SHARED_OPTS@
 
 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
 
-LINK           = $(CC)
-LD_FLAGS       = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS)
+REL_VERSION    = @cf_cv_rel_version@
+ABI_VERSION    = @cf_cv_abi_version@
+LOCAL_LIBDIR   = @top_builddir@/lib
 
-RANLIB         = @RANLIB@
+LINK           = $(HOST_CC)
+LD_FLAGS       = @LD_MODEL@ $(LOCAL_LIBS) @TINFO_LDFLAGS2@ @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) @TINFO_LIBS@
 
-LIB_CURSES      = -L../../lib -lncurses@LIB_SUFFIX@
+RANLIB         = @RANLIB@
 
 M4             = m4
-M4FLAGS                =
+M4FLAGS                = -DNCURSES_EXT_FUNCS=@NCURSES_EXT_FUNCS@
 
-GENERATE       = ./gen '@DFT_ARG_SUFFIX@'
+ADACURSES_CONFIG = adacurses@USE_CFG_SUFFIX@-config
+
+WRAPPER                = @NCURSES_SHLIB2@
+
+PROG_GENERATE  = ./generate$x
+GENERATE       = $(PROG_GENERATE) '@DFT_ARG_SUFFIX@'
 DEL_ADAMODE    = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
 
-GNATHTML       = `type -p gnathtml || type -p gnathtml.pl`
+GNATHTML       = `type -p gnathtml || type -p gnathtml.pl 2>/dev/null`
 GNATHP          = www.gnat.com
-MAIL            = juergen.pfeifer@gmx.net
-HOMEP           = home.t-online.de/home/Juergen.Pfeifer
 
 ################################################################################
 ALIB            = @cf_ada_package@
@@ -91,39 +97,10 @@ ABASE               = $(ALIB)-curses
 
 ADA_SRCDIR     = ../src
 
-GEN_FILES0      = Base_Defs
-
-GEN_FILES1      = Key_Definitions                              \
-                 Old_Keys                              \
-                 Character_Attribute_Set_Rep           \
-                 AC_Rep                                \
-                 Color_Defs                            \
-                 ACS_Map                               \
-                 Linker_Options                        \
-                 Base_Defs                             \
-                 Window_Offsets                        \
-                 Version_Info
-
-GEN_FILES2      = Menu_Opt_Rep                         \
-                 Menu_Base_Defs                        \
-                 Menu_Linker_Options                   \
-                 Item_Rep
-
-GEN_FILES3      = Form_Opt_Rep                                 \
-                 Form_Base_Defs                        \
-                 Form_Linker_Options                   \
-                 Field_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).adb                            \
                  $(ADA_SRCDIR)/$(ABASE)-aux.ads                        \
+                 $(ADA_SRCDIR)/$(ABASE)-trace.ads                      \
                  $(ADA_SRCDIR)/$(ABASE)-menus.ads                      \
                  $(ADA_SRCDIR)/$(ABASE)-forms.ads                      \
                  $(ADA_SRCDIR)/$(ABASE)-mouse.ads                      \
@@ -133,10 +110,13 @@ GEN_TARGETS     = $(ADA_SRCDIR)/$(ABASE).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
+                 $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads           \
+                  $(ADA_SRCDIR)/$(ABASE)_constants.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                       \
                  $(srcdir)/$(ABASE)-forms.ads.m4                       \
                  $(srcdir)/$(ABASE)-mouse.ads.m4                       \
@@ -151,141 +131,68 @@ GEN_SRC          = $(srcdir)/$(ABASE).ads.m4                             \
 
 all \
 libs : $(GEN_TARGETS)
-       @
+       @echo made $@
 
 sources:
 
-$(ADA_INCLUDE) \
-$(ADA_OBJECTS) :
-       $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$@
+$(DESTDIR)$(bindir) :
+       mkdir -p $@
 
 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)[-.]*
+install.libs :: $(DESTDIR)$(bindir) $(ADACURSES_CONFIG)
+       $(INSTALL_PROG) $(ADACURSES_CONFIG) $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
 
 uninstall \
 uninstall.libs ::
-       @echo removing package $(ALIB) from $(INSTALL_PREFIX)$(ADA_OBJECTS)
-       -@cd $(INSTALL_PREFIX)$(ADA_OBJECTS) && rm -f $(ALIB)[-.]*
+       -rm -f $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
 
-gen:   gen.o
-       @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@ $(LIB_CURSES)
+$(PROG_GENERATE):  gen.o
+       @ECHO_LD@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@
 
 gen.o: $(srcdir)/gen.c
-       $(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
-
-Character_Attribute_Set_Rep: gen
-       $(GENERATE) B A >$@
-
-Base_Defs: gen
-       $(GENERATE) B B >$@
-
-Color_Defs: gen
-       $(GENERATE) B C >$@
-
-Key_Definitions: gen
-       $(GENERATE) B K >$@
-
-Old_Keys: gen
-       $(GENERATE) B O >$@
-
-ACS_Map: gen
-       $(GENERATE) B M >$@
-
-AC_Rep: gen
-       $(GENERATE) B R >$@
-
-Linker_Options: gen
-       $(GENERATE) B L >$@
-
-Version_Info: gen
-       $(GENERATE) B V >$@
-
-Window_Offsets: gen
-       $(GENERATE) B D >$@
-
-Menu_Opt_Rep: gen
-       $(GENERATE) M R >$@
-
-Menu_Base_Defs: gen
-       $(GENERATE) M B >$@
-
-Menu_Linker_Options: gen
-       $(GENERATE) M L >$@
-
-Item_Rep: gen
-       $(GENERATE) M I >$@
-
-Form_Opt_Rep: gen
-       $(GENERATE) F R >$@
-
-Form_Base_Defs: gen
-       $(GENERATE) F B >$@
-
-Form_Linker_Options: gen
-       $(GENERATE) F L >$@
-
-Field_Rep: gen
-       $(GENERATE) F I >$@
-
-Mouse_Base_Defs: gen
-       $(GENERATE) P B >$@
-
-Mouse_Event_Rep: gen
-       $(GENERATE) P M >$@
-
-Mouse_Events: gen
-       $(GENERATE) B E >$@
-
-Panel_Linker_Options: gen
-       $(GENERATE) P L >$@
-
-Chtype_Def: gen
-       $(GENERATE) E C >$@
-
-Eti_Defs: gen
-       $(GENERATE) E E >$@
+       $(HOST_CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
 
+$(ADA_SRCDIR)/$(ABASE)_constants.ads: $(PROG_GENERATE)
+       $(WRAPPER) "$(GENERATE)" >$@
+################################################################################
 $(ADA_SRCDIR)/$(ABASE).ads:    $(srcdir)/$(ABASE).ads.m4 \
-                               $(GEN_FILES1) $(srcdir)/normal.m4
+                               $(srcdir)/normal.m4
        $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
        $(srcdir)/$(ABASE).ads.m4 |\
        $(DEL_ADAMODE) >$@
 
+$(ADA_SRCDIR)/$(ABASE).adb:    $(srcdir)/$(ABASE).adb.m4 \
+                               $(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
+                               $(srcdir)/normal.m4
        $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
        $(srcdir)/$(ABASE)-aux.ads.m4 |\
        $(DEL_ADAMODE) >$@
 
+$(ADA_SRCDIR)/$(ABASE)-trace.ads: $(srcdir)/$(ABASE)-trace.ads.m4 \
+                                 $(srcdir)/normal.m4
+       $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
+       $(srcdir)/$(ABASE)-trace.ads.m4 |\
+       $(DEL_ADAMODE) >$@
+
 $(ADA_SRCDIR)/$(ABASE)-menus.ads: $(srcdir)/$(ABASE)-menus.ads.m4 \
-                                 $(GEN_FILES2) $(srcdir)/normal.m4
+                                 $(srcdir)/normal.m4
        $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
        $(srcdir)/$(ABASE)-menus.ads.m4 |\
        $(DEL_ADAMODE) >$@
 
 $(ADA_SRCDIR)/$(ABASE)-forms.ads: $(srcdir)/$(ABASE)-forms.ads.m4 \
-                                 $(GEN_FILES3) $(srcdir)/normal.m4
+                                 $(srcdir)/normal.m4
        $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
        $(srcdir)/$(ABASE)-forms.ads.m4 |\
        $(DEL_ADAMODE) >$@
 
 $(ADA_SRCDIR)/$(ABASE)-mouse.ads: $(srcdir)/$(ABASE)-mouse.ads.m4 \
-                                 $(GEN_FILES4) $(srcdir)/normal.m4
+                                 $(srcdir)/normal.m4
        $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
        $(srcdir)/$(ABASE)-mouse.ads.m4 |\
        $(DEL_ADAMODE) >$@
@@ -343,26 +250,22 @@ install.progs ::
 tags:
        ctags *.[ch]
 
-TAGS:
-       etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@      etags *.[ch]
 
 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)
+       -rm -f a.out core $(PROG_GENERATE) *.o
 
 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
 
-HTML_DIR = ../../doc/html/ada
+HTML_DIR = @ADAHTML_DIR@
 
 instab.tmp : table.m4 $(GEN_SRC)
        @rm -f $@
@@ -390,13 +293,20 @@ $(HTML_DIR)/table.html : instab.tmp
        @rm -f instab.tmp
 
 adahtml:
-       @rm -rf $(HTML_DIR)/
+       test -n "$(GNATHTML)" || exit 1
+       @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 \
+@USE_OLD_MAKERULES@    ln -sf ../src/*.ali .
+@USE_GNAT_PROJECTS@    ln -sf ../static-ali/*.ali .
+       @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
@@ -407,12 +317,10 @@ adahtml:
           sed -e 's%&lt;A HREF%<A HREF%g' |\
           sed -e 's%"&gt;%">%g' |\
           sed -e 's/3X/3x/g' |\
-          sed -e 's/$$\([A-Za-z0-9_]*:.*\)\$$/@\1@/' |\
-          sed -e 's%Juergen Pfeifer%<A HREF="http://$(HOMEP)">J\&uuml;rgen Pfeifer</A>%g' |\
-          sed -e 's%$(MAIL)%<A HREF="mailto:$(MAIL)">\&lt;$(MAIL)\&gt;</A>%g' |\
+          sed -e 's/$$\([ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxz0123456789_]*:.*\)\$$/@\1@/' |\
           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 ;\
@@ -423,7 +331,7 @@ adahtml:
        @rm -rf html
 
 html : adahtml $(HTML_DIR)/table.html
-       @
+       @echo made $@
 
 ###############################################################################
 # The remainder of this file is automatically generated during configuration