Commit 225787a4 authored by Wayne Davison's avatar Wayne Davison

Made the (re-)building of the proto.h file automatic in the

main Makefile rules, and the (re-)building of the man pages
automatic if yodl2man is present.
parent e107b6b1
...@@ -10,6 +10,7 @@ config.h.in ...@@ -10,6 +10,7 @@ config.h.in
config.log config.log
config.status config.status
/proto.h /proto.h
/proto.h-tstamp
/rsync.1 /rsync.1
/rsyncd.conf.5 /rsyncd.conf.5
/autom4te*.cache /autom4te*.cache
......
...@@ -59,7 +59,7 @@ CHECK_OBJS=getgroups.o getfsdev.o t_stub.o t_unsafe.o trimslash.o wildtest.o ...@@ -59,7 +59,7 @@ CHECK_OBJS=getgroups.o getfsdev.o t_stub.o t_unsafe.o trimslash.o wildtest.o
$(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@ $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
@OBJ_RESTORE@ @OBJ_RESTORE@
all: rsync$(EXEEXT) all: rsync$(EXEEXT) @MAKE_MAN@
install: all install: all
-mkdir -p ${DESTDIR}${bindir} -mkdir -p ${DESTDIR}${bindir}
...@@ -104,17 +104,31 @@ T_UNSAFE_OBJ = t_unsafe.o syscall.o util.o t_stub.o lib/compat.o lib/snprintf.o ...@@ -104,17 +104,31 @@ T_UNSAFE_OBJ = t_unsafe.o syscall.o util.o t_stub.o lib/compat.o lib/snprintf.o
t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ) t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS)
gen: gen: conf proto.h man
cd $(srcdir) && $(MAKE) -f prepare-source.mak gen
conf:
cd $(srcdir) && $(MAKE) -f prepare-source.mak conf
gensend: gen gensend: gen
rsync -aivzc $(GENFILES) samba.org:/home/ftp/pub/rsync/generated-files/ rsync -aivzc $(GENFILES) samba.org:/home/ftp/pub/rsync/generated-files/
man: proto: proto.h-tstamp
cd $(srcdir) && $(MAKE) -f prepare-source.mak man
proto.h: proto.h-tstamp
proto.h-tstamp: *.c lib/compat.c
perl mkproto.pl *.c lib/compat.c
touch proto.h-tstamp
man: rsync.1 rsyncd.conf.5
rsync.1: rsync.yo
yodl2man -o rsync.1 rsync.yo
-./tweak_manpage rsync.1
proto: rsyncd.conf.5: rsyncd.conf.yo
cd $(srcdir) && $(MAKE) -f prepare-source.mak proto.h yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
-./tweak_manpage rsyncd.conf.5
clean: cleantests clean: cleantests
rm -f *~ $(OBJS) $(TLS_OBJ) $(CHECK_PROGS) $(CHECK_OBJS) $(CHECK_SYMLINKS) \ rm -f *~ $(OBJS) $(TLS_OBJ) $(CHECK_PROGS) $(CHECK_OBJS) $(CHECK_SYMLINKS) \
......
...@@ -13,12 +13,11 @@ if [ ! -f "$realconfigure" ]; then ...@@ -13,12 +13,11 @@ if [ ! -f "$realconfigure" ]; then
else else
curdir='' curdir=''
fi fi
make -f prepare-source.mak proto.h
if make -f prepare-source.mak conf; then if make -f prepare-source.mak conf; then
: :
elif [ -f "$HOME/build_farm/build_test.fns" ]; then elif [ -f "$HOME/build_farm/build_test.fns" ]; then
# Allow the build farm to grab latest files via rsync. # Allow the build farm to grab latest files via rsync.
rsync -avz rsync://rsync.samba.org/rsyncftp/generated-files/'c*' . rsync -pvz rsync://rsync.samba.org/rsyncftp/generated-files/'c*' .
else else
echo 'Failed to build configure.sh and/or config.h.in -- giving up.' >&2 echo 'Failed to build configure.sh and/or config.h.in -- giving up.' >&2
rm -f "$realconfigure" rm -f "$realconfigure"
......
...@@ -123,6 +123,11 @@ else ...@@ -123,6 +123,11 @@ else
fi fi
AC_DEFINE_UNQUOTED(RSYNC_RSH, "$RSYNC_RSH", [default -e command]) AC_DEFINE_UNQUOTED(RSYNC_RSH, "$RSYNC_RSH", [default -e command])
AC_CHECK_PROG(HAVE_YODL2MAN, yodl2man, 1, 0)
if test x$HAVE_YODL2MAN = x1; then
MAKE_MAN=man
fi
AC_ARG_WITH(nobody-group, AC_ARG_WITH(nobody-group,
AC_HELP_STRING([--with-nobody-group=GROUP], AC_HELP_STRING([--with-nobody-group=GROUP],
[set the default unprivileged group (default nobody or nogroup)]), [set the default unprivileged group (default nobody or nogroup)]),
...@@ -813,6 +818,7 @@ AC_SUBST(OBJ_SAVE) ...@@ -813,6 +818,7 @@ AC_SUBST(OBJ_SAVE)
AC_SUBST(OBJ_RESTORE) AC_SUBST(OBJ_RESTORE)
AC_SUBST(CC_SHOBJ_FLAG) AC_SUBST(CC_SHOBJ_FLAG)
AC_SUBST(BUILD_POPT) AC_SUBST(BUILD_POPT)
AC_SUBST(MAKE_MAN)
AC_CHECK_HEADERS(sys/acl.h acl/libacl.h) AC_CHECK_HEADERS(sys/acl.h acl/libacl.h)
AC_CHECK_FUNCS(_acl __acl _facl __facl) AC_CHECK_FUNCS(_acl __acl _facl __facl)
......
gen: conf proto.h man
conf: configure.sh config.h.in conf: configure.sh config.h.in
configure.sh: configure.in aclocal.m4 configure.sh: configure.in aclocal.m4
...@@ -7,16 +5,3 @@ configure.sh: configure.in aclocal.m4 ...@@ -7,16 +5,3 @@ configure.sh: configure.in aclocal.m4
config.h.in: configure.in aclocal.m4 config.h.in: configure.in aclocal.m4
autoheader && touch config.h.in autoheader && touch config.h.in
proto.h: *.c lib/compat.c
perl mkproto.pl *.c lib/compat.c
man: rsync.1 rsyncd.conf.5
rsync.1: rsync.yo
yodl2man -o rsync.1 rsync.yo
-./tweak_manpage rsync.1
rsyncd.conf.5: rsyncd.conf.yo
yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
-./tweak_manpage rsyncd.conf.5
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment