Makefile-files (2984B)
1 ## -*- makefile -*- 2 3 ## Copyright (C) 2015 Enrico Scholz <enrico.scholz@ensc.de> 4 ## 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) 8 ## any later version. 9 ## 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. 14 ## 15 ## You should have received a copy of the GNU General Public License 16 ## along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 # 'make distcheck' does not work because 'pkgconfig systemd 19 # --variable=...' returns paths outside of '${prefix}'; override 20 # those variable for 'distcheck' here... 21 AM_DISTCHECK_CONFIGURE_FLAGS += \ 22 SYSTEMD_TMPFILESDIR='$${prefix}/lib/tmpfiles.d' \ 23 SYSTEMD_SYSCTLDIR='$${prefix}/lib/sysctl.d' \ 24 SYSTEMD_UNITDIR='$${prefix}/lib/systemd/system' \ 25 SYSTEMD_GENERATORDIR='$${prefix}/lib/systemd/systemd-generator' 26 27 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ 28 systemd/systemd-start \ 29 systemd/systemd-stop 30 31 tmpfilesdir = @SYSTEMD_TMPFILESDIR@ 32 sysctldir = @SYSTEMD_SYSCTLDIR@ 33 systemdunitdir = @SYSTEMD_UNITDIR@ 34 systemdgeneratordir = @SYSTEMD_GENERATORDIR@ 35 36 tmpfiles_gen_DTA = .systemd/tmpfiles/90-util-vserver.conf 37 sysctl_gen_DTA = .systemd/sysctl/90-util-vserver.conf 38 systemdunit_gen_DTA = \ 39 systemd/vserver@.service \ 40 systemd/vprocunhide.service \ 41 systemd/util-vserver.service 42 systemdunit_src_DTA = \ 43 systemd/vserver.target \ 44 systemd/vserver-mark@.target 45 46 systemd_systemd_vserver_generator_SOURCES = \ 47 systemd/systemd-vserver-generator.c 48 49 systemd_pkglibexec_SCRPTS = \ 50 systemd/systemd-start \ 51 systemd/systemd-stop 52 53 EXTRA_DIST += \ 54 systemd/util-vserver.tmpfiles.pathsubst \ 55 systemd/util-vserver.sysctl.pathsubst \ 56 systemd/vserver@.service.pathsubst \ 57 systemd/vserver@.service.pathsubst \ 58 systemd/vprocunhide.service.pathsubst \ 59 systemd/util-vserver.service.pathsubst \ 60 ${systemdunit_src_DTA} \ 61 ${systemd_pkglibexec_SCRPTS} 62 63 if HAVE_SYSTEMD 64 65 tmpfiles_DATA = ${tmpfiles_gen_DTA} 66 sysctl_DATA = ${sysctl_gen_DTA} 67 systemdunit_DATA = \ 68 ${systemdunit_gen_DTA} \ 69 ${systemdunit_src_DTA} 70 71 pkglibexec_SCRIPTS += \ 72 ${systemd_pkglibexec_SCRPTS} 73 74 systemdgenerator_PROGRAMS = \ 75 systemd/systemd-vserver-generator 76 77 DIETPROGS += \ 78 systemd/systemd-vserver-generator 79 80 endif 81 82 CLEANFILES += \ 83 systemd/util-vserver.sysctl \ 84 systemd/util-vserver.tmpfiles \ 85 ${systemdunit_gen_DTA} \ 86 ${tmpfiles_gen_DTA} \ 87 ${sysctl_gen_DTA} 88 89 .systemd/tmpfiles/90-util-vserver.conf: systemd/.util-vserver.tmpfiles.pathsubst.stamp 90 @mkdir -p ${@D} 91 cat ${<D}/util-vserver.tmpfiles > $@ 92 93 .systemd/sysctl/90-util-vserver.conf: systemd/.util-vserver.sysctl.pathsubst.stamp 94 @mkdir -p ${@D} 95 cat ${<D}/util-vserver.sysctl > $@ 96 97 ${systemdunit_gen_DTA}:systemd/%: \ 98 systemd/.%.pathsubst.stamp