]> git.proxmox.com Git - mirror_frr.git/blob - solaris/Makefile.in
zebra: Fixup spaces/tabs issue found by CI in rt_socket.c
[mirror_frr.git] / solaris / Makefile.in
1 # Solaris packages automake file
2
3 # XXX This file uses GNU make extensions.
4
5 .PHONY: packages all all-files
6
7 all: all-files
8
9 prefix = @prefix@
10 exec_prefix = @exec_prefix@
11 bindir = @bindir@
12 sbindir = @sbindir@
13 libexecdir = @libexecdir@
14 datarootdir = @datarootdir@
15 datadir = @datadir@
16 sysconfdir = @sysconfdir@
17 sharedstatedir = @sharedstatedir@
18 localstatedir = @localstatedir@
19 libdir = @libdir@
20 includedir = @includedir@
21 infodir = @infodir@
22 mandir = @mandir@
23 frr_statedir = @frr_statedir@
24
25 builddir = @builddir@
26 srcdir = @srcdir@
27 top_builddir = @top_builddir@
28 top_srcdir = @top_srcdir@
29 abs_builddir = @abs_builddir@
30 abs_srcdir = @abs_srcdir@
31 abs_top_builddir = @abs_top_builddir@
32 abs_top_srcdir = @abs_top_srcdir@
33
34 enable_user = @enable_user@
35 enable_group = @enable_group@
36 enable_vty_group = @enable_vty_group@
37
38 PACKAGE_NAME = @PACKAGE_NAME@
39 PACKAGE_TARNAME = @PACKAGE_TARNAME@
40 PACKAGE_VERSION = @PACKAGE_VERSION@
41 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
42 CONFDATE = @CONFDATE@
43
44 host_cpu = @host_cpu@
45 host_os = @host_os@
46
47 SED = @SED@
48 MAKE = @MAKE@
49
50 # the names of the various subpackages, and some convenient
51 # derived variables.
52 pkg_names = daemons dev doc libs smf
53 pkg_frr_daemons = zebra bgpd ospfd ospf6d ripd ripngd
54 pkg_name_rev = $(PACKAGE_VERSION)-$(CONFDATE)-$(host_os)-$(host_cpu)
55 pkg_depends = $(pkg_names:%=depend.%)
56 pkg_packages = $(pkg_names:%=@PACKAGE_TARNAME@-%-$(pkg_name_rev).pkg)
57 pkg_pkginfos = $(pkg_names:%=pkginfo.%.full)
58 pkg_prototypes = $(pkg_names:%=prototype.%)
59 pkg_manifests = frr.xml
60
61 # pkgmk variable substitutions wont grok ${variable} in prototype
62 # file, so we cant let autoconf generate the file sadly
63 # wish automake would just provide a template for this
64 edit = $(SED) \
65 -e 's,@prefix\@,$(prefix),g' \
66 -e 's,@exec_prefix,$(exec_prefix),g' \
67 -e 's,@bindir\@,$(bindir),g' \
68 -e 's,@sbindir\@,$(sbindir),g' \
69 -e 's,@libexecdir\@,$(libexecdir),g' \
70 -e 's,@datadir\@,$(datadir),g' \
71 -e 's,@sysconfdir\@,$(sysconfdir),g' \
72 -e 's,@sharedstatedir\@,$(sharedstatedir),g' \
73 -e 's,@localstatedir\@,$(localstatedir),g' \
74 -e 's,@libdir\@,$(libdir),g' \
75 -e 's,@includedir\@,$(includedir),g' \
76 -e 's,@infodir\@,$(infodir),g' \
77 -e 's,@mandir\@,$(mandir),g' \
78 -e 's,@enable_user\@,$(enable_user),g' \
79 -e 's,@enable_group\@,$(enable_group),g' \
80 -e 's,@enable_vty_group\@,$(enable_vty_group),g' \
81 -e 's,@frr_statedir\@,$(frr_statedir),g' \
82 -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \
83 -e 's,[@]PACKAGE_TARNAME[@],$(PACKAGE_TARNAME),g' \
84 -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
85 -e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
86 -e 's,[@]CONFDATE[@],$(CONFDATE),g' \
87 -e 's,[@]host_cpu[@],$(host_cpu),g' \
88 -e 's,[@]host_os[@],$(host_os),g'
89
90 # common options for pkgmk
91 pkg_make_vars = exec_prefix=$(exec_prefix) prefix=$(prefix) \
92 builddir=$(builddir) srcdir=$(srcdir) \
93 top_builddir=$(top_builddir) top_srcdir=$(top_srcdir) \
94 abs_builddir=$(abs_builddir) abs_srcdir=$(abs_srcdir) \
95 abs_top_builddir=$(abs_top_builddir) abs_top_srcdir=$(abs_top_srcdir)
96
97 # pkgmk: write the package to spool in build dir, to avoid root dependencies
98 pkg_make = pkgmk -o -d $(abs_builddir) \
99 -f $< DESTDIR="$(DESTDIR)/" $(pkg_make_vars)
100
101 # pkgtrans: write a pkg file stream, shame we cant pipe directly to it from
102 # pkgmk..
103 pkg_trans = pkgtrans -s $(abs_builddir) "$(abs_builddir)/$@"
104
105 # pkgmk can only cope with a single pkginfo, cant 'stack' various
106 # pkginfo template files and a package specific pkginfo file in the prototype
107 # Create the package specific template here, and create the full pkginfo
108 # by cating this and the common pkginfo.tmpl together.
109 pkginfo.tmpl: $(srcdir)/pkginfo.tmpl.in Makefile
110 rm -f $@
111 $(edit) $< > $@
112
113 pkginfo.%.tmpl: $(srcdir)/pkginfo.%.tmpl.in Makefile
114 rm -f $@
115 $(edit) $< > $@
116
117 pkginfo.%.full: pkginfo.%.tmpl pkginfo.tmpl Makefile
118 cat pkginfo.tmpl pkginfo.$*.tmpl > $@
119
120 # use 'edit' above to transform prototype.in to pkgmk acceptable prototype
121 prototype.%: $(srcdir)/prototype.%.in Makefile
122 rm -f $@
123 $(edit) $< > $@
124
125 # use edit to construct the SMF manifest files
126 %.xml: $(srcdir)/%.xml.in Makefile
127 rm -f $@
128 $(edit) $< > $@
129 # use edit to construct the depend files
130 depend.%: $(srcdir)/depend.%.in Makefile
131 rm -f $@
132 $(edit) $< > $@
133
134 # method file (bit like init script)
135 frr.init: $(srcdir)/frr.init.in Makefile
136 rm -f $@
137 $(edit) $< > $@
138
139 # construct the pkg
140 $(PACKAGE_TARNAME)-%-$(pkg_name_rev).pkg: prototype.% \
141 depend.% frr.init pkginfo.%.full
142 ($(pkg_make) && \
143 $(pkg_trans) "FRR$*")
144
145 %.pkg.gz : %.pkg
146 (gzip -c $< > $@)
147
148 pkg-root-install:
149 (cd $(top_builddir) && \
150 $(MAKE) DESTDIR=$(abs_builddir)/frr-root install)
151
152 packages: $(pkg_packages)
153
154 all-files: $(pkg_pkginfos) pkginfo.tmpl $(pkg_prototypes) \
155 $(pkg_manifests) $(pkg_depends) frr.init