]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - mk-0th.awk
ncurses 5.7 - patch 20100925
[ncurses.git] / mk-0th.awk
index 399f156bb0cd5e1e7e0d3e3dafee02306f8387ac..5a0bf4583ad8c2a0a818a6d7c211d569b33b2517 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: mk-0th.awk,v 1.14 2002/08/31 21:36:54 tom Exp $
+# $Id: mk-0th.awk,v 1.18 2010/01/09 21:45:41 tom Exp $
 ##############################################################################
 ##############################################################################
-# Copyright (c) 1998-2001 Free Software Foundation, Inc.                     #
+# Copyright (c) 1998-2005,2010 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"), #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
 # authorization.                                                             #
 ##############################################################################
 #
 # authorization.                                                             #
 ##############################################################################
 #
-# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
+# Author: Thomas E. Dickey 1996-on
 #
 # Generate list of sources for a library, together with lint/lintlib rules
 #
 # Variables:
 #      libname (library name, e.g., "ncurses", "panel", "forms", "menus")
 #
 # Generate list of sources for a library, together with lint/lintlib rules
 #
 # Variables:
 #      libname (library name, e.g., "ncurses", "panel", "forms", "menus")
+#      subsets (is used here to decide if wide-character code is used)
 #
 BEGIN  {
 #
 BEGIN  {
-               print  ""
-               print  "# generated by mk-0th.awk"
-               print  ""
-               print  ".SUFFIXES: .c .cc .h .i .ii"
-               print  ".c.i :"
-               printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
-               print  ".cc.ii :"
-               printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
-               print  ".h.i :"
-               printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
-               print  ""
+               which = libname;
+               using = 0;
                found = 0;
        }
                found = 0;
        }
+       /^@/ {
+               which = $0;
+       }
        !/^[@#]/ {
        !/^[@#]/ {
-               if ( $0 != "" && $1 != "link_test" )
+               if (using == 0)
+               {
+                       print  ""
+                       print  "# generated by mk-0th.awk"
+                       printf "#   libname:    %s\n", libname
+                       printf "#   subsets:    %s\n", subsets
+                       print  ""
+                       print  ".SUFFIXES: .c .cc .h .i .ii"
+                       print  ".c.i :"
+                       printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
+                       print  ".cc.ii :"
+                       printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
+                       print  ".h.i :"
+                       printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
+                       print  ""
+                       using = 1;
+               }
+               if (which ~ /port_/ )
+               {
+                       # skip win32 source
+               }
+               else if ( $0 != "" && $1 != "link_test" )
                {
                        if ( found == 0 )
                        {
                {
                        if ( found == 0 )
                        {
@@ -84,7 +100,7 @@ END  {
                        printf "\trm -f llib-l%s\n", libname
                        print  ""
                        printf "llib-l%s : $(C_SRC)\n", libname
                        printf "\trm -f llib-l%s\n", libname
                        print  ""
                        printf "llib-l%s : $(C_SRC)\n", libname
-                       printf "\tcproto -a -l -DLINT $(CPPFLAGS) $(C_SRC) >$@\n"
+                       printf "\tcproto -a -l -DNCURSES_ENABLE_STDBOOL_H=0 -DLINT $(CPPFLAGS) $(C_SRC) >$@\n"
                        print  ""
                        print  "lintlib :"
                        printf "\tsh $(srcdir)/../misc/makellib %s $(CPPFLAGS)", libname
                        print  ""
                        print  "lintlib :"
                        printf "\tsh $(srcdir)/../misc/makellib %s $(CPPFLAGS)", libname