* Evoral: first successful read from Sequence
[ardour.git] / libs / gtkmm2 / build_shared / Makefile_gensrc.am_fragment
1 ## Copyright (c) 2001
2 ## The gtkmm development team.
3 ##
4 ## **** Common rules for inclusion in Makefile.am ****
5 ## Included from something/src/Makefile.am
6 ##
7 ## Used variable:       Example content:
8 ##
9 ## sublib_name          = gdkmm
10 ## sublib_namespace     = Gdk
11
12 ## files_defs           = gdk.defs gdk_pixbuf.defs
13
14
15 tools_dir       = $(top_srcdir)/tools
16 tools_dir_m4= $(top_srcdir)/tools/m4
17 tools_dir_pm= $(top_srcdir)/tools/pm
18
19 gensrc_destdir = $(srcdir)/../$(sublib_name)
20 stamp_dir = $(srcdir)/.stamps
21
22 include $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment
23 tools_m4        = $(files_tools_m4:%.m4=$(tools_dir_m4)/%.m4)
24 # tools_pm      = $(files_tools_pm:%.pm=$(tools_dir_pm)/%.pm)
25
26 include $(srcdir)/../src/Makefile_list_of_hg.am_fragment
27 files_all_ccg   = $(files_all_hg:%.hg=%.ccg)
28 files_h         = $(files_all_hg:%.hg=$(gensrc_destdir)/%.h)
29 files_cc        = $(files_all_hg:%.hg=$(gensrc_destdir)/%.cc)
30 files_stamp     = $(files_all_hg:%.hg=$(stamp_dir)/stamp-%)
31
32 #Installed gmmproc stuff, from glibmm:
33 gmmproc_path = $(GMMPROC)
34 gmmproc_dir = $(GMMPROC_DIR)
35
36 # We use our own m4 and pm files as well as the ones installed by gtkmm:
37 # Our override m4 include seems to need to be before the default one.
38 gmmproc_args    = -I $(tools_dir_m4) --defs $(srcdir)
39 run_gmmproc     = $(gmmproc_path) $(gmmproc_args)
40
41 gen_wrap_init_path = $(gmmproc_dir)/generate_wrap_init.pl
42 gen_wrap_init_args = --namespace=$(sublib_namespace) --parent_dir=$(sublib_parentdir)
43 run_gen_wrap_init  = $(gen_wrap_init_path) $(gen_wrap_init_args)
44
45 EXTRA_DIST      = Makefile_list_of_hg.am_fragment \
46                   $(files_defs) $(files_all_hg) $(files_all_ccg)
47
48
49 $(stamp_dir)/stamp-%: %.hg %.ccg $(tools_m4) $(files_defs)
50         $(run_gmmproc) $(notdir $*) $(srcdir) $(gensrc_destdir)
51         @echo 'timestamp' > $@
52
53 sublib_srcdir           = $(srcdir)/../src
54 files_hg_with_path      = $(patsubst %.hg,$(sublib_srcdir)/%.hg,$(files_all_hg))
55
56 $(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_path) $(files_hg_with_path)
57         $(run_gen_wrap_init) $(files_all_hg:%.hg=$(srcdir)/%.hg) >$@
58
59 create-stamp-dir:
60         @(test -d $(stamp_dir) || mkdir $(stamp_dir))
61
62 if MAINTAINER_MODE
63 all-local: create-stamp-dir $(files_stamp) $(gensrc_destdir)/wrap_init.cc
64 endif
65
66 maintainer-clean-local:
67         rm -rf $(stamp_dir)