use the new VC_ENABLE_API_V13OBS define
[util-vserver.git] / util-vserver / Makefile.am
index 28f7634..3f7370c 100644 (file)
@@ -1,6 +1,6 @@
 ## $Id$
 
-# Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+# Copyright (C) 2003,2004,2005,2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
 ACLOCAL_AMFLAGS                =  -I m4
 SUBDIRS                        =  . distrib
 
-CVS2CL_AMFLAGS         =  $(CVS2CL_TAG) -U cvsusers.map --show-dead
+CVS2CL_AMFLAGS         =  $(CVS2CL_TAG) -U cvsusers.map --show-dead -S --no-wrap
 CVS2CL_ALLFLAGS        :=  $(CVS2CL_AMFLAGS) $(CVS2CL_FLAGS)
 
 confdir                        =  $(sysconfdir)/vservers
@@ -53,25 +53,40 @@ sysconf_DATA =
 
 DIETPROGS =            $(LIBENSCVECTOR_DIET)
 
-BUILT_SOURCES =                pathconfig.h linuxvirtual.h \
+BUILT_SOURCES =                pathconfig.h \
                        .fixups
 
 man_MANS =
 
-kernel_HDRS =          kernel/context.h \
-                       kernel/cvirt.h \
-                       kernel/debug.h \
-                       kernel/dlimit.h \
-                       kernel/inode.h \
-                       kernel/legacy.h \
-                       kernel/limit.h \
-                       kernel/namespace.h \
-                       kernel/network.h \
-                       kernel/sched.h \
-                       kernel/signal.h \
-                       kernel/switch.h \
+kernel_HDRS =                                  \
+                       kernel/context.h        \
+                       kernel/context_cmd.h    \
+                       kernel/cvirt.h          \
+                       kernel/cvirt_cmd.h      \
+                       kernel/cvirt_def.h      \
+                       kernel/debug.h          \
+                       kernel/debug_cmd.h      \
+                       kernel/dlimit.h         \
+                       kernel/dlimit_cmd.h     \
+                       kernel/inode.h          \
+                       kernel/inode_cmd.h      \
+                       kernel/legacy.h         \
+                       kernel/limit.h          \
+                       kernel/limit_cmd.h      \
+                       kernel/limit_def.h      \
+                       kernel/namespace.h      \
+                       kernel/namespace_cmd.h  \
+                       kernel/network.h        \
+                       kernel/network_cmd.h    \
+                       kernel/sched.h          \
+                       kernel/sched_cmd.h      \
+                       kernel/sched_def.h      \
+                       kernel/signal_cmd.h     \
+                       kernel/switch.h         \
                        kernel/xid.h
 
+
+
 EXTRA_PROGRAMS =
 EXTRA_DIST =           pathconfig.h.pathsubst \
                        util-vserver.spec \
@@ -114,23 +129,16 @@ endif
 VSERVER_LDADDS =       $(LIBVSERVER) $(DIET_COMPAT_LDADDS)
 
 silent.%:              FORCE
-                       @t=$$(mktemp /tmp/build.XXXXXX) && \
-                       $(MAKE) '$*' -s 2>$$t >/dev/null && \
-                       ( cat $$t | \
-                               grep -v ': In function' | \
-                               grep -v 'your code still has assertions enabled' | \
-                               grep -v ' is obsoleted' | \
-                               grep -v 'warning: #warning'; \
-                               rm -f $$t || : )
-
-
-linuxvirtual.h:
-if ENSC_ENABLE_INTERNAL_HEADERS
-                       ln -sf '$(top_srcdir)/lib/virtual.h' '$@'
-else
-                       ln -sf '$(kernelincludedir)/linux/virtual.h' '$@' && test -e '$@' || \
-                       ln -sf '$(top_srcdir)/lib/virtual.h' '$@'
-endif
+                       @t=$$($(MKTEMP) -d /tmp/build.XXXXXX) && \
+                       trap "rm -rf $$t" EXIT && \
+                       mkfifo $$t/fifo && \
+                       ( grep --line-buffered -v \
+                                    -e ': In function' \
+                                    -e 'your code still has assertions enabled' \
+                                    -e ' is obsoleted' \
+                                    -e 'warning: #warning' <$$t/fifo & ) && \
+                       exec 2>$$t/fifo && \
+                       $(MAKE) '$*' -s >/dev/null
 
 pathsubst_RULES =      s!@'PKGLIBDIR'@!$(pkglibdir)!g; \
                        s!@'LEGACYDIR'@!$(legacydir)!g; \
