X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=Ada95%2Fsrc%2Flibrary-cfg.sh;h=c41661705a8710f33fe4abaf9c1272e31683aff3;hb=5c90fc94a5ac426a5e51732720767d5f0041830d;hp=d1c1ce3568e7e4709f04c9c82e5d67f4f8b30571;hpb=89175dffb0245ffaa1ffec80373cb9990f8dc7fe;p=ncurses.git diff --git a/Ada95/src/library-cfg.sh b/Ada95/src/library-cfg.sh old mode 100644 new mode 100755 index d1c1ce35..c4166170 --- a/Ada95/src/library-cfg.sh +++ b/Ada95/src/library-cfg.sh @@ -1,6 +1,7 @@ #!/bin/sh ############################################################################## -# Copyright (c) 2016 Free Software Foundation, Inc. # +# Copyright 2018-2019,2020 Thomas E. Dickey # +# Copyright 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"), # @@ -27,24 +28,46 @@ # authorization. # ############################################################################## # -# $Id: library-cfg.sh,v 1.1 2016/09/17 23:45:03 tom Exp $ +# $Id: library-cfg.sh,v 1.7 2020/02/02 23:34:34 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\"" + case "x$1" in + *-[OgDIWf]*) + test -n "$param" && param="$param," + param="$param\"$1\"" + ;; + *) + echo "${0##*/}: ignored option $1" >&2 + ;; + esac shift 1 done -sed \ - -e '/for Default_Switches ("C") use/s,-- ,,' \ - -e '/for Default_Switches ("C") use/s% use .*'%" use($param);"% \ - $input -exit 0 +SHARE="-- " +test "x$model" = "xdynamic" && SHARE= + +SCRIPT=library-cfg.tmp +cat >$SCRIPT <