Revision 7152e5ef
Doc | ||
---|---|---|
1 |
D doc/prog-head.sgml |
|
1 | 2 |
C doc |
2 | 3 |
C nest |
3 | 4 |
C conf |
... | ... | |
5 | 6 |
C proto |
6 | 7 |
C sysdep |
7 | 8 |
C lib |
9 |
D doc/prog-foot.sgml |
Makefile.in | ||
---|---|---|
1 |
# Makefile for the BIRD Internet Routing Daemon |
|
2 |
# (c) 1999--2000 Martin Mares <mj@ucw.cz> |
|
3 |
# (c) 2016 Jan Moskyto Matejka <mq@ucw.cz> |
|
4 |
|
|
5 |
# Disable build-in rules |
|
6 |
MAKEFLAGS += -r |
|
7 |
|
|
8 |
# Variable definitions |
|
9 |
CPPFLAGS=-I$(objdir) -I$(srcdir) @CPPFLAGS@ |
|
10 |
CFLAGS=$(CPPFLAGS) @CFLAGS@ |
|
11 |
LDFLAGS=@LDFLAGS@ |
|
12 |
LIBS=@LIBS@ |
|
13 |
CLIENT_LIBS=@CLIENT_LIBS@ |
|
14 |
CC=@CC@ |
|
15 |
M4=@M4@ |
|
16 |
BISON=@BISON@ |
|
17 |
FLEX=@FLEX@ |
|
18 |
RANLIB=@RANLIB@ |
|
19 |
INSTALL=@INSTALL@ |
|
20 |
INSTALL_PROGRAM=@INSTALL_PROGRAM@ |
|
21 |
INSTALL_DATA=@INSTALL_DATA@ |
|
22 |
|
|
23 |
client=$(addprefix $(exedir)/,@CLIENT@) |
|
24 |
daemon=$(exedir)/bird |
|
25 |
protocols = @protocols@ |
|
26 |
|
|
27 |
prefix=@prefix@ |
|
28 |
exec_prefix=@exec_prefix@ |
|
29 |
bindir=@bindir@ |
|
30 |
sbindir=@sbindir@ |
|
31 |
sysconfdir=@sysconfdir@ |
|
32 |
localstatedir=@localstatedir@ |
|
33 |
docdir=@prefix@/doc |
|
34 |
|
|
35 |
srcdir := @srcdir@ |
|
36 |
objdir := @objdir@ |
|
37 |
exedir := @exedir@ |
|
38 |
|
|
39 |
ifeq ($(objdir),.) |
|
40 |
objdir := $(realpath .) |
|
41 |
endif |
|
42 |
|
|
43 |
ifeq ($(VERBOSE),) |
|
44 |
Q:=@ |
|
45 |
else |
|
46 |
Q:= |
|
47 |
endif |
|
48 |
|
|
49 |
# Meta rules |
|
50 |
cleangoals := clean distclean |
|
51 |
docgoals := docs userdocs progdocs |
|
52 |
.PHONY: all daemon cli $(cleangoals) $(docgoals) tags |
|
53 |
all: daemon cli |
|
54 |
|
|
55 |
daemon: $(daemon) |
|
56 |
cli: $(client) |
|
57 |
|
|
58 |
# Include directories |
|
59 |
dirs := client conf doc filter lib nest $(addprefix proto/,$(protocols)) @sysdep_dirs@ |
|
60 |
|
|
61 |
conf-y-targets := $(addprefix $(objdir)/conf/,cf-parse.y keywords.h commands.h) |
|
62 |
cf-local = $(conf-y-targets): $(s)config.Y |
|
63 |
|
|
64 |
src-o-files = $(patsubst %.c,$(o)%.o,$(src)) |
|
65 |
|
|
66 |
all-daemon = $(exedir)/bird: $(obj) |
|
67 |
all-client = $(exedir)/birdc $(exedir)/birdcl: $(obj) |
|
68 |
|
|
69 |
s = $(dir $(lastword $(MAKEFILE_LIST))) |
|
70 |
ifeq ($(srcdir),.) |
|
71 |
o = $(objdir)/$(s) |
|
72 |
else |
|
73 |
o = $(patsubst $(srcdir)%,$(objdir)%,$(s)) |
|
74 |
endif |
|
75 |
|
|
76 |
define clean_in = |
|
77 |
clean:: |
|
78 |
rm -f $(addprefix $(o),$(1)) |
|
79 |
endef |
|
80 |
|
|
81 |
clean = $(eval $(call clean_in,$(1))) |
|
82 |
|
|
83 |
include $(addsuffix /Makefile,$(addprefix $(srcdir)/,$(dirs))) |
|
84 |
|
|
85 |
# Generic rules |
|
86 |
|
|
87 |
$(objdir)/%.o: $(srcdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h |
|
88 |
$(Q)echo CC -o $@ -c $< |
|
89 |
$(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $< |
|
90 |
|
|
91 |
$(objdir)/%.o: $(objdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h |
|
92 |
$(Q)echo CC -o $@ -c $< |
|
93 |
$(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $< |
|
94 |
|
|
95 |
$(objdir)/.dir-stamp: |
|
96 |
$(Q)echo MKDIR -p $(addprefix $(objdir)/,$(dirs) doc) |
|
97 |
$(Q)mkdir -p $(addprefix $(objdir)/,$(dirs) doc) |
|
98 |
$(Q)touch $@ |
|
99 |
|
|
100 |
$(client) $(daemon): |
|
101 |
$(Q)echo LD $(LDFLAGS) -o $@ $^ $(LIBS) |
|
102 |
$(Q)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
|
103 |
|
|
104 |
$(objdir)/sysdep/paths.h: Makefile |
|
105 |
echo >$@ "/* Generated by Makefile, don't edit manually! */" |
|
106 |
echo >>$@ "#define PATH_CONFIG_FILE \"@CONFIG_FILE@\"" |
|
107 |
echo >>$@ "#define PATH_CONTROL_SOCKET \"@CONTROL_SOCKET@\"" |
|
108 |
if test -n "@iproutedir@" ; then echo >>$@ "#define PATH_IPROUTE_DIR \"@iproutedir@\"" ; fi |
|
109 |
|
|
110 |
# Finally include the computed dependencies |
|
111 |
|
|
112 |
ifneq ($(filter-out $(cleangoals),$(MAKECMDGOALS)),) |
|
113 |
-include $(shell find $(objdir) -name "*.d") |
|
114 |
endif |
|
115 |
|
|
116 |
ifeq ($(MAKECMDGOALS),) |
|
117 |
-include $(shell find $(objdir) -name "*.d") |
|
118 |
endif |
|
119 |
|
|
120 |
tags: |
|
121 |
cd $(srcdir) ; etags -lc `find $(dirs) -name *.[chY]` |
|
122 |
|
|
123 |
# Install |
|
124 |
|
|
125 |
install: all |
|
126 |
$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@ |
|
127 |
$(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/bird |
|
128 |
$(INSTALL_PROGRAM) $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl |
|
129 |
if test -n "@CLIENT@" ; then \ |
|
130 |
$(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc ; \ |
|
131 |
fi |
|
132 |
if ! test -f $(DESTDIR)/@CONFIG_FILE@ ; then \ |
|
133 |
$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/@CONFIG_FILE@ ; \ |
|
134 |
else \ |
|
135 |
echo "Not overwriting old bird.conf" ; \ |
|
136 |
fi |
|
137 |
|
|
138 |
install-docs: |
|
139 |
$(INSTALL) -d $(DESTDIR)/$(docdir) |
|
140 |
$(INSTALL_DATA) $(objdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/ |
|
141 |
|
|
142 |
# Cleanup |
|
143 |
clean:: |
|
144 |
rm -f $(objdir)/sysdep/paths.h |
|
145 |
rm -f $(addprefix $(exedir)/,bird birdc birdcl) |
|
146 |
find $(objdir) -name "*.[od]" -exec rm -f '{}' '+' |
|
147 |
|
|
148 |
ifeq ($(objdir),obj) |
|
149 |
distclean: clean |
|
150 |
rm -rf $(objdir) |
|
151 |
rm -f config.log config.status configure Makefile |
|
152 |
else |
|
153 |
distclean: clean |
|
154 |
rm -rf * .dir-stamp |
|
155 |
rm -f config.log config.status configure Makefile |
|
156 |
endif |
client/Makefile | ||
---|---|---|
1 |
source=commands.c util.c client.c |
|
2 |
root-rel=../ |
|
3 |
dir-name=client |
|
1 |
src := commands.c util.c client.c |
|
2 |
obj := $(src-o-files) |
|
4 | 3 |
|
5 |
clients := $(client) birdcl
|
|
4 |
$(all-client)
|
|
6 | 5 |
|
7 |
source-dep := $(source) $(addsuffix .c,$(clients))
|
|
6 |
$(o)commands.c.dep: $(objdir)/conf/commands.h
|
|
8 | 7 |
|
9 |
subdir: $(addsuffix .o,$(clients)) |
|
8 |
$(exedir)/birdc: $(o)birdc.o |
|
9 |
$(exedir)/birdc: LIBS += $(CLIENT_LIBS) |
|
10 | 10 |
|
11 |
include ../Rules |
|
11 |
$(exedir)/birdcl: $(o)birdcl.o |
conf/Makefile | ||
---|---|---|
1 |
source=cf-parse.tab.c cf-lex.c conf.c
|
|
2 |
root-rel=../
|
|
1 |
src := cf-parse.tab.c cf-lex.c conf.c
|
|
2 |
obj := $(src-o-files)
|
|
3 | 3 |
|
4 |
include ../Rules |
|
5 |
|
|
6 |
conf-src=$(srcdir)/conf |
|
7 |
conf-fragments=$(conf-src)/confbase.Y @CONFS@ $(addsuffix /config.Y,$(static-dir-paths)) |
|
4 |
$(all-daemon) |
|
8 | 5 |
|
9 | 6 |
ifdef DEBUG |
10 | 7 |
BISON_DEBUG=-t |
11 | 8 |
#FLEX_DEBUG=-d |
12 | 9 |
endif |
13 | 10 |
|
14 |
cf-parse.tab.h: cf-parse.tab.c
|
|
11 |
$(o)cf-parse.tab.h: $(o)cf-parse.tab.c
|
|
15 | 12 |
|
16 |
cf-parse.tab.c: cf-parse.y |
|
17 |
$(BISON) -bcf-parse -dv -pcf_ $(BISON_DEBUG) cf-parse.y |
|
13 |
$(o)cf-parse.tab.c: $(o)cf-parse.y |
|
14 |
echo $< $@ $(o) |
|
15 |
$(BISON) -b$(@:.tab.c=) -dv -pcf_ $(BISON_DEBUG) $< |
|
18 | 16 |
|
19 |
cf-parse.y: $(conf-fragments) $(conf-src)/gen_parser.m4
|
|
20 |
$(M4) -P $(conf-src)/gen_parser.m4 $(conf-fragments) >cf-parse.y
|
|
17 |
$(conf-y-targets): $(s)confbase.Y
|
|
18 |
$(M4) -P $| $^ >$@
|
|
21 | 19 |
|
22 |
keywords.h: $(conf-fragments) $(conf-src)/gen_keywords.m4 |
|
23 |
$(M4) -P $(conf-src)/gen_keywords.m4 $(conf-fragments) >keywords.h |
|
20 |
$(o)cf-parse.y: | $(s)gen_parser.m4 |
|
21 |
$(o)keywords.h: | $(s)gen_keywords.m4 |
|
22 |
$(o)commands.h: | $(s)gen_commands.m4 $(srcdir)/client/cmds.m4 |
|
24 | 23 |
|
25 |
commands.h: $(conf-fragments) $(conf-src)/gen_commands.m4 $(srcdir)/client/cmds.m4
|
|
26 |
$(M4) -P $(conf-src)/gen_commands.m4 $(srcdir)/client/cmds.m4 $(conf-fragments) | sort >commands.h
|
|
24 |
$(o)cf-lex.c: $(s)cf-lex.l $(o)cf-parse.tab.h $(o)keywords.h $(o)commands.h
|
|
25 |
$(FLEX) $(FLEX_DEBUG) -s -B -8 -o$@ -Pcf_ $<
|
|
27 | 26 |
|
28 |
cf-lex.c: cf-lex.l |
|
29 |
$(FLEX) $(FLEX_DEBUG) -s -B -8 -ocf-lex.c -Pcf_ cf-lex.l |
|
27 |
$(addprefix $(o),cf-parse.tab.h cf-parse.tab.c cf-parse.y keywords.h commands.h cf-lex.c): $(objdir)/.dir-stamp |
|
30 | 28 |
|
31 |
depend: keywords.h commands.h cf-parse.tab.c cf-lex.c |
|
29 |
$(call clean,cf-parse.tab.h cf-parse.tab.c cf-parse.y keywords.h commands.h cf-lex.c cf-parse.output) |
conf/conf.c | ||
---|---|---|
52 | 52 |
#include "lib/resource.h" |
53 | 53 |
#include "lib/string.h" |
54 | 54 |
#include "lib/event.h" |
55 |
#include "lib/timer.h"
|
|
55 |
#include "sysdep/unix/timer.h"
|
|
56 | 56 |
#include "conf/conf.h" |
57 | 57 |
#include "filter/filter.h" |
58 | 58 |
|
conf/conf.h | ||
---|---|---|
10 | 10 |
#define _BIRD_CONF_H_ |
11 | 11 |
|
12 | 12 |
#include "lib/resource.h" |
13 |
#include "lib/timer.h"
|
|
13 |
#include "sysdep/unix/timer.h"
|
|
14 | 14 |
|
15 | 15 |
|
16 | 16 |
/* Configuration structure */ |
conf/confbase.Y | ||
---|---|---|
14 | 14 |
#include "conf/conf.h" |
15 | 15 |
#include "lib/resource.h" |
16 | 16 |
#include "lib/socket.h" |
17 |
#include "lib/timer.h"
|
|
17 |
#include "sysdep/unix/timer.h"
|
|
18 | 18 |
#include "lib/string.h" |
19 | 19 |
#include "nest/protocol.h" |
20 | 20 |
#include "nest/iface.h" |
configure.in | ||
---|---|---|
23 | 23 |
if test "$srcdir" = . ; then |
24 | 24 |
# Building in current directory => create obj directory holding all objects |
25 | 25 |
objdir=obj |
26 |
mkdir -p obj |
|
27 |
srcdir_rel=.. |
|
28 |
makefiles="Makefile:tools/Makefile-top.in obj/Makefile:tools/Makefile.in obj/Rules:tools/Rules.in" |
|
29 |
exedir=.. |
|
30 | 26 |
else |
31 | 27 |
# Building in separate directory |
32 | 28 |
objdir=. |
33 |
srcdir_rel=$srcdir |
|
34 |
makefiles="Makefile:tools/Makefile.in Rules:tools/Rules.in" |
|
35 |
exedir=. |
|
36 | 29 |
fi |
37 |
case $srcdir_rel in |
|
38 |
/*) srcdir_rel_mf=$srcdir_rel ;; |
|
39 |
*) srcdir_rel_mf="\$(root-rel)$srcdir_rel" ;; |
|
40 |
esac |
|
30 |
|
|
31 |
exedir=. |
|
32 |
|
|
41 | 33 |
AC_SUBST(objdir) |
42 | 34 |
AC_SUBST(exedir) |
43 |
AC_SUBST(srcdir_rel_mf)
|
|
35 |
AC_SUBST(srcdir) |
|
44 | 36 |
AC_SUBST(runtimedir) |
45 | 37 |
|
46 | 38 |
|
... | ... | |
162 | 154 |
AC_DEFINE_UNQUOTED(SYSCONF_INCLUDE, "$sysdesc") |
163 | 155 |
|
164 | 156 |
AC_MSG_CHECKING([system-dependent directories]) |
165 |
sysdep_dirs="`sed <$sysdesc '/^Link: /!d;s/^Link: \(.*\)$/\1/' | tr '\012' ' '` lib"
|
|
157 |
sysdep_dirs="`sed <$sysdesc '/^Link: /!d;s/^Link: \(.*\)$/\1/' | tr '\012' ' '`" |
|
166 | 158 |
AC_MSG_RESULT($sysdep_dirs) |
167 | 159 |
AC_SUBST(sysdep_dirs) |
168 | 160 |
|
... | ... | |
234 | 226 |
fi |
235 | 227 |
fi |
236 | 228 |
|
237 |
CLIENT= |
|
229 |
CLIENT=birdcl
|
|
238 | 230 |
CLIENT_LIBS= |
239 | 231 |
if test "$enable_client" = yes ; then |
240 |
CLIENT=birdc
|
|
232 |
CLIENT="$CLIENT birdc"
|
|
241 | 233 |
AC_CHECK_LIB(history, add_history, CLIENT_LIBS="-lhistory") |
242 | 234 |
AC_CHECK_LIB(ncurses, tgetent, USE_TERMCAP_LIB=-lncurses, |
243 | 235 |
AC_CHECK_LIB(curses, tgetent, USE_TERMCAP_LIB=-lcurses, |
... | ... | |
255 | 247 |
|
256 | 248 |
mkdir -p $objdir/sysdep |
257 | 249 |
AC_CONFIG_HEADERS([$objdir/sysdep/autoconf.h:sysdep/autoconf.h.in]) |
258 |
AC_CONFIG_COMMANDS([merge],[[export CPP="$CPP" |
|
259 |
$srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs]], |
|
260 |
[[srcdir=$srcdir] |
|
261 |
[srcdir_rel=$srcdir_rel] |
|
262 |
[objdir=$objdir] |
|
263 |
[sysdep_dirs="$sysdep_dirs"]]) |
|
264 |
AC_CONFIG_FILES($makefiles) |
|
250 |
AC_CONFIG_FILES(Makefile:Makefile.in) |
|
265 | 251 |
AC_OUTPUT |
266 | 252 |
|
267 |
rm -f $objdir/sysdep/paths.h |
|
268 |
|
|
269 | 253 |
cat >&AC_FD_MSG <<EOF |
270 | 254 |
|
271 | 255 |
BIRD was configured with the following options: |
doc/LinuxDocTools.pm | ||
---|---|---|
372 | 372 |
} |
373 | 373 |
} |
374 | 374 |
# |
375 |
|
|
376 |
local $ENV{PATH} = "$ENV{PATH}:/usr/lib/linuxdoc-tools"; |
|
375 | 377 |
my($precmd) = "|sgmlpre output=$global->{format} $global->{define}"; |
376 | 378 |
|
377 | 379 |
# |
doc/Makefile | ||
---|---|---|
1 |
root-rel=../ |
|
2 |
dir-name=doc |
|
3 |
|
|
4 |
ifneq ($(wildcard ../Rules),) |
|
5 |
include ../Rules |
|
6 |
else |
|
7 |
srcdir=$(shell cd $(root-rel) ; pwd) |
|
8 |
srcdir_abs=$(srcdir) |
|
9 |
endif |
|
10 |
|
|
11 | 1 |
# Force rebuilds |
12 |
.PHONY: prog.sgml bird.sgml |
|
2 |
.PHONY: progspell docs progdocs userdocs |
|
3 |
|
|
4 |
doc-srcdir := $(shell cd $(s) && pwd) |
|
5 |
sgml2 := $(doc-srcdir)/sgml2 |
|
13 | 6 |
|
14 | 7 |
docs: progdocs userdocs |
15 |
progdocs: prog.html prog.ps |
|
16 |
userdocs: bird.html bird.ps |
|
17 | 8 |
|
18 |
prog.sgml: |
|
19 |
$(srcdir)/tools/progdoc $(srcdir_abs) |
|
9 |
doc-fmt = $(1): $(o)prog.$(1) $(o)bird.$(1) |
|
10 |
$(call doc-fmt,html) |
|
11 |
$(call doc-fmt,dvi) |
|
12 |
$(call doc-fmt,ps) |
|
13 |
$(call doc-fmt,pdf) |
|
14 |
|
|
15 |
progdocs: $(o)prog.html $(o)prog.pdf |
|
16 |
userdocs: $(o)bird.html $(o)bird.pdf |
|
17 |
progspell: $(o)prog.spell |
|
18 |
|
|
19 |
$(o)prog.sgml: $(srcdir)/tools/progdoc $(objdir)/.dir-stamp |
|
20 |
$(srcdir)/tools/progdoc $(srcdir) $@ |
|
21 |
|
|
22 |
$(o)%.sgml: $(s)%.sgml $(objdir)/.dir-stamp |
|
23 |
cp $< $@ |
|
20 | 24 |
|
21 |
%.html: %.sgml
|
|
22 |
./sgml2html $<
|
|
25 |
$(o)%.html: $(o)%.sgml
|
|
26 |
cd $(dir $@) && $(sgml2)html $(notdir $<)
|
|
23 | 27 |
|
24 |
%.dvi: %.tex
|
|
25 |
latex $<
|
|
26 |
latex $<
|
|
28 |
$(o)%.dvi: $(o)%.tex
|
|
29 |
cd $(dir $@) && TEXINPUTS=$(TEXINPUTS):$(doc-srcdir)/tex latex $(notdir $<)
|
|
30 |
cd $(dir $@) && TEXINPUTS=$(TEXINPUTS):$(doc-srcdir)/tex latex $(notdir $<)
|
|
27 | 31 |
|
28 |
%.ps: %.dvi
|
|
32 |
$(o)%.ps: $(o)%.dvi
|
|
29 | 33 |
dvips -D600 -ta4 -o $@ $< |
30 | 34 |
|
31 |
%.tex: %.sgml
|
|
32 |
./sgml2latex --output=tex $<
|
|
35 |
$(o)%.pdf: $(o)%.ps
|
|
36 |
ps2pdf $< $@
|
|
33 | 37 |
|
34 |
%.txt: %.sgml
|
|
35 |
./sgml2txt $<
|
|
38 |
$(o)%.tex: $(o)%.sgml
|
|
39 |
cd $(dir $@) && $(sgml2)latex --output=tex $(notdir $<)
|
|
36 | 40 |
|
37 |
progspell: prog.sgml |
|
38 |
sed -f prog-spell.sed <prog.sgml >prog.spell |
|
39 |
ispell prog.spell |
|
41 |
$(o)%.txt: $(o)%.sgml |
|
42 |
cd $(dir $@) && $(sgml2)txt $(notdir $<) |
|
40 | 43 |
|
41 |
clean:
|
|
42 |
rm -f *.tex *.dvi *.log *.txt *.aux *.toc *.spell
|
|
43 |
rm -f prog.sgml
|
|
44 |
$(o)prog.spell: $(o)prog.sgml $(s)prog-spell.sed
|
|
45 |
sed -f $(lastword $^) <$< >$@
|
|
46 |
ispell $@
|
|
44 | 47 |
|
45 |
distclean: clean |
|
46 |
rm -f *.html *.ps |
|
48 |
$(call clean,prog.spell $(addprefix *.,html dvi ps pdf sgml tex txt aux log toc)) |
doc/sgml2html | ||
---|---|---|
17 | 17 |
|
18 | 18 |
use vars qw($prefix $DataDir $BinDir $progs); |
19 | 19 |
|
20 |
use FindBin; |
|
21 |
|
|
20 | 22 |
$prefix = "/usr"; |
21 |
$DataDir = "sbase"; |
|
23 |
$DataDir = "$FindBin::Bin/sbase";
|
|
22 | 24 |
$BinDir = "/usr/bin"; |
23 | 25 |
|
24 | 26 |
use lib "/usr/share/linuxdoc-tools"; |
... | ... | |
32 | 34 |
"GROFFMACRO" => "-ms", |
33 | 35 |
"AWK" => "/usr/share/linuxdoc-tools/awkwhich" |
34 | 36 |
}; |
35 |
$ENV{"SGML_CATALOG_FILES"} = "sbase/dtd/catalog";
|
|
37 |
$ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog";
|
|
36 | 38 |
|
37 |
require "./LinuxDocTools.pm";
|
|
39 |
require "$FindBin::Bin/LinuxDocTools.pm";
|
|
38 | 40 |
&LinuxDocTools::init; |
39 | 41 |
|
40 | 42 |
my @FileList = LinuxDocTools::process_options ("html", @ARGV); |
doc/sgml2latex | ||
---|---|---|
17 | 17 |
|
18 | 18 |
use vars qw($prefix $DataDir $BinDir $progs); |
19 | 19 |
|
20 |
use FindBin; |
|
21 |
|
|
20 | 22 |
$prefix = "/usr"; |
21 |
$DataDir = "sbase"; |
|
23 |
$DataDir = "$FindBin::Bin/sbase";
|
|
22 | 24 |
$BinDir = "/usr/bin"; |
23 | 25 |
|
24 | 26 |
use lib "/usr/share/linuxdoc-tools"; |
... | ... | |
32 | 34 |
"GROFFMACRO" => "-ms", |
33 | 35 |
"AWK" => "/usr/share/linuxdoc-tools/awkwhich" |
34 | 36 |
}; |
35 |
$ENV{"SGML_CATALOG_FILES"} = "sbase/dtd/catalog";
|
|
37 |
$ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog";
|
|
36 | 38 |
|
37 |
require "./LinuxDocTools.pm";
|
|
39 |
require "$FindBin::Bin/LinuxDocTools.pm";
|
|
38 | 40 |
&LinuxDocTools::init; |
39 | 41 |
|
40 | 42 |
my @FileList = LinuxDocTools::process_options ("latex", @ARGV); |
doc/sgml2txt | ||
---|---|---|
17 | 17 |
|
18 | 18 |
use vars qw($prefix $DataDir $BinDir $progs); |
19 | 19 |
|
20 |
use FindBin; |
|
21 |
|
|
20 | 22 |
$prefix = "/usr"; |
21 |
$DataDir = "sbase"; |
|
23 |
$DataDir = "$FindBin::Bin/sbase";
|
|
22 | 24 |
$BinDir = "/usr/bin"; |
23 | 25 |
|
24 | 26 |
use lib "/usr/share/linuxdoc-tools"; |
... | ... | |
32 | 34 |
"GROFFMACRO" => "-ms", |
33 | 35 |
"AWK" => "/usr/share/linuxdoc-tools/awkwhich" |
34 | 36 |
}; |
35 |
$ENV{"SGML_CATALOG_FILES"} = "sbase/dtd/catalog";
|
|
37 |
$ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog";
|
|
36 | 38 |
|
37 |
require "./LinuxDocTools.pm";
|
|
39 |
require "$FindBin::Bin/LinuxDocTools.pm";
|
|
38 | 40 |
&LinuxDocTools::init; |
39 | 41 |
|
40 | 42 |
my @FileList = LinuxDocTools::process_options ("txt", @ARGV); |
filter/Makefile | ||
---|---|---|
1 |
source=f-util.c filter.c tree.c trie.c |
|
2 |
root-rel=../ |
|
3 |
dir-name=filter |
|
4 |
|
|
5 |
include ../Rules |
|
1 |
src := filter.c f-util.c tree.c trie.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
lib/Doc | ||
---|---|---|
1 | 1 |
H Library functions |
2 |
S ip.c ipv4.c ipv6.c
|
|
2 |
S ip.c |
|
3 | 3 |
S lists.c |
4 | 4 |
S checksum.c bitops.c patmatch.c printf.c xmalloc.c tbf.c |
5 | 5 |
D resource.sgml |
lib/Makefile | ||
---|---|---|
1 |
src := bitops.c checksum.c ip.c lists.c md5.c net.c patmatch.c printf.c sha1.c sha256.c sha512.c slists.c xmalloc.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-client) |
|
4 |
|
|
5 |
src := bitops.c checksum.c event.c idm.c ip.c lists.c md5.c mempool.c net.c patmatch.c printf.c resource.c sha1.c sha256.c sha512.c slab.c slists.c tbf.c xmalloc.c |
|
6 |
obj := $(src-o-files) |
|
7 |
$(all-daemon) |
lib/Modules | ||
---|---|---|
1 |
sha256.c |
|
2 |
sha256.h |
|
3 |
sha512.c |
|
4 |
sha512.h |
|
5 |
sha1.c |
|
6 |
sha1.h |
|
7 |
birdlib.h |
|
8 |
bitops.c |
|
9 |
bitops.h |
|
10 |
idm.c |
|
11 |
idm.h |
|
12 |
ip.c |
|
13 |
ip.h |
|
14 |
lists.c |
|
15 |
lists.h |
|
16 |
md5.c |
|
17 |
md5.h |
|
18 |
mempool.c |
|
19 |
resource.c |
|
20 |
resource.h |
|
21 |
slab.c |
|
22 |
socket.h |
|
23 |
tbf.c |
|
24 |
unaligned.h |
|
25 |
xmalloc.c |
|
26 |
printf.c |
|
27 |
string.h |
|
28 |
patmatch.c |
|
29 |
slists.c |
|
30 |
slists.h |
|
31 |
event.c |
|
32 |
event.h |
|
33 |
checksum.c |
|
34 |
checksum.h |
|
35 |
alloca.h |
|
36 |
net.c |
lib/birdlib.h | ||
---|---|---|
9 | 9 |
#ifndef _BIRD_BIRDLIB_H_ |
10 | 10 |
#define _BIRD_BIRDLIB_H_ |
11 | 11 |
|
12 |
#include "timer.h" |
|
13 |
#include "alloca.h" |
|
12 |
#include "sysdep/unix/timer.h"
|
|
13 |
#include "lib/alloca.h"
|
|
14 | 14 |
|
15 | 15 |
/* Ugly structure offset handling macros */ |
16 | 16 |
|
lib/ip.h | ||
---|---|---|
9 | 9 |
#ifndef _BIRD_IP_H_ |
10 | 10 |
#define _BIRD_IP_H_ |
11 | 11 |
|
12 |
#include "lib/endian.h"
|
|
12 |
#include "sysdep/unix/endian.h"
|
|
13 | 13 |
#include "lib/string.h" |
14 | 14 |
#include "lib/bitops.h" |
15 | 15 |
#include "lib/unaligned.h" |
lib/unaligned.h | ||
---|---|---|
17 | 17 |
* if possible. |
18 | 18 |
*/ |
19 | 19 |
|
20 |
#include "lib/endian.h"
|
|
20 |
#include "sysdep/unix/endian.h"
|
|
21 | 21 |
#include "lib/string.h" |
22 | 22 |
|
23 | 23 |
static inline u16 |
nest/Makefile | ||
---|---|---|
1 |
source=rt-table.c rt-fib.c rt-attr.c proto.c iface.c rt-dev.c password.c cli.c locks.c cmds.c neighbor.c \ |
|
2 |
a-path.c a-set.c |
|
3 |
root-rel=../ |
|
4 |
dir-name=nest |
|
5 |
|
|
6 |
include ../Rules |
|
1 |
src := a-path.c a-set.c cli.c cmds.c iface.c locks.c neighbor.c password.c proto.c rt-attr.c rt-dev.c rt-fib.c rt-table.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
nest/password.h | ||
---|---|---|
9 | 9 |
|
10 | 10 |
#ifndef PASSWORD_H |
11 | 11 |
#define PASSWORD_H |
12 |
#include "lib/timer.h"
|
|
12 |
#include "sysdep/unix/timer.h"
|
|
13 | 13 |
|
14 | 14 |
struct password_item { |
15 | 15 |
node n; |
nest/protocol.h | ||
---|---|---|
12 | 12 |
#include "lib/lists.h" |
13 | 13 |
#include "lib/resource.h" |
14 | 14 |
#include "lib/event.h" |
15 |
#include "lib/timer.h"
|
|
15 |
#include "sysdep/unix/timer.h"
|
|
16 | 16 |
#include "nest/route.h" |
17 | 17 |
#include "conf/conf.h" |
18 | 18 |
|
nest/route.h | ||
---|---|---|
11 | 11 |
|
12 | 12 |
#include "lib/lists.h" |
13 | 13 |
#include "lib/resource.h" |
14 |
#include "lib/timer.h"
|
|
14 |
#include "sysdep/unix/timer.h"
|
|
15 | 15 |
//#include "nest/protocol.h" |
16 | 16 |
|
17 | 17 |
struct ea_list; |
proto/bfd/Makefile | ||
---|---|---|
1 |
source=bfd.c packets.c io.c |
|
2 |
root-rel=../../ |
|
3 |
dir-name=proto/bfd |
|
4 |
|
|
5 |
include ../../Rules |
|
1 |
src := bfd.c io.c packets.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
proto/bfd/io.h | ||
---|---|---|
12 | 12 |
#include "lib/resource.h" |
13 | 13 |
#include "lib/event.h" |
14 | 14 |
#include "lib/socket.h" |
15 |
// #include "lib/timer.h"
|
|
15 |
// #include "sysdep/unix/timer.h"
|
|
16 | 16 |
|
17 | 17 |
|
18 | 18 |
typedef struct timer2 |
proto/bgp/Makefile | ||
---|---|---|
1 |
source=bgp.c attrs.c packets.c |
|
2 |
root-rel=../../ |
|
3 |
dir-name=proto/bgp |
|
4 |
|
|
5 |
include ../../Rules |
|
1 |
src := attrs.c bgp.c packets.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
proto/ospf/Makefile | ||
---|---|---|
1 |
source=ospf.c topology.c packet.c hello.c neighbor.c iface.c dbdes.c lsreq.c lsupd.c lsack.c lsalib.c rt.c |
|
2 |
root-rel=../../ |
|
3 |
dir-name=proto/ospf |
|
4 |
|
|
5 |
include ../../Rules |
|
1 |
src := dbdes.c hello.c iface.c lsack.c lsalib.c lsreq.c lsupd.c neighbor.c ospf.c packet.c rt.c topology.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
proto/ospf/ospf.h | ||
---|---|---|
18 | 18 |
#include "lib/lists.h" |
19 | 19 |
#include "lib/slists.h" |
20 | 20 |
#include "lib/socket.h" |
21 |
#include "lib/timer.h"
|
|
21 |
#include "sysdep/unix/timer.h"
|
|
22 | 22 |
#include "lib/resource.h" |
23 | 23 |
#include "nest/protocol.h" |
24 | 24 |
#include "nest/iface.h" |
proto/pipe/Makefile | ||
---|---|---|
1 |
source=pipe.c |
|
2 |
root-rel=../../ |
|
3 |
dir-name=proto/pipe |
|
4 |
|
|
5 |
include ../../Rules |
|
6 |
|
|
1 |
src := pipe.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
proto/radv/Makefile | ||
---|---|---|
1 |
source=radv.c packets.c |
|
2 |
root-rel=../../ |
|
3 |
dir-name=proto/radv |
|
4 |
|
|
5 |
include ../../Rules |
|
1 |
src := packets.c radv.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
proto/radv/radv.h | ||
---|---|---|
13 | 13 |
#include "lib/ip.h" |
14 | 14 |
#include "lib/lists.h" |
15 | 15 |
#include "lib/socket.h" |
16 |
#include "lib/timer.h"
|
|
16 |
#include "sysdep/unix/timer.h"
|
|
17 | 17 |
#include "lib/resource.h" |
18 | 18 |
#include "nest/protocol.h" |
19 | 19 |
#include "nest/iface.h" |
proto/rip/Makefile | ||
---|---|---|
1 |
source=rip.c packets.c |
|
2 |
root-rel=../../ |
|
3 |
dir-name=proto/rip |
|
4 |
|
|
5 |
include ../../Rules |
|
1 |
src := packets.c rip.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
proto/rip/rip.h | ||
---|---|---|
24 | 24 |
#include "lib/resource.h" |
25 | 25 |
#include "lib/socket.h" |
26 | 26 |
#include "lib/string.h" |
27 |
#include "lib/timer.h"
|
|
27 |
#include "sysdep/unix/timer.h"
|
|
28 | 28 |
|
29 | 29 |
|
30 | 30 |
#define RIP_V1 1 |
proto/static/Makefile | ||
---|---|---|
1 |
source=static.c |
|
2 |
root-rel=../../ |
|
3 |
dir-name=proto/static |
|
4 |
|
|
5 |
include ../../Rules |
|
6 |
|
|
1 |
src := static.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
sysdep/bsd/Makefile | ||
---|---|---|
1 |
src := krt-sock.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(conf-y-targets): $(s)krt-sock.Y |
|
5 |
|
sysdep/bsd/Modules | ||
---|---|---|
1 |
krt-sock.c |
|
2 |
krt-sock.Y |
|
3 |
krt-sys.h |
|
4 |
sysio.h |
sysdep/bsd/krt-sock.c | ||
---|---|---|
28 | 28 |
#include "nest/route.h" |
29 | 29 |
#include "nest/protocol.h" |
30 | 30 |
#include "nest/iface.h" |
31 |
#include "lib/timer.h"
|
|
32 |
#include "lib/unix.h"
|
|
33 |
#include "lib/krt.h"
|
|
31 |
#include "sysdep/unix/timer.h"
|
|
32 |
#include "sysdep/unix/unix.h"
|
|
33 |
#include "sysdep/unix/krt.h"
|
|
34 | 34 |
#include "lib/string.h" |
35 | 35 |
#include "lib/socket.h" |
36 | 36 |
|
sysdep/cf/bsd.h | ||
---|---|---|
15 | 15 |
#define CONFIG_NO_IFACE_BIND |
16 | 16 |
#define CONFIG_USE_HDRINCL |
17 | 17 |
|
18 |
#define CONFIG_INCLUDE_SYSIO_H "sysdep/bsd/sysio.h" |
|
19 |
#define CONFIG_INCLUDE_KRTSYS_H "sysdep/bsd/krt-sys.h" |
|
20 |
|
|
18 | 21 |
/* |
19 | 22 |
Link: sysdep/unix |
20 | 23 |
Link: sysdep/bsd |
sysdep/cf/linux.h | ||
---|---|---|
14 | 14 |
#define CONFIG_MC_PROPER_SRC |
15 | 15 |
#define CONFIG_UNIX_DONTROUTE |
16 | 16 |
|
17 |
#define CONFIG_INCLUDE_SYSIO_H "sysdep/linux/sysio.h" |
|
18 |
#define CONFIG_INCLUDE_KRTSYS_H "sysdep/linux/krt-sys.h" |
|
19 |
|
|
17 | 20 |
#define CONFIG_RESTRICTED_PRIVILEGES |
21 |
#define CONFIG_INCLUDE_SYSPRIV_H "sysdep/linux/syspriv.h" |
|
22 |
|
|
18 | 23 |
|
19 | 24 |
/* |
20 | 25 |
Link: sysdep/linux |
sysdep/linux/Makefile | ||
---|---|---|
1 |
src := netlink.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(conf-y-targets): $(s)netlink.Y |
sysdep/linux/Modules | ||
---|---|---|
1 |
krt-sys.h |
|
2 |
netlink.c |
|
3 |
netlink.Y |
|
4 |
sysio.h |
|
5 |
syspriv.h |
sysdep/linux/netlink.c | ||
---|---|---|
20 | 20 |
#include "nest/protocol.h" |
21 | 21 |
#include "nest/iface.h" |
22 | 22 |
#include "lib/alloca.h" |
23 |
#include "lib/timer.h"
|
|
24 |
#include "lib/unix.h"
|
|
25 |
#include "lib/krt.h"
|
|
23 |
#include "sysdep/unix/timer.h"
|
|
24 |
#include "sysdep/unix/unix.h"
|
|
25 |
#include "sysdep/unix/krt.h"
|
|
26 | 26 |
#include "lib/socket.h" |
27 | 27 |
#include "lib/string.h" |
28 | 28 |
#include "lib/hash.h" |
sysdep/unix/Makefile | ||
---|---|---|
1 |
src := io.c krt.c log.c main.c random.c |
|
2 |
obj := $(src-o-files) |
|
3 |
$(all-daemon) |
|
4 |
$(cf-local) |
|
5 |
$(conf-y-targets): $(s)krt.Y |
sysdep/unix/Modules | ||
---|---|---|
1 |
log.c |
|
2 |
main.c |
|
3 |
timer.h |
|
4 |
io.c |
|
5 |
unix.h |
|
6 |
endian.h |
|
7 |
config.Y |
|
8 |
random.c |
|
9 |
|
|
10 |
krt.c |
|
11 |
krt.h |
|
12 |
krt.Y |
sysdep/unix/config.Y | ||
---|---|---|
8 | 8 |
|
9 | 9 |
CF_HDR |
10 | 10 |
|
11 |
#include "lib/unix.h"
|
|
11 |
#include "sysdep/unix/unix.h"
|
|
12 | 12 |
#include <stdio.h> |
13 | 13 |
|
14 | 14 |
CF_DECLS |
sysdep/unix/io.c | ||
---|---|---|
31 | 31 |
#include "nest/bird.h" |
32 | 32 |
#include "lib/lists.h" |
33 | 33 |
#include "lib/resource.h" |
34 |
#include "lib/timer.h"
|
|
34 |
#include "sysdep/unix/timer.h"
|
|
35 | 35 |
#include "lib/socket.h" |
36 | 36 |
#include "lib/event.h" |
37 | 37 |
#include "lib/string.h" |
38 | 38 |
#include "nest/iface.h" |
39 | 39 |
|
40 |
#include "lib/unix.h"
|
|
41 |
#include "lib/sysio.h"
|
|
40 |
#include "sysdep/unix/unix.h"
|
|
41 |
#include CONFIG_INCLUDE_SYSIO_H
|
|
42 | 42 |
|
43 | 43 |
/* Maximum number of calls of tx handler for one socket in one |
44 | 44 |
* select iteration. Should be small enough to not monopolize CPU by |
sysdep/unix/krt.Y | ||
---|---|---|
8 | 8 |
|
9 | 9 |
CF_HDR |
10 | 10 |
|
11 |
#include "lib/krt.h"
|
|
11 |
#include "sysdep/unix/krt.h"
|
|
12 | 12 |
|
13 | 13 |
CF_DEFINES |
14 | 14 |
|
sysdep/unix/krt.c | ||
---|---|---|
56 | 56 |
#include "nest/route.h" |
57 | 57 |
#include "nest/protocol.h" |
58 | 58 |
#include "filter/filter.h" |
59 |
#include "lib/timer.h"
|
|
59 |
#include "sysdep/unix/timer.h"
|
|
60 | 60 |
#include "conf/conf.h" |
61 | 61 |
#include "lib/string.h" |
62 | 62 |
|
sysdep/unix/krt.h | ||
---|---|---|
15 | 15 |
struct kif_config; |
16 | 16 |
struct kif_proto; |
17 | 17 |
|
18 |
#include "lib/krt-sys.h" |
|
18 |
#include "sysdep/config.h" |
|
19 |
#include CONFIG_INCLUDE_KRTSYS_H |
|
19 | 20 |
|
20 | 21 |
/* Flags stored in net->n.flags, rest are in nest/route.h */ |
21 | 22 |
|
... | ... | |
111 | 112 |
struct kif_state sys; /* Sysdep state */ |
112 | 113 |
}; |
113 | 114 |
|
114 |
struct kif_proto *kif_proto; |
|
115 |
extern struct kif_proto *kif_proto;
|
|
115 | 116 |
|
116 | 117 |
#define KIF_CF ((struct kif_config *)p->p.cf) |
117 | 118 |
|
sysdep/unix/log.c | ||
---|---|---|
26 | 26 |
#include "nest/mrtdump.h" |
27 | 27 |
#include "lib/string.h" |
28 | 28 |
#include "lib/lists.h" |
29 |
#include "lib/unix.h"
|
|
29 |
#include "sysdep/unix/unix.h"
|
|
30 | 30 |
|
31 | 31 |
static FILE *dbgf; |
32 | 32 |
static list *current_log_list; |
sysdep/unix/main.c | ||
---|---|---|
69 | 69 |
*/ |
70 | 70 |
|
71 | 71 |
#ifdef CONFIG_RESTRICTED_PRIVILEGES |
72 |
#include "lib/syspriv.h"
|
|
72 |
#include CONFIG_INCLUDE_SYSPRIV_H
|
|
73 | 73 |
#else |
74 | 74 |
|
75 | 75 |
static inline void |
... | ... | |
567 | 567 |
* Signals |
568 | 568 |
*/ |
569 | 569 |
|
570 |
volatile int async_config_flag; |
|
571 |
volatile int async_dump_flag; |
|
572 |
volatile int async_shutdown_flag; |
|
573 |
|
|
570 | 574 |
static void |
571 | 575 |
handle_sighup(int sig UNUSED) |
572 | 576 |
{ |
sysdep/unix/unix.h | ||
---|---|---|
91 | 91 |
#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path)) |
92 | 92 |
#endif |
93 | 93 |
|
94 |
volatile int async_config_flag; |
|
95 |
volatile int async_dump_flag; |
|
96 |
volatile int async_shutdown_flag; |
|
94 |
extern volatile int async_config_flag;
|
|
95 |
extern volatile int async_dump_flag;
|
|
96 |
extern volatile int async_shutdown_flag;
|
|
97 | 97 |
|
98 | 98 |
void io_init(void); |
99 | 99 |
void io_loop(void); |
tools/Makefile-top.in | ||
---|---|---|
1 |
# Makefile for in place build of BIRD |
|
2 |
# (c) 1999--2000 Martin Mares <mj@ucw.cz> |
|
3 |
|
|
4 |
objdir=@objdir@ |
|
5 |
|
|
6 |
all depend tags install install-docs: |
|
7 |
$(MAKE) -C $(objdir) $@ |
|
8 |
|
|
9 |
docs userdocs progdocs: |
|
10 |
$(MAKE) -C doc $@ |
|
11 |
|
|
12 |
clean: |
|
13 |
$(MAKE) -C $(objdir) clean |
|
14 |
find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name depend -or -name ".#*" | xargs rm -f |
|
15 |
|
|
16 |
distclean: clean |
|
17 |
$(MAKE) -C doc distclean |
|
18 |
rm -rf $(objdir) autom4te.cache |
|
19 |
rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile |
|
20 |
|
tools/Makefile.in | ||
---|---|---|
1 |
# Makefile for the BIRD Internet Routing Daemon |
|
2 |
# (c) 1999--2000 Martin Mares <mj@ucw.cz> |
|
3 |
|
|
4 |
include Rules |
|
5 |
|
|
6 |
.PHONY: all daemon birdc birdcl subdir depend clean distclean tags docs userdocs progdocs |
|
7 |
|
|
8 |
all: sysdep/paths.h .dep-stamp subdir daemon birdcl @CLIENT@ |
|
9 |
|
|
10 |
daemon: $(exedir)/bird |
|
11 |
|
|
12 |
birdc: $(exedir)/birdc |
|
13 |
|
|
14 |
birdcl: $(exedir)/birdcl |
|
15 |
|
|
16 |
bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a |
|
17 |
|
|
18 |
$(bird-dep): sysdep/paths.h .dep-stamp subdir |
|
19 |
|
|
20 |
birdc-dep := client/birdc.o client/all.o lib/birdlib.a |
|
21 |
|
|
22 |
$(birdc-dep): sysdep/paths.h .dep-stamp subdir |
|
23 |
|
|
24 |
birdcl-dep := client/birdcl.o client/all.o lib/birdlib.a |
|
25 |
|
|
26 |
$(birdcl-dep): sysdep/paths.h .dep-stamp subdir |
|
27 |
|
|
28 |
|
|
29 |
export client := @CLIENT@ |
|
30 |
|
|
31 |
depend: sysdep/paths.h .dir-stamp |
|
32 |
set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done |
|
33 |
set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done |
|
34 |
|
|
35 |
subdir: sysdep/paths.h .dir-stamp .dep-stamp |
|
36 |
set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done |
|
37 |
set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done |
|
38 |
|
|
39 |
$(exedir)/bird: $(bird-dep) |
|
40 |
@echo LD $(LDFLAGS) -o $@ $^ $(LIBS) |
|
41 |
@$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
|
42 |
|
|
43 |
$(exedir)/birdc: $(birdc-dep) |
|
44 |
@echo LD $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS) |
|
45 |
@$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS) |
|
46 |
|
|
47 |
$(exedir)/birdcl: $(birdcl-dep) |
|
48 |
@echo LD $(LDFLAGS) -o $@ $^ $(LIBS) |
|
49 |
@$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
|
50 |
|
|
51 |
.dir-stamp: sysdep/paths.h |
|
52 |
mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs) |
|
53 |
touch .dir-stamp |
|
54 |
|
|
55 |
.dep-stamp: |
|
56 |
$(MAKE) depend |
|
57 |
touch .dep-stamp |
|
58 |
|
|
59 |
docs: userdocs progdocs |
|
60 |
|
|
61 |
userdocs progdocs: .dir-stamp |
|
62 |
$(MAKE) -C doc -f $(srcdir_abs)/doc/Makefile $@ |
|
63 |
|
|
64 |
sysdep/paths.h: |
|
65 |
echo >sysdep/paths.h "/* Generated by Makefile, don't edit manually! */" |
|
66 |
echo >>sysdep/paths.h "#define PATH_CONFIG_FILE \"@CONFIG_FILE@\"" |
|
67 |
echo >>sysdep/paths.h "#define PATH_CONTROL_SOCKET \"@CONTROL_SOCKET@\"" |
|
68 |
if test -n "@iproutedir@" ; then echo >>sysdep/paths.h "#define PATH_IPROUTE_DIR \"@iproutedir@\"" ; fi |
|
69 |
|
|
70 |
tags: |
|
71 |
cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]` |
|
72 |
|
|
73 |
install: all |
|
74 |
$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@ |
|
75 |
$(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/bird |
|
76 |
$(INSTALL_PROGRAM) $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl |
|
77 |
if test -n "@CLIENT@" ; then \ |
|
78 |
$(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc ; \ |
|
79 |
fi |
|
80 |
if ! test -f $(DESTDIR)/@CONFIG_FILE@ ; then \ |
|
81 |
$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/@CONFIG_FILE@ ; \ |
|
82 |
else \ |
|
83 |
echo "Not overwriting old bird.conf" ; \ |
|
84 |
fi |
|
85 |
|
|
86 |
install-docs: |
|
87 |
$(INSTALL) -d $(DESTDIR)/$(docdir) |
|
88 |
$(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/ |
|
89 |
|
|
90 |
clean: |
|
91 |
find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f |
|
92 |
rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h |
|
93 |
rm -f $(exedir)/bird $(exedir)/birdcl $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp |
|
94 |
|
|
95 |
distclean: clean |
|
96 |
rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules |
|
97 |
rm -rf .dir-stamp $(clean-dirs) |
tools/Rules.in | ||
---|---|---|
1 |
# Makefile fragments for the BIRD Internet Routing Daemon |
|
2 |
# (c) 1999--2000 Martin Mares <mj@ucw.cz> |
|
3 |
|
|
4 |
srcdir=@srcdir_rel_mf@ |
|
5 |
srcdir_abs := $(shell cd $(srcdir) ; pwd) |
|
6 |
objdir=@objdir@ |
|
7 |
exedir=@exedir@ |
|
8 |
|
|
9 |
protocols=@protocols@ |
|
10 |
static-dirs := nest filter $(addprefix proto/,$(protocols)) |
|
11 |
static-dir-paths := $(addprefix $(srcdir)/,$(static-dirs)) |
|
12 |
dynamic-dirs := lib conf |
|
13 |
dynamic-dir-paths := $(dynamic-dirs) |
|
14 |
client-dirs := client |
|
15 |
client-dir-paths := $(client-dirs) |
|
16 |
doc-dirs := doc |
|
17 |
doc-dir-paths := $(doc-dirs) |
|
18 |
|
|
19 |
all-dirs:=$(static-dirs) $(dynamic-dirs) $(client-dirs) $(doc-dirs) |
|
20 |
clean-dirs:=$(all-dirs) proto sysdep |
|
21 |
|
|
22 |
CPPFLAGS=-I$(root-rel) -I$(srcdir) @CPPFLAGS@ |
|
23 |
CFLAGS=$(CPPFLAGS) @CFLAGS@ |
|
24 |
LDFLAGS=@LDFLAGS@ |
|
25 |
LIBS=@LIBS@ |
|
26 |
CLIENT_LIBS=@CLIENT_LIBS@ |
|
27 |
CC=@CC@ |
|
28 |
M4=@M4@ |
|
29 |
BISON=@BISON@ |
|
30 |
FLEX=@FLEX@ |
|
31 |
RANLIB=@RANLIB@ |
|
32 |
INSTALL=@INSTALL@ |
|
33 |
INSTALL_PROGRAM=@INSTALL_PROGRAM@ |
|
34 |
INSTALL_DATA=@INSTALL_DATA@ |
|
35 |
|
|
36 |
prefix=@prefix@ |
|
37 |
exec_prefix=@exec_prefix@ |
|
38 |
bindir=@bindir@ |
|
39 |
sbindir=@sbindir@ |
|
40 |
sysconfdir=@sysconfdir@ |
|
41 |
localstatedir=@localstatedir@ |
|
42 |
docdir=@prefix@/doc |
|
43 |
|
|
44 |
ifdef source |
|
45 |
|
|
46 |
objs := $(subst .c,.o,$(source)) |
|
47 |
|
|
48 |
ifdef dir-name |
|
49 |
src-path := $(srcdir)/$(dir-name)/ |
|
50 |
endif |
|
51 |
|
|
52 |
all: |
|
53 |
cd $(root-rel) && make |
|
54 |
|
|
55 |
ifdef lib-dest |
|
56 |
|
|
57 |
subdir: $(lib-dest) |
|
58 |
|
|
59 |
$(lib-dest): $(objs) |
|
60 |
rm -f $@ |
|
61 |
ar rcs $@ $^ |
|
62 |
$(RANLIB) $@ |
|
63 |
|
|
64 |
else |
|
65 |
|
|
66 |
subdir: all.o |
|
67 |
|
|
68 |
all.o: $(objs) |
|
69 |
# $(LD) -r -o $@ $^ |
|
70 |
# Changed to $(CC) because $(LD) has problems with crosscompiling |
|
71 |
@echo LD -r -o $@ $^ |
|
72 |
@$(CC) -nostdlib -r -o $@ $^ |
|
73 |
|
|
74 |
endif |
|
75 |
|
|
76 |
%.o: $(src-path)%.c |
|
77 |
@echo CC -o $@ -c $< |
|
78 |
@$(CC) $(CFLAGS) -o $@ -c $< |
|
79 |
|
|
80 |
ifndef source-dep |
|
81 |
source-dep := $(source) |
|
82 |
endif |
|
83 |
|
|
84 |
depend: |
|
85 |
$(CC) $(CPPFLAGS) -MM $(addprefix $(src-path),$(source-dep)) >depend |
|
86 |
|
|
87 |
ifneq ($(wildcard depend),) |
|
88 |
include depend |
|
89 |
endif |
|
90 |
|
|
91 |
endif |
tools/mergedirs | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
if [ -z "$4" ] ; then |
|
4 |
echo "Usage: mergedirs <src-dir> <src-dir-rel> <obj-dir> <list-of-dirs>" |
|
5 |
exit 1 |
|
6 |
fi |
|
7 |
cpp=${CPP:-cc -E} |
|
8 |
SRCDIR=$1 |
|
9 |
shift |
|
10 |
SRCREL=$1 |
|
11 |
case $SRCDIR in |
|
12 |
/*) ;; |
|
13 |
*) SRCREL="../$SRCREL" ;; |
|
14 |
esac |
|
15 |
shift |
|
16 |
OBJDIR=$1 |
|
17 |
LIBDIR=$OBJDIR/lib |
|
18 |
CONFDIR=$OBJDIR/conf |
|
19 |
shift |
|
20 |
|
|
21 |
echo "Merging system-dependent modules ($@)" |
|
22 |
MODULES=`for a in $@ ; do |
|
23 |
cat $SRCDIR/sysdep/config.h $SRCDIR/$a/Modules | |
|
24 |
$cpp -U unix -D MACROS_ONLY -I $OBJDIR - | |
|
25 |
sed "/^[ ]*\$/d;/^#/d;s@\\(.*\\)@\\1 $a/\\1@" |
|
26 |
done | |
|
27 |
sort -k1,1 -u | |
|
28 |
cut -d ' ' -f 2` |
|
29 |
rm -rf $LIBDIR $CONFDIR |
|
30 |
mkdir -p $LIBDIR $CONFDIR |
|
31 |
for a in $MODULES ; do |
|
32 |
b=`basename $a` |
|
33 |
case $b in |
|
34 |
*.h) ln -s $SRCREL/$a $LIBDIR/$b |
|
35 |
;; |
|
36 |
*.c) OBJ=`echo $b | sed 's/\.c$/\.o/'` |
|
37 |
OBJS="$OBJS $OBJ" |
|
38 |
SRCS="$SRCS \\ |
|
39 |
$b" |
|
40 |
ln -s $SRCREL/$a $LIBDIR/$b |
|
41 |
;; |
|
42 |
*.Y) CONFS="$CONFS\$(srcdir)/$a " |
|
43 |
ln -s $SRCREL/$a $CONFDIR/$b |
|
44 |
;; |
|
45 |
*) echo "$b: Unknown file type" |
|
46 |
exit 1 |
|
47 |
;; |
|
48 |
esac |
|
49 |
done |
|
50 |
|
|
51 |
cat >$LIBDIR/Makefile <<EOF |
|
52 |
source=$SRCS |
|
53 |
lib-dest=birdlib.a |
|
54 |
root-rel=../ |
|
55 |
|
|
56 |
include ../Rules |
|
57 |
EOF |
|
58 |
|
|
59 |
sed <$SRCDIR/conf/Makefile >$CONFDIR/Makefile "s|@CONFS@|$CONFS|" |
|
60 |
CONFS=`cd $SRCDIR ; ls conf/*.[chl]` |
|
61 |
for a in $CONFS ; do |
|
62 |
ln -s $SRCREL/$a $CONFDIR/ |
|
63 |
done |
tools/progdoc | ||
---|---|---|
1 | 1 |
#!/usr/bin/perl |
2 | 2 |
|
3 | 3 |
$srcdir = $ARGV[0]; |
4 |
$out = $ARGV[1]; |
|
4 | 5 |
|
5 |
open(OUT, ">prog.sgml") || die "Cannot create output file"; |
|
6 |
include("doc/prog-head.sgml"); |
|
7 |
process(""); |
|
8 |
include("doc/prog-foot.sgml"); |
|
6 |
open(OUT, ">", $out) || die "Cannot create output file"; |
|
7 |
process($srcdir); |
|
9 | 8 |
close OUT; |
9 |
gen_deps(); |
|
10 | 10 |
exit 0; |
11 | 11 |
|
12 | 12 |
sub include { |
13 | 13 |
my $f = shift @_; |
14 |
open(IN, "$srcdir/$f") || die "Unable to find $f"; |
|
14 |
open(IN, "$f") || die "Unable to find $f"; |
|
15 |
push(@deps, "$f"); |
|
15 | 16 |
while (<IN>) { |
16 | 17 |
print OUT; |
17 | 18 |
} |
... | ... | |
21 | 22 |
sub process { |
22 | 23 |
my $dir = shift @_; |
23 | 24 |
print "$dir/Doc\n"; |
24 |
open(IN, "$srcdir/$dir/Doc") || die "Unable to read $dir/Doc"; |
|
25 |
open(IN, "$dir/Doc") || die "Unable to read $dir/Doc"; |
|
26 |
push(@deps, "$dir/Doc"); |
|
25 | 27 |
my @docfile = <IN>; |
26 | 28 |
close IN; |
27 | 29 |
foreach $_ (@docfile) { |
... | ... | |
36 | 38 |
print OUT "<chapt>$arg\n"; |
37 | 39 |
} elsif ($cmd eq "S") { |
Also available in: Unified diff