@@ -138,6 +146,7 @@ pathsubst_RULES =   s!@'PKGLIBDIR'@!$(pkglibdir)!g; \
                        s!@'CONFDIR'@!$(confdir)!g; \
                        s!@'SYSCONFDIR'@!$(sysconfdir)!g; \
                        s!@'PKGSTATEDIR'@!$(pkgstatedir)!g; \
+                       s!@'PKGCACHEDIR'@!$(pkgcachedir)!g; \
                        s!@'PKGSTATEREVDIR'@!$(pkgstaterevdir)!g; \
                        s!@'VSERVERDIR'@!$(vserverdir)!g; \
                        s!@'VSERVERPKGDIR'@!$(vserverpkgdir)!g; \
@@ -174,6 +183,7 @@ pathconfig.h:               .pathconfig.h.pathsubst.stamp
                        @chmod a-w '$*'
                        @touch '$@'
 
+pkgcachedir =          $(localstatedir)/cache/vservers
 pkgstatedir =          $(localstatedir)/run/vservers
 pkgstaterevdir =       $(confdefaultsdir)/run.rev
 vserverpkgdir =                $(vserverdir)/.pkg
@@ -190,10 +200,12 @@ update-doc:               doc
 install-data-hook:     install-fix-script-paths install-create-dirs
 
 install-create-dirs:
-                       $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir) $(DESTDIR)$(pkgstatedir).rev $(DESTDIR)$(vshelperstatedir)
-                       $(mkinstalldirs) -m 755 $(DESTDIR)$(confdefaultsdir)
-                       f=$(DESTDIR)$(confdefaultsdir)/vdirbase; test -e "$$f" || ln -sf '$(vserverdir)'      "$$f"
-                       f=$(DESTDIR)$(pkgstaterevdir);           test -e "$$f" || ln -sf '$(pkgstatedir).rev' "$$f"
+                       $(mkinstalldirs) -m 0755 $(DESTDIR)$(pkgstatedir) $(DESTDIR)$(pkgstatedir).rev $(DESTDIR)$(vshelperstatedir)
+                       $(mkinstalldirs) -m 0700 $(DESTDIR)$(pkgcachedir)
+                       $(mkinstalldirs) -m 0755 $(DESTDIR)$(confdefaultsdir)
+                       f=$(DESTDIR)$(confdefaultsdir)/vdirbase;  test -e "$$f" || ln -sf '$(vserverdir)'      "$$f"
+                       f=$(DESTDIR)$(confdefaultsdir)/cachebase; test -e "$$f" || ln -sf '$(pkgcachedir)'     "$$f"
+                       f=$(DESTDIR)$(pkgstaterevdir);            test -e "$$f" || ln -sf '$(pkgstatedir).rev' "$$f"
 
 install-fix-script-paths:
                        test "/usr/lib/util-vserver" = "$(pkglibdir)" || \
@@ -213,6 +225,7 @@ _install-vshelperlink:
 _install-vserverdir:
                        $(mkinstalldirs) $(DESTDIR)$(vserverdir) $(DESTDIR)$(vserverpkgdir)
 
+
 .fixups:               config.status util-vserver.spec
                        chmod a-w util-vserver.spec
                        touch $@
@@ -244,5 +257,7 @@ include $(top_srcdir)/m4/gpgsig.am
 include $(top_srcdir)/m4/validate.am
 include $(top_srcdir)/m4/changelog.am
 include $(top_srcdir)/m4/pkgconfig.am
+include $(top_srcdir)/m4/libsel.am
+include $(top_srcdir)/m4/install-notify.am
 
 .PHONY:                FORCE update-doc