3 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 ACLOCAL_AMFLAGS = -I m4
23 CVS2CL_AMFLAGS = $(CVS2CL_TAG) -U cvsusers.map
24 CVS2CL_ALLFLAGS := $(CVS2CL_AMFLAGS) $(CVS2CL_FLAGS)
26 sysvdir = $(sysconfdir)/init.d
27 confdir = $(sysconfdir)/vservers
29 include_HEADERS = $(lib_HDRS)
30 noinst_HEADERS = $(src_HDRS) $(lib_XHDRS) compat.h
32 lib_LIBRARIES = $(lib_lib_LIBS)
33 #lib_LTLIBRARIES = $(lib_lib_LTLIBS)
35 pkglib_SCRIPTS = $(scripts_SCRPTS)
36 pkglib_DATA = $(scriptscfg_DATA) $(scripts_DTA)
37 pkglib_PROGRAMS = $(src_pkglib_PRGS)
39 sbin_SCRIPTS = $(scripts_PRGS)
40 sbin_PROGRAMS = $(src_sbin_PRGS)
41 noinst_PROGRAMS = $(test_PRGS)
43 sysv_SCRIPTS = $(sysv_SCRPTS)
44 sysconf_DATA = $(sysv_CFG)
46 DIETPROGS = $(src_DIETPROGS) $(tests_DIETPROGS)
48 BUILT_SOURCES = linuxcaps.h pathconfig.h linuxvirtual.h
50 man_MANS = $(man_DATMAN)
52 EXTRA_PROGRAMS = $(src_EXTRA_PROGS)
53 EXTRA_DIST = $(sysv_XTRAS) $(sysv_CFG) \
54 $(doc_DAT) $(man_DATMAN) \
55 $(scripts_SCRPTS) $(scripts_PRGS) $(scripts_XTRAS) \
56 pathconfig.h.pathsubst \
58 m4/ensc_cflags.m4 m4/ensc_fpicsyscall.m4 \
59 m4/ensc_cxxcompiler.m4 \
62 AM_CPPFLAGS = -I $(top_srcdir)/lib -D _GNU_SOURCE
64 CLEANFILES = $(sysv_GENSCRPTS) $(scripts_GENSCRPTS) $(BUILT_SOURCES) \
65 .*.pathsubst.stamp */.*.pathsubst.stamp \
66 linuxcaps.h pathconfig.h
68 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = $(src_OPTIONS_EXEMPT) \
69 $(scripts_OPTIONS_EXEMPT) \
70 $(sysv_OPTIONS_EXEMPT)
75 DIET_CC := $(DIET) $(DIET_FLAGS) $(CC)
79 ln -sf ${kernelincludedir}/linux/capability.h linuxcaps.h
82 ln -sf '$(kernelincludedir)/linux/virtual.h' '$@' && test -e '$@' || \
83 ln -sf '$(top_srcdir)/lib/virtual.h' '$@'
85 pathsubst_RULES = s!@'PKGLIBDIR'@!$(pkglibdir)!g; \
86 s!@'SBINDIR'@!$(sbindir)!g; \
87 s!@'CONFDIR'@!$(confdir)!g; \
88 s!@'SYSCONFDIR'@!$(sysconfdir)!g; \
89 s!@'PKGSTATEDIR'@!$(pkgstatedir)!g; \
90 s!@'PACKAGE'@!$(PACKAGE)!g; \
91 s!@'PACKAGE_BUGREPORT'@!$(PACKAGE_BUGREPORT)!g; \
92 s!@'PACKAGE_NAME'@!$(PACKAGE_NAME)!g; \
93 s!@'PACKAGE_STRING'@!$(PACKAGE_STRING)!g; \
94 s!@'PACKAGE_TARNAME'@!$(PACKAGE_TARNAME)!g; \
95 s!@'PACKAGE_VERSION'@!$(PACKAGE_VERSION)!g; \
97 s!@'GREP'@!$(GREP)!g; \
99 s!@'MOUNT'@!$(MOUNT)!g; \
100 s!@'UMOUNT'@!$(UMOUNT)!g; \
101 s!@'NICE'@!$(NICE)!g; \
102 s!@'VCONFIG'@!$(VCONFIG)!g; \
105 pathconfig.h: .pathconfig.h.pathsubst.stamp
106 .%.pathsubst.stamp: %.pathsubst Makefile
107 @mkdir -p $$(dirname '$@')
108 @echo "sed -e '...' $*.pathsubst >$*"
109 @sed -e '$(pathsubst_RULES)' '$<' >'$@.tmp'
110 @if cmp -s '$@.tmp' '$*'; then \
111 echo "... no changes, reusing old version"; \
114 rm -f '$*'; mv '$@.tmp' '$*'; \
119 pkgstatedir = $(localstatedir)/run/vservers
121 $(INSTALL) -d -m755 $(DESTDIR)$(pkgstatedir)
124 $(DIETPROGS): LIBTOOL=$(LIBTOOL) --tag CC
126 $(addsuffix $(EXEEXT), $(DIETPROGS)) \
127 $(addsuffix $(OBJEXT), $(DIETPROGS)) \
131 include $(top_srcdir)/lib/Makefile-files
132 include $(top_srcdir)/src/Makefile-files
133 include $(top_srcdir)/doc/Makefile-files
134 include $(top_srcdir)/man/Makefile-files
135 include $(top_srcdir)/scripts/Makefile-files
136 include $(top_srcdir)/tests/Makefile-files
137 include $(top_srcdir)/sysv/Makefile-files
139 include $(top_srcdir)/m4/gpgsig.am
140 include $(top_srcdir)/m4/validate.am
141 include $(top_srcdir)/m4/changelog.am
142 include $(top_srcdir)/m4/pkgconfig.am