-COPYRIGHT = Copyright (c) 1997-2006 by Andre Noll
+COPYRIGHT = Copyright (c) 1997-2007 by Andre Noll
DISCLAIMER = This is free software with ABSOLUTELY NO WARRANTY. See COPYING for details.
prefix = @prefix@
--set-package="para_$(subst .cmdline,,$(*F))" \
--set-version="$V" < $<
-server_command_list.c: server.cmd server_command_list.h
- echo '#include "server.h"' > $@
- echo '#include "user_list.h"' >> $@
- echo '#include "server_command_list.h"' >> $@
- echo 'struct server_command cmd_struct[] = {' >>$@
- ./command_util.sh array < $< >>$@
- echo '{.name = NULL}};' >> $@
-server_command_list.h: server.cmd
- echo 'extern struct server_command cmd_struct[];' > $@
- ./command_util.sh proto < $< >> $@
-
-mysql_selector_command_list.c: mysql_selector.cmd mysql_selector_command_list.h
- echo '#include "server.h"' > $@
- echo '#include "user_list.h"' >> $@
- echo '#include "mysql_selector_command_list.h"' >> $@
- echo 'struct server_command cmds[] = {' >>$@
- ./command_util.sh array < $< >>$@
- echo '{.name = NULL}};' >> $@
-mysql_selector_command_list.h: mysql_selector.cmd
- echo 'extern struct server_command cmds[];' > $@
- ./command_util.sh proto < $< >> $@
-
-random_selector_command_list.c: random_selector.cmd random_selector_command_list.h
- echo '#include "server.h"' > $@
- echo '#include "user_list.h"' >> $@
- echo '#include "random_selector_command_list.h"' >> $@
- echo 'struct server_command random_selector_cmds[] = {' >>$@
- ./command_util.sh array < $< >>$@
- echo '{.name = NULL}};' >> $@
-random_selector_command_list.h: random_selector.cmd
- echo 'extern struct server_command random_selector_cmds[];' > $@
- ./command_util.sh proto < $< >> $@
-
-playlist_selector_command_list.c: playlist_selector.cmd playlist_selector_command_list.h
- echo '#include "server.h"' > $@
- echo '#include "user_list.h"' >> $@
- echo '#include "playlist_selector_command_list.h"' >> $@
- echo 'struct server_command playlist_selector_cmds[] = {' >>$@
- ./command_util.sh array < $< >>$@
- echo '{.name = NULL}};' >> $@
-playlist_selector_command_list.h: playlist_selector.cmd
- echo 'extern struct server_command playlist_selector_cmds[];' > $@
- ./command_util.sh proto < $< >> $@
-
-audiod_command_list.c: audiod.cmd audiod_command_list.h
- echo '#include "list.h"' > $@
- echo '#include "para.h"' >> $@
- echo '#include "sched.h"' >> $@
- echo '#include "audiod.h"' >> $@
- echo '#include "audiod_command_list.h"' >> $@
- echo 'struct audiod_command cmds[] = {' >>$@
- ./command_util.sh array < $< >>$@
- echo '{.name = NULL}};' >> $@
-audiod_command_list.h: audiod.cmd
- echo 'extern struct audiod_command cmds[];' > $@
- ./command_util.sh proto < $< >> $@
+%_command_list.c %_command_list.h: %.cmd
+ ./command_util.sh c < $< >$@
+ ./command_util.sh h < $< >$(@:%.c=%.h)
+
+%_command_list.man: %.cmd
+ ./command_util.sh man < $< > $@
+
+server_command_lists = server_command_list.man random_selector_command_list.man \
+ playlist_selector_command_list.man mysql_selector_command_list.man
+man/man1/para_server.1: para_server $(server_command_lists)
+ opts="-N `for i in $(server_command_lists); do echo "-i $$i"; done`"; \
+ help2man $$opts ./para_server > $@
+
+man/man1/para_audiod.1: para_audiod audiod_command_list.man
+ help2man -N -i audiod_command_list.man ./para_audiod > $@
+
+man/man1/%.1: %
+ help2man -N $< > $@
+
+man/html/%.html: man/man1/%.1
+ man2html $< > $@
+
+
ortp_recv.o: ortp_recv.c
$(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ortp_cppflags@ $<
$(CC) -Wall -fPIC @GTK_CFLAGS@ krell.o -o $@ @GTK_LIBS@ -shared
clean:
- rm -f *.o $(BINARIES) *_command_list.*
-
+ rm -f *.o $(BINARIES)
distclean: clean
rm -f Makefile autoscan.log config.status config.log && \
rm -rf web/sync/* autom4te.cache aclocal.m4
$(grutatxt_html) ChangeLog* config.h configure \
config.h.in skencil/*.pdf skencil/*.ps
rm -rf doc
+ rm -f *_command_list.* *.man man/man1/* man/html/*
+
install: all
umask 022 && \