automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

automake and rpcgen


From: Paul J
Subject: automake and rpcgen
Date: Sun, 10 Nov 2002 15:04:16 +0000 (GMT)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear All,

Please forgive my posting about this topic. I have read the archive but
the answer posted:

http://sources.redhat.com/ml/automake/2000-06/msg00004.html

does not solve my problem. Add to that the fact I am a beginner with
autotools!

I wish to produce a library from two xdr files, datarpc.x and
visualrpc.x. Originally, the following GNU make commands produced the
correct output files which, by means of a hand crafted makefile (using
g++ as the compiler), compiled the rpcgen produced files into .o's:

========================================================================

all: datarpc.h datarpcxdr.h visualrpcxdr.h visualrpc.h print datarpcserver.o 
datarpcclient.o visualrpcclient.o visualrpcserver.o include

# Visualiser RPC
visualrpcclient.c: visualrpc.x
        rm -f visualrpcclient.c
        rpcgen -l -C -o visualrpcclient.c visualrpc.x

visualrpcclient.o: visualrpcclient.c
        g++ -c visualrpcclient.c

visualrpcserver.c: visualrpc.x
        rm -f visualrpcserver.c
        rpcgen -m -C -o visualrpcserver.c visualrpc.x

visualrpcserver.o: visualrpcserver.c
        g++ -c visualrpcserver.c

visualrpcxdr.h: visualrpc.x
        rm -f visualrpcxdr.h
        rpcgen -c -C -o visualrpcxdr.h visualrpc.x

visualrpc.h: visualrpc.x
        rm -f visualrpc.h
        rpcgen -h -C -o visualrpc.h visualrpc.x

# Data RPC
datarpcxdr.h: datarpc.x
        rm -f datarpcxdr.h
        rpcgen -c -C -o datarpcxdr.h datarpc.x

datarpc.h: datarpc.x
        rm -f datarpc.h
        rpcgen -h -C -o datarpc.h datarpc.x

datarpcserver.c: datarpc.x
        rm -f datarpcserver.c
        rpcgen -m -C -o datarpcserver.c datarpc.x

datarpcserver.o: datarpcserver.c
        g++ -c datarpcserver.c

datarpcclient.c: datarpc.x
        rm -f datarpcclient.c
        rpcgen -l -C -o datarpcclient.c datarpc.x

datarpcclient.o: datarpcclient.c
        g++ -c datarpcclient.c

clean:
        rm -f *.o
        rm -f datarpcclient.c
        rm -f datarpcserver.c
        rm -f visualrpcclient.c
        rm -f visualrpcserver.c
        rm -f visualrpcxdr.h
        rm -f visualrpc.h
        rm -f datarpc.h
        rm -f datarpcxdr.h

cleaner: clean

.PHONY: clean cleaner include all print

========================================================================

Sick, isn't it? In converting this project to use autotools, I concluded
to create a library from the .o files. Hence, I started (initially the
lib will not be installed for testing purposes):

========================================================================

@SET_MAKE@

noinst_LIBRARIES = libInterFASECommon.a

libInterFASECommon_a_SOURCES = \
        datarpc.x \
        visualrpc.x

========================================================================

Then my brain melted whilst trying to work out what rules I should include to
tell automake how to deal with .x files. The .c(xx) files produced by rpcgen
should be compiled with g++ (or equivalent) for use within the rest of the C++
project code.

Can anybody offer me some advice please?

Many thanks,


Paul
- --
Department of Computing, Imperial College London
http://myitcv.org.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9znVy0YkfvYj92P4RAjYjAJ9oxywUz2pMNOnBS9W4Xu4jWjpRlgCeIiAQ
I5h5E6q0MS0doWPtEXwkQgc=
=ytiC
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]