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)
34 pkglib_SCRIPTS = $(scripts_SCRPTS)
35 pkglib_DATA = $(scriptscfg_DATA) $(scripts_DTA)
36 pkglib_PROGRAMS = $(src_pkglib_PRGS)
38 sbin_SCRIPTS = $(scripts_PRGS)
39 sbin_PROGRAMS = $(src_sbin_PRGS)
40 noinst_PROGRAMS = $(test_PRGS)
42 sysv_SCRIPTS = $(sysv_SCRPTS)
43 sysconf_DATA = $(sysv_CFG)
45 DIETPROGS = $(src_DIETPROGS) $(tests_DIETPROGS)
47 BUILT_SOURCES = linuxcaps.h pathconfig.h linuxvirtual.h
49 man_MANS = $(man_DATMAN)
51 EXTRA_DIST = $(sysv_XTRAS) $(sysv_CFG) \
52 $(doc_DAT) $(man_DATMAN) \
53 $(scripts_SCRPTS) $(scripts_PRGS) $(scripts_XTRAS) \
54 pathconfig.h.pathsubst \
59 AM_CPPFLAGS = -I $(top_srcdir)/lib -D _GNU_SOURCE
60 AM_CFLAGS = -Wall -pedantic
62 CLEANFILES = $(sysv_GENSCRPTS) $(scripts_GENSCRPTS) $(BUILT_SOURCES) \
63 .*.pathsubst.stamp */.*.pathsubst.stamp \
64 linuxcaps.h pathconfig.h
66 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = $(src_OPTIONS_EXEMPT) \
67 $(scripts_OPTIONS_EXEMPT) \
68 $(sysv_OPTIONS_EXEMPT)
73 DIET_CC := $(DIET) $(DIET_FLAGS) $(CC)
77 ln -sf ${kernelincludedir}/linux/capability.h linuxcaps.h
80 ln -sf '$(kernelincludedir)/linux/virtual.h' '$@' && test -e '$@' || \
81 ln -sf '$(top_srcdir)/lib/virtual.h' '$@'
83 pathsubst_RULES = s!@'PKGLIBDIR'@!$(pkglibdir)!g; \
84 s!@'SBINDIR'@!$(sbindir)!g; \
85 s!@'CONFDIR'@!$(confdir)!g; \
86 s!@'SYSCONFDIR'@!$(sysconfdir)!g; \
87 s!@'PACKAGE'@!$(PACKAGE)!g; \
88 s!@'PACKAGE_BUGREPORT'@!$(PACKAGE_BUGREPORT)!g; \
89 s!@'PACKAGE_NAME'@!$(PACKAGE_NAME)!g; \
90 s!@'PACKAGE_STRING'@!$(PACKAGE_STRING)!g; \
91 s!@'PACKAGE_TARNAME'@!$(PACKAGE_TARNAME)!g; \
92 s!@'PACKAGE_VERSION'@!$(PACKAGE_VERSION)!g; \
94 s!@'GREP'@!$(GREP)!g; \
96 s!@'MOUNT'@!$(MOUNT)!g; \
97 s!@'UMOUNT'@!$(UMOUNT)!g; \
98 s!@'NICE'@!$(NICE)!g; \
99 s!@'VCONFIG'@!$(VCONFIG)!g; \
102 pathconfig.h: .pathconfig.h.pathsubst.stamp
103 .%.pathsubst.stamp: %.pathsubst Makefile
104 @mkdir -p $$(dirname '$@')
105 @echo "sed -e '...' $*.pathsubst >$*"
106 @sed -e '$(pathsubst_RULES)' '$<' >'$@.tmp'
107 @if cmp -s '$@.tmp' '$*'; then \
108 echo "... no changes, reusing old version"; \
111 rm -f '$*'; mv '$@.tmp' '$*'; \
117 $(INSTALL) -d -m755 $(DESTDIR)$(localstatedir)/run/vservers
120 $(addsuffix $(EXEEXT), $(DIETPROGS)) \
121 $(addsuffix $(OBJEXT), $(DIETPROGS)) \
125 include $(top_srcdir)/lib/Makefile-files
126 include $(top_srcdir)/src/Makefile-files
127 include $(top_srcdir)/doc/Makefile-files
128 include $(top_srcdir)/man/Makefile-files
129 include $(top_srcdir)/scripts/Makefile-files
130 include $(top_srcdir)/tests/Makefile-files
131 include $(top_srcdir)/sysv/Makefile-files
133 include $(top_srcdir)/m4/gpgsig.am
134 include $(top_srcdir)/m4/validate.am
135 include $(top_srcdir)/m4/changelog.am
136 include $(top_srcdir)/m4/pkgconfig.am