]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/src/library-cfg.sh
ncurses 6.1 - patch 20191005
[ncurses.git] / Ada95 / src / library-cfg.sh
index 674baa60d5dd2423dfefea21b6fe204b29289efa..005979f44467b1eaf7dcd005320761de60329d9c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 ##############################################################################
-# Copyright (c) 2016,2018 Free Software Foundation, Inc.                     #
+# Copyright (c) 2016-2018,2019 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"), #
@@ -27,7 +27,7 @@
 # authorization.                                                             #
 ##############################################################################
 #
-# $Id: library-cfg.sh,v 1.4 2018/11/10 22:58:52 tom Exp $
+# $Id: library-cfg.sh,v 1.6 2019/09/07 20:27:26 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
@@ -55,9 +55,18 @@ 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
-exit 0
+SCRIPT=library-cfg.tmp
+cat >$SCRIPT <<EOF
+/for Library_Options use /{
+       s,-- ,$SHARE,
+}
+/for Default_Switches ("C") use/{
+       s,-- ,,
+       s% use .*% use($param);%
+}
+EOF
+
+sed -f $SCRIPT $input
+rc=$?
+rm -f $SCRIPT
+exit $?