summaryrefslogtreecommitdiff
path: root/tools/mergedirs
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-04-12 11:14:54 +0200
committerJan Moskyto Matejka <mq@ucw.cz>2016-05-10 14:07:34 +0200
commit7152e5efbb0fade868d5f2d2c7bc10ed52b3d19d (patch)
treeebb3ff35e34cdf37c0757e0aa6a6e8de30a71278 /tools/mergedirs
parent4bdf1881dc6230b742d7efcaad8eeac4ed25f445 (diff)
Build system reworked to one global Makefile with includes and no nesting
Also removed the lib-dir merging with sysdep. Updated #include's accordingly. Fixed make doc on recent Debian together with moving generated doc into objdir. Moved Makefile.in into root dir Retired all.o and birdlib.a Linking the final binaries directly from all the .o files.
Diffstat (limited to 'tools/mergedirs')
-rwxr-xr-xtools/mergedirs63
1 files changed, 0 insertions, 63 deletions
diff --git a/tools/mergedirs b/tools/mergedirs
deleted file mode 100755
index fb48c6c7..00000000
--- a/tools/mergedirs
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-
-if [ -z "$4" ] ; then
- echo "Usage: mergedirs <src-dir> <src-dir-rel> <obj-dir> <list-of-dirs>"
- exit 1
- fi
-cpp=${CPP:-cc -E}
-SRCDIR=$1
-shift
-SRCREL=$1
-case $SRCDIR in
- /*) ;;
- *) SRCREL="../$SRCREL" ;;
- esac
-shift
-OBJDIR=$1
-LIBDIR=$OBJDIR/lib
-CONFDIR=$OBJDIR/conf
-shift
-
-echo "Merging system-dependent modules ($@)"
-MODULES=`for a in $@ ; do
- cat $SRCDIR/sysdep/config.h $SRCDIR/$a/Modules |
- $cpp -U unix -D MACROS_ONLY -I $OBJDIR - |
- sed "/^[ ]*\$/d;/^#/d;s@\\(.*\\)@\\1 $a/\\1@"
- done |
- sort -k1,1 -u |
- cut -d ' ' -f 2`
-rm -rf $LIBDIR $CONFDIR
-mkdir -p $LIBDIR $CONFDIR
-for a in $MODULES ; do
- b=`basename $a`
- case $b in
- *.h) ln -s $SRCREL/$a $LIBDIR/$b
- ;;
- *.c) OBJ=`echo $b | sed 's/\.c$/\.o/'`
- OBJS="$OBJS $OBJ"
- SRCS="$SRCS \\
- $b"
- ln -s $SRCREL/$a $LIBDIR/$b
- ;;
- *.Y) CONFS="$CONFS\$(srcdir)/$a "
- ln -s $SRCREL/$a $CONFDIR/$b
- ;;
- *) echo "$b: Unknown file type"
- exit 1
- ;;
- esac
- done
-
-cat >$LIBDIR/Makefile <<EOF
-source=$SRCS
-lib-dest=birdlib.a
-root-rel=../
-
-include ../Rules
-EOF
-
-sed <$SRCDIR/conf/Makefile >$CONFDIR/Makefile "s|@CONFS@|$CONFS|"
-CONFS=`cd $SRCDIR ; ls conf/*.[chl]`
-for a in $CONFS ; do
- ln -s $SRCREL/$a $CONFDIR/
-done