From ed26054ca03d2dd8731f358efdf41a63f0387832 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sat, 5 Mar 2011 21:03:17 +0100 Subject: dist: Reorganize rpcif* build to avoid shipping Reorganize the building of the rpcif* files such that we do not ship these files in the dist tarball. These generated files should not be in the dist tarball, as * they can be regenerated easily * they disturb our wildcard emulation based on the dist-hook generating a list of files in a separate *.mk file. At a later time, the rpcif stuff should be moved to a place where both clientcomm/ and servercomm/ can equally trigger a rebuild. --- clientcomm/Makefile.am | 36 ++++++++++++++++++++++++------------ servercomm/Makefile.am | 7 +++++-- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/clientcomm/Makefile.am b/clientcomm/Makefile.am index 6b2bad0..3e1c03b 100644 --- a/clientcomm/Makefile.am +++ b/clientcomm/Makefile.am @@ -30,8 +30,8 @@ ################################################################## pkglib_LIBRARIES=libclientcomm.a -libclientcomm_a_SOURCES = rpcif_clnt.cc rpcif_xdr.c rpcif.h \ - clientcomm.cc clientcomm.hh rpcclientcomm.cc \ +nodist_libclientcomm_a_SOURCES = rpcif_clnt.cc rpcif_xdr.c rpcif.h +libclientcomm_a_SOURCES = clientcomm.cc clientcomm.hh rpcclientcomm.cc \ rpcclientcomm.hh clientcomm.icc \ ../mymalloc/mymalloc_cln.cc ../mymalloc/mymalloc.h \ ../rnprotocol/rnprotocol.cc \ @@ -48,35 +48,47 @@ libclientcomm_a_CPPFLAGS = $(AM_CPPFLAGS) libclientcomm_a_CPPFLAGS += -I$(top_srcdir)/rnprotocol libclientcomm_a_CPPFLAGS += $(CLIENT_CPPFLAGS) -EXTRA_libclientcomm_a_SOURCES = rpcif.x -BUILT_SOURCES= rpcif_clnt.cc rpcif_xdr.c rpcif.h rpcif_svc.cc -CLEANFILES=rpcif_clnt.cc rpcif_xdr.c rpcif.h rpcif.h.tmp rpcif.h.tmp2 \ - rpcif_clnt.c.tmp rpcif_svc.cc.tmp rpcif_svc.cc +EXTRA_libclientcomm_a_SOURCES = rpcif.x -rpcif.h: rpcif.x rpcif.h.awk +BUILT_SOURCES = +CLEANFILES = +EXTRA_DIST = + +BUILT_SOURCES += rpcif.h +CLEANFILES += rpcif.h rpcif.h.tmp rpcif.h.tmp2 +EXTRA_DIST += rpcif.h.awk +rpcif.h: rpcif.x rpcif.h.awk Makefile $(RPCGEN) -h -o rpcif.h.tmp $(srcdir)/rpcif.x $(AWK) -f $(srcdir)/rpcif.h.awk rpcif.h.tmp > rpcif.h.tmp2 $(SED) 's,_RPCIF\.H_H_RPCGEN,_RPCIF_H_H_RPCGEN,g' rpcif.h.tmp2 > rpcif.h rm rpcif.h.tmp rpcif.h.tmp2 -FIX_INCLUDE = $(SED) -FIX_INCLUDE += 's,^\#include "../../clientcomm/rpcif.h"$$,\#include "clientcomm/rpcif.h",' +FIX_RPCIF_H_INCLUDE = $(SED) +FIX_RPCIF_H_INCLUDE += 's,^\#include ".*/clientcomm/rpcif.h"$$,\#include "clientcomm/rpcif.h",' +BUILT_SOURCES += rpcif_clnt.cc +CLEANFILES += rpcif_clnt.cc rpcif_clnt.c.tmp rpcif_clnt.c.tmp2 +EXTRA_DIST += rpcif_clnt.c.awk rpcif_clnt.cc: rpcif.x rpcif_clnt.c.awk Makefile -rm rpcif_clnt.cc.tmp $(RPCGEN) -l -o rpcif_clnt.cc.tmp $(srcdir)/rpcif.x $(AWK) -f $(srcdir)/rpcif_clnt.c.awk rpcif_clnt.cc.tmp > rpcif_clnt.cc.tmp2 - $(FIX_INCLUDE) rpcif_clnt.cc.tmp2 > rpcif_clnt.cc + $(FIX_RPCIF_H_INCLUDE) rpcif_clnt.cc.tmp2 > rpcif_clnt.cc rm rpcif_clnt.cc.tmp rpcif_clnt.cc.tmp2 +BUILT_SOURCES += rpcif_xdr.c +CLEANFILES += rpcif_xdr.c rpcif_xdr.c.tmp rpcif_xdr.c: rpcif.x Makefile -rm rpcif_xdr.c.tmp $(RPCGEN) -c -o rpcif_xdr.c.tmp $(srcdir)/rpcif.x - $(FIX_INCLUDE) rpcif_xdr.c.tmp > rpcif_xdr.c + $(FIX_RPCIF_H_INCLUDE) rpcif_xdr.c.tmp > rpcif_xdr.c rm rpcif_xdr.c.tmp +BUILT_SOURCES += rpcif_svc.cc +CLEANFILES += rpcif_svc.cc rpcif_svc.cc.tmp rpcif_svc.cc.tmp2 +EXTRA_DIST += rpcif_svc.c.awk rpcif_svc.cc: rpcif.x rpcif_svc.c.awk Makefile $(RPCGEN) -m -o rpcif_svc.cc.tmp $(srcdir)/rpcif.x $(AWK) -f $(srcdir)/rpcif_svc.c.awk rpcif_svc.cc.tmp > rpcif_svc.cc.tmp2 - $(FIX_INCLUDE) rpcif_svc.cc.tmp2 > rpcif_svc.cc + $(FIX_RPCIF_H_INCLUDE) rpcif_svc.cc.tmp2 > rpcif_svc.cc rm rpcif_svc.cc.tmp rpcif_svc.cc.tmp2 diff --git a/servercomm/Makefile.am b/servercomm/Makefile.am index 8fa5104..83c7818 100644 --- a/servercomm/Makefile.am +++ b/servercomm/Makefile.am @@ -29,10 +29,13 @@ ################################################################## pkglib_LIBRARIES=libservercomm.a -libservercomm_a_SOURCES=../clientcomm/rpcif_xdr.c ../clientcomm/rpcif_svc.cc servercomm.cc \ +nodist_libservercomm_a_SOURCES = ../clientcomm/rpcif_xdr.c +nodist_libservercomm_a_SOURCES += ../clientcomm/rpcif_svc.cc +nodist_libservercomm_a_SOURCES += ../clientcomm/rpcif.h +libservercomm_a_SOURCES=servercomm.cc \ servercomm2.cc manager.cc callbackmgr.cc httpserver.cc \ ../mymalloc/mymalloc_svc.cc ../mymalloc/mymalloc.h \ - ../clientcomm/rpcif.h callbackmgr.hh httpserver.hh httpserver.icc \ + callbackmgr.hh httpserver.hh httpserver.icc \ servercomm.hh servercomm.icc \ ../rnprotocol/rnprotocol.cc \ ../rnprotocol/rnprotocol.hh \ -- cgit