[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
python_PYTHON not triggering rules for generated code
From: |
cb132 |
Subject: |
python_PYTHON not triggering rules for generated code |
Date: |
Mon, 26 Mar 2012 07:02:10 -0700 (PDT) |
I am using Google protobuf to generate C++ and/or python code, and compiling
the python using python_PYTHON - but it's not working.
Makefile.am looks like this;
<code>
if GEN_PROTOC_CPP
include $(srcdir)/Makefile-cpp.am
endif
if GEN_PROTOC_PY
include $(srcdir)/Makefile-py.am
endif
</code>
Makefile-py.am looks like this;
<code>
## list of .proto files
include $(srcdir)/Protos.am
## proto compiler support
include $(top_srcdir)/.am/protoc.am
## compile python
python_PYTHON = \
__init__.py \
$(PROTO_PYS)
</code>
Protos.am provides a list of protos, and rules;
<code>
PROTO_PYS=$(PROTOS:.proto=_pb2.py)
MsgHeaderProto_pb2.py : MsgHeaderProto.proto
@echo ' PROTOP MsgHeaderProto.proto'
protoc --python_out=.. -$I(topsrcdir) $(PROTOC_PYFLAGS) $<
</code>
Problem one is the .py rules are never triggered to generate the .py files.
The C++ makefile is very similar, and works fine.
I have tried using BUILT_SOURCES, but it does not work if I use
<code>BUILT_SOURCES = $(PROTO_PYS) </code>
and it does not work unless it's in Makefile.am. Since python_PYTHON
doesn't seem to actually compile until I do a 'make install', I've also
tried
<code>all-local : $(PROTO_PYS) <code>
What am I missing?
--
View this message in context:
http://old.nabble.com/python_PYTHON-not-triggering-rules-for-generated-code-tp33544741p33544741.html
Sent from the Gnu - Automake - General mailing list archive at Nabble.com.
- python_PYTHON not triggering rules for generated code,
cb132 <=