-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·34 lines (34 loc) · 1.34 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
rm -f Makefile
if [ "$1" != "make" ]; then
for MODUL in generate runform runform/colquery runform/regex runform/elk runform/crypt runform/membed; do
( cd $MODUL; make clean; ) >/dev/null
done
fi
test "$1" = "clean" && exit
cat >Makefile <<EOF
ARX=/opt/arx
all: bin
@echo 'you can now run "sudo make install"'
bin: runform/runform generate/adjfield generate/formax.frm
install: bin \$(DESTDIR)\$(ARX)/bin
@chmod u=rwx,g=rx,o=rx generate/makeform generate/editform generate/adjfield generate/extractsql
@chmod 2751 runform/runform
@chmod u=rw,g=r,o=r generate/*.frm
@cp -p generate/makeform generate/editform generate/adjfield generate/extractsql runform/runform \$(DESTDIR)\$(ARX)/bin
@cp -p generate/formax.frm \$(DESTDIR)\$(ARX)/lib
@cp -r runform \$(DESTDIR)\$(ARX)
@chmod -R u=rwX,g=rX,o=rX \$(DESTDIR)\$(ARX)/runform
@if [ -d \$(DESTDIR)/etc/profile.d ]; then cp generate/arx.sh \$(DESTDIR)/etc/profile.d; chmod 755 \$(DESTDIR)/etc/profile.d; else true; fi
@if [ "\$(DESTDIR)" ]; then cd \$(DESTDIR)\$(ARX); find .|cpio -o 2>/dev/null|gzip -c >\$(DESTDIR)/formax.cpio.gz; fi
\$(DESTDIR)\$(ARX)/bin:
@for D in bin lib; do mkdir -m755 -p \$(DESTDIR)\$(ARX)/\$\$D; done
generate/adjfield generate/formax.frm:
cd generate; make
runform/runform:
cd runform; make
clean:
./configure clean
EOF
echo 'you can now run "make"' >&2
exit