]> git.proxmox.com Git - mirror_frr.git/blame - solaris/Makefile.in
zebra: Fixup spaces/tabs issue found by CI in rt_socket.c
[mirror_frr.git] / solaris / Makefile.in
CommitLineData
1b414a17 1# Solaris packages automake file
61502cb7
GT
2
3# XXX This file uses GNU make extensions.
1b414a17 4
e3863245
DL
5.PHONY: packages all all-files
6
7all: all-files
8
9prefix = @prefix@
10exec_prefix = @exec_prefix@
11bindir = @bindir@
12sbindir = @sbindir@
13libexecdir = @libexecdir@
14datarootdir = @datarootdir@
15datadir = @datadir@
16sysconfdir = @sysconfdir@
17sharedstatedir = @sharedstatedir@
18localstatedir = @localstatedir@
19libdir = @libdir@
20includedir = @includedir@
21infodir = @infodir@
22mandir = @mandir@
23frr_statedir = @frr_statedir@
24
25builddir = @builddir@
26srcdir = @srcdir@
27top_builddir = @top_builddir@
28top_srcdir = @top_srcdir@
29abs_builddir = @abs_builddir@
30abs_srcdir = @abs_srcdir@
31abs_top_builddir = @abs_top_builddir@
32abs_top_srcdir = @abs_top_srcdir@
33
34enable_user = @enable_user@
35enable_group = @enable_group@
36enable_vty_group = @enable_vty_group@
37
38PACKAGE_NAME = @PACKAGE_NAME@
39PACKAGE_TARNAME = @PACKAGE_TARNAME@
40PACKAGE_VERSION = @PACKAGE_VERSION@
41PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
42CONFDATE = @CONFDATE@
43
44host_cpu = @host_cpu@
45host_os = @host_os@
46
47SED = @SED@
48MAKE = @MAKE@
1b414a17 49
50# the names of the various subpackages, and some convenient
51# derived variables.
65c1cafd 52pkg_names = daemons dev doc libs smf
7f8512d9 53pkg_frr_daemons = zebra bgpd ospfd ospf6d ripd ripngd
e3863245 54pkg_name_rev = $(PACKAGE_VERSION)-$(CONFDATE)-$(host_os)-$(host_cpu)
4bf6461e
JJ
55pkg_depends = $(pkg_names:%=depend.%)
56pkg_packages = $(pkg_names:%=@PACKAGE_TARNAME@-%-$(pkg_name_rev).pkg)
57pkg_pkginfos = $(pkg_names:%=pkginfo.%.full)
58pkg_prototypes = $(pkg_names:%=prototype.%)
7f8512d9 59pkg_manifests = frr.xml
1b414a17 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
4bf6461e 64edit = $(SED) \
1b414a17 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' \
7f8512d9 81 -e 's,@frr_statedir\@,$(frr_statedir),g' \
e3863245
DL
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' \
84c5337e
DL
87 -e 's,[@]host_cpu[@],$(host_cpu),g' \
88 -e 's,[@]host_os[@],$(host_os),g'
1b414a17 89
90# common options for pkgmk
e3863245
DL
91pkg_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)
1b414a17 96
97# pkgmk: write the package to spool in build dir, to avoid root dependencies
e3863245 98pkg_make = pkgmk -o -d $(abs_builddir) \
1b414a17 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..
e3863245 103pkg_trans = pkgtrans -s $(abs_builddir) "$(abs_builddir)/$@"
1b414a17 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.
109pkginfo.tmpl: $(srcdir)/pkginfo.tmpl.in Makefile
110 rm -f $@
111 $(edit) $< > $@
112
113pkginfo.%.tmpl: $(srcdir)/pkginfo.%.tmpl.in Makefile
114 rm -f $@
115 $(edit) $< > $@
116
f3ff1554 117pkginfo.%.full: pkginfo.%.tmpl pkginfo.tmpl Makefile
1b414a17 118 cat pkginfo.tmpl pkginfo.$*.tmpl > $@
119
120# use 'edit' above to transform prototype.in to pkgmk acceptable prototype
121prototype.%: $(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) $< > $@
e24f0638
PJ
129# use edit to construct the depend files
130depend.%: $(srcdir)/depend.%.in Makefile
131 rm -f $@
132 $(edit) $< > $@
1b414a17 133
134# method file (bit like init script)
7f8512d9 135frr.init: $(srcdir)/frr.init.in Makefile
1b414a17 136 rm -f $@
137 $(edit) $< > $@
138
139# construct the pkg
e3863245 140$(PACKAGE_TARNAME)-%-$(pkg_name_rev).pkg: prototype.% \
7f8512d9 141 depend.% frr.init pkginfo.%.full
1b414a17 142 ($(pkg_make) && \
7f8512d9 143 $(pkg_trans) "FRR$*")
1b414a17 144
1b414a17 145%.pkg.gz : %.pkg
146 (gzip -c $< > $@)
147
1b414a17 148pkg-root-install:
149 (cd $(top_builddir) && \
7f8512d9 150 $(MAKE) DESTDIR=$(abs_builddir)/frr-root install)
1b414a17 151
152packages: $(pkg_packages)
153
e3863245
DL
154all-files: $(pkg_pkginfos) pkginfo.tmpl $(pkg_prototypes) \
155 $(pkg_manifests) $(pkg_depends) frr.init