Skip to content

Commit db1c369

Browse files
committed
Make BINDIR and MANDIR depend on PREFIX.
Noticed from a comment in Glaucus Linux.
1 parent 36850ce commit db1c369

File tree

4 files changed

+41
-28
lines changed

4 files changed

+41
-28
lines changed

CVS/Entries

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
/main.c/1.87/Thu Jun 15 13:48:42 2017//
33
D/PSD.doc////
44
D/TEST////
5-
/Makefile/1.16/Mon Sep 9 13:07:42 2019//
6-
/NOTES/1.1.1.1/Mon Sep 9 13:04:12 2019//
7-
/eval.c/1.78/Mon Sep 9 13:07:42 2019//
8-
/expr.c/1.18/Mon Sep 9 13:04:12 2019//
9-
/gnum4.c/1.52/Mon Sep 9 13:04:12 2019//
10-
/look.c/1.24/Mon Sep 9 13:04:12 2019//
11-
/m4.1/1.64/Mon Sep 9 13:04:12 2019//
12-
/mdef.h/1.33/Mon Sep 9 13:04:12 2019//
13-
/misc.c/1.47/Mon Sep 9 13:04:12 2019//
14-
/parser.y/1.7/Mon Sep 9 13:04:12 2019//
15-
/pathnames.h/1.6/Mon Sep 9 13:04:12 2019//
16-
/stdd.h/1.6/Mon Sep 9 13:04:12 2019//
17-
/tokenizer.l/1.10/Mon Sep 9 13:04:12 2019//
18-
/trace.c/1.16/Mon Sep 9 13:04:12 2019//
5+
/Makefile/1.16/Sat May 9 00:33:09 2020//
6+
/NOTES/1.1.1.1/Sat May 9 00:33:03 2020//
7+
/eval.c/1.78/Sat May 9 00:33:03 2020//
8+
/expr.c/1.18/Sat May 9 00:33:03 2020//
9+
/gnum4.c/1.52/Sat May 9 00:33:03 2020//
10+
/look.c/1.24/Sat May 9 00:33:03 2020//
11+
/m4.1/1.64/Sat May 9 00:33:03 2020//
12+
/mdef.h/1.33/Sat May 9 00:33:03 2020//
13+
/misc.c/1.47/Sat May 9 00:33:03 2020//
14+
/parser.y/1.7/Sat May 9 00:33:03 2020//
15+
/pathnames.h/1.6/Sat May 9 00:33:03 2020//
16+
/stdd.h/1.6/Sat May 9 00:33:03 2020//
17+
/tokenizer.l/1.10/Sat May 9 00:33:03 2020//
18+
/trace.c/1.16/Sat May 9 00:33:03 2020//

PSD.doc/CVS/Entries

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
/Makefile/1.4/Mon Sep 9 13:04:12 2019//
2-
/m4.ms/1.2/Mon Sep 9 13:04:12 2019//
1+
/Makefile/1.4/Sat May 9 00:33:03 2020//
2+
/m4.ms/1.2/Sat May 9 00:33:03 2020//
33
D

TEST/CVS/Entries

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/ack.m4/1.3/Mon Sep 9 13:04:12 2019//
2-
/hanoi.m4/1.3/Mon Sep 9 13:04:12 2019//
3-
/hash.m4/1.3/Mon Sep 9 13:04:12 2019//
4-
/sqroot.m4/1.3/Mon Sep 9 13:04:12 2019//
5-
/string.m4/1.3/Mon Sep 9 13:04:12 2019//
6-
/test.m4/1.3/Mon Sep 9 13:04:12 2019//
1+
/ack.m4/1.3/Sat May 9 00:33:03 2020//
2+
/hanoi.m4/1.3/Sat May 9 00:33:03 2020//
3+
/hash.m4/1.3/Sat May 9 00:33:03 2020//
4+
/sqroot.m4/1.3/Sat May 9 00:33:03 2020//
5+
/string.m4/1.3/Sat May 9 00:33:03 2020//
6+
/test.m4/1.3/Sat May 9 00:33:03 2020//
77
D

configure

+19-6
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ EOF
8383
noreturncheck() {
8484
cat << EOF > conftest.c
8585
#include <stdlib.h>
86-
__attribute__((__no_return__)) void usage(void){exit(1);}int main(void){usage();return 0;}
86+
__attribute__((__noreturn__)) void usage(void){exit(1);}int main(void){usage();return 0;}
8787
EOF
8888
$cc $tflags -o conftest conftest.c > /dev/null 2>&1
8989
if [ $? -eq 0 ] ; then
@@ -195,7 +195,10 @@ else
195195
prefix="/usr/local"
196196
fi
197197

198-
mandir="$prefix/man"
198+
bindirset=0
199+
mandirset=0
200+
bindir="$prefix/bin"
201+
mandir="$prefix/share/man"
199202

200203
instprog="om4"
201204
static=0
@@ -206,6 +209,15 @@ do
206209
case "$opt" in
207210
--prefix=*)
208211
prefix=`echo $opt | cut -d '=' -f 2`
212+
if [ $bindirset -eq 0 ] ; then
213+
bindir="$prefix/bin"
214+
fi
215+
if [ $mandirset -eq 0 ] ; then
216+
mandir="$prefix/share/man"
217+
fi
218+
;;
219+
--bindir=*)
220+
bindir=`echo $opt | cut -d '=' -f 2`
209221
;;
210222
--mandir=*)
211223
mandir=`echo $opt | cut -d '=' -f 2`
@@ -317,10 +329,10 @@ else
317329
echo "yes"
318330
else
319331
echo "no"
320-
printf "checking for __attribute__((__no_return__))... "
332+
printf "checking for __attribute__((__noreturn__))... "
321333
noreturncheck
322334
if [ $? -eq 0 ] ; then
323-
echo "#define __dead __attribute__((__no_return__))" >> config.h
335+
echo "#define __dead __attribute__((__noreturn__))" >> config.h
324336
echo "yes"
325337
else
326338
echo "#define __dead" >> config.h
@@ -390,6 +402,7 @@ fi
390402

391403
cat << EOF >> Makefile
392404
PREFIX = $prefix
405+
BINDIR = $bindir
393406
MANDIR = $mandir
394407
395408
PROG = $instprog
@@ -407,9 +420,9 @@ parser.c parser.h: parser.y
407420
tokenizer.o: parser.h
408421
409422
install:
410-
install -d \${DESTDIR}\${PREFIX}/bin
423+
install -d \${DESTDIR}\${BINDIR}
411424
install -d \${DESTDIR}\${MANDIR}/man1
412-
install -c -s -m 755 \${PROG} \${DESTDIR}\${PREFIX}/bin
425+
install -c -s -m 755 \${PROG} \${DESTDIR}\${BINDIR}
413426
install -c -m 644 m4.1 \${DESTDIR}\${MANDIR}/man1/\${PROG}.1
414427
415428
test:

0 commit comments

Comments
 (0)