projects
/
ncurses.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ncurses 6.2 - patch 20200912
[ncurses.git]
/
mk-hdr.awk
diff --git
a/mk-hdr.awk
b/mk-hdr.awk
index 9b6bee4108c65e708d4e8658c10094ba50faa0a3..2fa5941ea6ede452391501952d1b19f00abd24c9 100644
(file)
--- a/
mk-hdr.awk
+++ b/
mk-hdr.awk
@@
-1,6
+1,7
@@
-# $Id: mk-hdr.awk,v 1.
2 2007/03/31 15:48:45
tom Exp $
+# $Id: mk-hdr.awk,v 1.
7 2020/08/31 23:48:44
tom Exp $
##############################################################################
##############################################################################
-# Copyright (c) 2007 Free Software Foundation, Inc. #
+# Copyright 2020 Thomas E. Dickey #
+# Copyright 2007-2010,2013 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"), #
@@
-38,6
+39,13
@@
function basename(path) {
sub(/^.*\//,"",path)
return path;
}
sub(/^.*\//,"",path)
return path;
}
+function in_subset(value) {
+ value = " " value " ";
+ check = subset;
+ gsub("[+]", " ", check);
+ check = " " check " ";
+ return index(check,value);
+}
BEGIN {
found = 0
using = 1
BEGIN {
found = 0
using = 1
@@
-47,7
+55,7
@@
BEGIN {
using = 0
if (subset == "none") {
using = 1
using = 0
if (subset == "none") {
using = 1
- } else if (in
dex(subset,
$2) > 0) {
+ } else if (in
_subset(
$2) > 0) {
using = 1
} else {
using = 0
using = 1
} else {
using = 0
@@
-73,12
+81,12
@@
BEGIN {
END {
if ( count > 0 )
{
END {
if ( count > 0 )
{
- print "${
DESTDIR}${includedir
} :"
- print "
sh ${srcdir}/../mkdirs.sh
$@"
+ print "${
INCLUDEDIR
} :"
+ print "
mkdir -p
$@"
print ""
print "install \\"
print "install.libs \\"
print ""
print "install \\"
print "install.libs \\"
- print "install.includes :: ${AUTO_SRC} ${
DESTDIR}${includedir
} \\"
+ print "install.includes :: ${AUTO_SRC} ${
INCLUDEDIR
} \\"
for (i = 0; i < count - 1; ++i) {
printf " %s \\\n", data[i]
for (i = 0; i < count - 1; ++i) {
printf " %s \\\n", data[i]
@@
-86,9
+94,9
@@
END {
printf " %s\n", data[count - 1]
for (i = 0; i < count; ++i) {
printf " %s\n", data[count - 1]
for (i = 0; i < count; ++i) {
- printf " @ (cd ${
DESTDIR}${includedir} && rm -f %s) ; ../headers.sh ${INSTALL_DATA} ${DESTDIR}${includedir
} ${srcdir} %s\n", basename(data[i]), data[i]
+ printf " @ (cd ${
INCLUDEDIR} && rm -f %s) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR
} ${srcdir} %s\n", basename(data[i]), data[i]
if (data[i] == "curses.h" && compat == "yes") {
if (data[i] == "curses.h" && compat == "yes") {
- printf " @ (cd ${
DESTDIR}${includedir
} && rm -f ncurses.h && ${LN_S} %s ncurses.h)\n", data[i]
+ printf " @ (cd ${
INCLUDEDIR
} && rm -f ncurses.h && ${LN_S} %s ncurses.h)\n", data[i]
}
}
print ""
}
}
print ""
@@
-97,9
+105,9
@@
END {
print "uninstall.includes ::"
for (i = 0; i < count; ++i) {
print "uninstall.includes ::"
for (i = 0; i < count; ++i) {
- printf " -@ (cd ${
DESTDIR}${includedir
} && rm -f %s)\n", basename(data[i])
+ printf " -@ (cd ${
INCLUDEDIR
} && rm -f %s)\n", basename(data[i])
if (data[i] == "curses.h" && compat == "yes") {
if (data[i] == "curses.h" && compat == "yes") {
- printf " -@ (cd ${
DESTDIR}${includedir
} && rm -f ncurses.h)\n"
+ printf " -@ (cd ${
INCLUDEDIR
} && rm -f ncurses.h)\n"
}
}
}
}
}
}