Skip to content

Commit

Permalink
First step in setting up plugins: set up the build environment to make
Browse files Browse the repository at this point in the history
shared objects.  The only such target at the moment is sub-std.so.
  • Loading branch information
bruceg committed Nov 16, 2006
1 parent fbe7bca commit 5e448ad
Show file tree
Hide file tree
Showing 27 changed files with 52 additions and 45 deletions.
2 changes: 1 addition & 1 deletion conf-cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cc -O2 -g -Wall -Wcast-align -Wwrite-strings -Wunused-parameter -Wsign-compare
cc -O2 -g -fPIC -Wall -Wcast-align -Wwrite-strings -Wunused-parameter -Wsign-compare

This will be used to compile .c files.
2 changes: 1 addition & 1 deletion conf-ld
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cc -s
cc -s -rdynamic

This will be used to link .o files into an executable.
3 changes: 3 additions & 0 deletions conf-ldso
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcc -shared

This will be used to link .o files into a shared object.
2 changes: 1 addition & 1 deletion conf-sub
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
std

Choose a subscription database support. Available supports are:
Choose a default subscription database support. Available supports are:
* std (Default) filesystem
* mysql MySQL database
* pgsql Postgres database
17 changes: 6 additions & 11 deletions default.do
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ case "$1" in
formake 'shar -m `cat FILES` > shar'
formake 'chmod 400 shar'
;;
compile|load|makelib)
compile|load|makelib|makeso)
dependon make-$1 warn-auto.sh systype
formake "( cat warn-auto.sh; ./make-$1 "'"`cat systype`"'" ) > $1"
formake "chmod 755 $1"
;;
make-compile|make-load|make-makelib)
make-compile|make-load|make-makelib|make-makeso)
dependon $1.sh auto-ccld.sh
formake "cat auto-ccld.sh $1.sh > $1"
formake "chmod 755 $1"
Expand All @@ -60,11 +60,12 @@ case "$1" in
formake 'chmod 755 find-systype'
;;
auto-ccld.sh)
dependon conf-cc conf-ld conf-sub warn-auto.sh
dependon conf-cc conf-ld conf-ldso conf-sub warn-auto.sh
formake '( cat warn-auto.sh; \'
formake 'sub=`head -n 1 conf-sub` ; \'
formake 'echo CC=\'\''`head -n 1 conf-cc` `head -n 1 sub_$$sub/conf-sqlcc`\'\''; \'
formake 'echo LD=\'\''`head -n 1 conf-ld`\'\'' \'
formake 'echo CC=\'\''`head -n 1 conf-cc`\'\''; \'
formake 'echo LD=\'\''`head -n 1 conf-ld`\'\''; \'
formake 'echo LDSO=\'\''`head -n 1 conf-ldso`\'\''; \'
formake ') > auto-ccld.sh'
;;
ezmlm-mktab)
Expand All @@ -73,12 +74,6 @@ case "$1" in
formake 'sub=`head -n 1 conf-sub` ; ln sub_$$sub/'$1 $1
formake "touch $1"
;;
checktag.c | issub.c | logmsg.c | subscribe.c | opensub.c | putsubs.c | tagmsg.c | searchlog.c)
dependon conf-sub
formake "rm -f $1 ${1%.c}.o"
formake 'sub=`head -n 1 conf-sub` ; ln sub_$$sub/'$1 $1
formake "touch $1"
;;
lang/*/ezmlmrc)
lang=${1#lang/}
lang=${lang%/ezmlmrc}
Expand Down
27 changes: 27 additions & 0 deletions default.so.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
if test -r "$2=so"
then
libs=""
libscat=""
dashl=""
objs=""
while read line
do
case $line in
*.lib)
libs="$libs $line"
libscat="$libscat "'`'"cat $line"'`'
;;
-l*)
dashl="$dashl $line"
libs="$libs `echo $line | sed -e 's/^-l/lib/' -e 's/$/.a/'`"
;;
*)
objs="$objs $line"
;;
esac
done < "$2=so"
dependon makeso $objs $libs
formake ./makeso $1 $objs $dashl "$libscat"
else
nosuchtarget
fi
1 change: 0 additions & 1 deletion ezmlm-gate=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-get=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-issubn=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-list=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-manage=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-receipt=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-request=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-return=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-send=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-store=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-sub=x
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ezmlm-subunsub.o
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-unsub=x
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ezmlm-subunsub.o
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion ezmlm-warn=x
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-lezmlm
sql.lib
1 change: 0 additions & 1 deletion it.do
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dependon \
symlinks \
ezmlm-accept \
ezmlm-archive \
ezmlm-check \
Expand Down
8 changes: 0 additions & 8 deletions libezmlm=l
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ case_diffs.o
case_lowerb.o
case_startb.o
case_starts.o
checktag.o
concatHDR.o
config.o
constmap.o
Expand Down Expand Up @@ -62,25 +61,20 @@ hdr_listsubject.o
hdr_mime.o
hdr_transferenc.o
idxthread.o
issub.o
lock_ex.o
lock_exnb.o
lockfile.o
log.o
logmsg.o
makehash.o
now.o
open_append.o
open_read.o
open_trunc.o
opensub.o
putsubs.o
qmail.o
qmail_copy.o
quote.o
scan_8long.o
scan_ulong.o
searchlog.o
seek_set.o
sgetopt.o
sig_catch.o
Expand Down Expand Up @@ -120,14 +114,12 @@ subfdin.o
subfdout.o
subgetopt.o
subhash.o
subscribe.o
substdi.o
substdio.o
substdio_copy.o
substdo.o
surf.o
surfpcs.o
tagmsg.o
unfoldHDR.o
wait_pid.o
wrap_chdir.o
Expand Down
4 changes: 3 additions & 1 deletion make-compile.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
echo exec "$CC" -c '${1+"$@"}'
echo 'source=$1; shift'
echo 'base=`echo "$source" | sed -e s:\\\\.c$::`'
echo exec "$CC" '-I. -o "$base".o -c "$source" ${1+"$@"}'
1 change: 1 addition & 0 deletions make-makeso.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo exec "$LDSO" -L. -o '${1+"$@"}'
3 changes: 0 additions & 3 deletions sql.lib.do

This file was deleted.

8 changes: 8 additions & 0 deletions sub-std=so
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sub_std/checktag.o
sub_std/issub.o
sub_std/logmsg.o
sub_std/opensub.o
sub_std/putsubs.o
sub_std/searchlog.o
sub_std/subscribe.o
sub_std/tagmsg.o
5 changes: 0 additions & 5 deletions symlinks.do

This file was deleted.

1 change: 1 addition & 0 deletions targets.do
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dependon it man setup conf-bin conf-man
dependon sub-std.so

0 comments on commit 5e448ad

Please sign in to comment.