2 # This is a makefile.am fragment to build Orc code.
4 # Define ORC_SOURCE and then include this file, such as:
6 # ORC_SOURCE=gstadderorc
7 # include $(top_srcdir)/common/orc.mak
9 # This fragment will create tmp-orc.c and gstadderorc.h from
12 # When 'make dist' is run at the top level, or 'make orc-update'
13 # in a directory including this fragment, the generated source
14 # files will be copied to $(ORC_SOURCE)-dist.[ch]. These files
15 # should be checked in to git, since they are used if Orc is
18 # Note that this file defines BUILT_SOURCES, so any later usage
19 # of BUILT_SOURCES in the Makefile.am that includes this file
24 EXTRA_DIST
= $(ORC_SOURCE
).orc
26 ORC_NODIST_SOURCES
= tmp-orc.c
$(ORC_SOURCE
).h
27 BUILT_SOURCES
= tmp-orc.c
$(ORC_SOURCE
).h
30 orc-update
: tmp-orc.c
$(ORC_SOURCE
).h
31 cp tmp-orc.c
$(srcdir)/$(ORC_SOURCE
)-dist.c
32 cp
$(ORC_SOURCE
).h
$(srcdir)/$(ORC_SOURCE
)-dist.h
38 tmp-orc.c
: $(srcdir)/$(ORC_SOURCE
).orc
39 $(orcc_v_gen
)$(ORCC
) $(ORCC_FLAGS
) --inline
--implementation
-o tmp-orc.c
$(srcdir)/$(ORC_SOURCE
).orc
41 $(ORC_SOURCE
).h
: $(srcdir)/$(ORC_SOURCE
).orc
42 $(orcc_v_gen
)$(ORCC
) $(ORCC_FLAGS
) --inline
--header
-o
$(ORC_SOURCE
).h
$(srcdir)/$(ORC_SOURCE
).orc
44 tmp-orc.c
: $(srcdir)/$(ORC_SOURCE
).orc
45 $(cp_v_gen
)cp
$(srcdir)/$(ORC_SOURCE
)-dist.c tmp-orc.c
47 $(ORC_SOURCE
).h
: $(srcdir)/$(ORC_SOURCE
).orc
48 $(cp_v_gen
)cp
$(srcdir)/$(ORC_SOURCE
)-dist.h
$(ORC_SOURCE
).h
51 clean-local
: clean-orc
54 rm -f tmp-orc.c
$(ORC_SOURCE
).h
56 dist-hook
: dist-hook-orc
58 dist-hook-orc
: tmp-orc.c
$(ORC_SOURCE
).h
60 cmp
-s tmp-orc.c
$(srcdir)/$(ORC_SOURCE
)-dist.c || \
61 cp tmp-orc.c
$(srcdir)/$(ORC_SOURCE
)-dist.c
62 cmp
-s
$(ORC_SOURCE
).h
$(srcdir)/$(ORC_SOURCE
)-dist.h || \
63 cp
$(ORC_SOURCE
).h
$(srcdir)/$(ORC_SOURCE
)-dist.h
64 cp
-p
$(srcdir)/$(ORC_SOURCE
)-dist.c
$(distdir
)/
65 cp
-p
$(srcdir)/$(ORC_SOURCE
)-dist.h
$(distdir
)/