]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/src/library-cfg.sh
ncurses 6.1 - patch 20180210
[ncurses.git] / Ada95 / src / library-cfg.sh
old mode 100644 (file)
new mode 100755 (executable)
index d1c1ce3..47470d4
@@ -1,6 +1,6 @@
 #!/bin/sh
 ##############################################################################
-# Copyright (c) 2016 Free Software Foundation, Inc.                          #
+# Copyright (c) 2016,2018 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.                                                             #
 ##############################################################################
 #
-# $Id: library-cfg.sh,v 1.1 2016/09/17 23:45:03 tom Exp $
+# $Id: library-cfg.sh,v 1.3 2018/01/15 14:32:47 tom Exp $
 #
 # Work around incompatible behavior introduced with gnat6, which causes
 # gnatmake to attempt to compile all of the C objects which might be part of
 # the project.  This can only work if we provide the compiler flags (done here
 # by making a copy of the project file with that information filled in).
+model=$1
+shift 1
 input=$1
 shift 1
 param=
 while test $# != 0
 do
        test -n "$param" && param="$param,"
-       param="$param\"$1\"" 
+       param="$param\"$1\""
        shift 1
 done
 
+SHARE="-- "
+test "x$model" = "xdynamic" && SHARE=
+
 sed \
+       -e '/for Library_Options use /s,-- ,'"$SHARE"',' \
        -e '/for Default_Switches ("C") use/s,-- ,,' \
        -e '/for Default_Switches ("C") use/s% use .*'%" use($param);"% \
        $input