1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src/cmd/INIT/MAPLIB.mk
Johnothan King f9fdbfc9e9
Fix a large number of typos and other problems (#110)
Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: https://github.com/att/ast/issues/764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: https://github.com/att/ast/issues/871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: https://github.com/att/ast/issues/789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  https://github.com/att/ast/issues/948
  https://github.com/att/ast/issues/503#issuecomment-386649715
  https://github.com/att/ast/issues/507#issuecomment-507924608
- Applied the following ksh2020 documentation fixes:
  https://github.com/att/ast/pull/351
  https://github.com/att/ast/pull/352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  a sentinel to NULL.
2020-08-07 00:50:11 +01:00

45 lines
1,006 B
Makefile

/*
* normalize local -l* library conventions
*
* L [ [ G11 ... G1n ] ... [ Gg1 ... Ggn ] ] :MAPLIB: T1.c ... Tn.c
*
* if Giji not specified then G11 == L
* the first Ti.c that compiles/links with group -lGi1 ... -lGin
* but does not compile/link with no libraries maps
* -lL to require -lGi1 ... -lGin
* otherwise -lL is not required and maps to "no library required"
*/
":MAPLIB:" : .MAKE .OPERATOR
local L P
L := $(<:B:O=1)
if ! ( P = "$(<:B:O>1)" )
P := $(L)
end
$(LIBDIR)/lib/$(L) :INSTALL: $(L).req
eval
$(L).req : (CC) $$(>)
set -
r='-'
for i in $$(*)
do if $$(CC) -c $i > /dev/null
then g=
for p in $(P) -
do case $p in
-) if $$(CC) -o $$(<:B:S=.exe) $i $g > /dev/null 2>&1
then $$(CC) -o $$(<:B:S=.exe) $i > /dev/null 2>&1 || {
r="$g"
break 2
}
fi
g=
;;
*) g="$g -l$p"
;;
esac
done
fi
done 2>/dev/null
echo " $r" > $$(<)
rm -f $$(<:B:S=.exe) $$(*:B:S=$$(CC.SUFFIX.OBJECT))
end