| 1 |
# Copyright (C) 1996, 1997, 1999, 2004, 2012 Free Software Foundation, Inc. |
| 2 |
# Written by Michael I. Bushnell, p/BSG. |
| 3 |
# |
| 4 |
# This file is part of the GNU Hurd. |
| 5 |
# |
| 6 |
# The GNU Hurd is free software; you can redistribute it and/or |
| 7 |
# modify it under the terms of the GNU General Public License as |
| 8 |
# published by the Free Software Foundation; either version 2, or (at |
| 9 |
# your option) any later version. |
| 10 |
# |
| 11 |
# The GNU Hurd is distributed in the hope that it will be useful, but |
| 12 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
# General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU General Public License |
| 17 |
# along with this program; if not, write to the Free Software |
| 18 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. |
| 19 |
|
| 20 |
dir := config |
| 21 |
makemode := misc |
| 22 |
|
| 23 |
# Files that are copied verbatim to $(sysconfdir). But we never want |
| 24 |
# to overwrite an existing file. Print a warning for such files. |
| 25 |
# If override_conf is set to `t' then install even on top of existing |
| 26 |
# files. |
| 27 |
SYSCONFFILES = motd ttys |
| 28 |
|
| 29 |
installed_conf = $(addprefix $(sysconfdir)/,$(SYSCONFFILES)) |
| 30 |
|
| 31 |
LOGINDOTS = .bash_login .bashrc .hushlogin .profile README |
| 32 |
installed_logins = $(addprefix $(sysconfdir)/login/,$(LOGINDOTS)) |
| 33 |
|
| 34 |
FORCE: |
| 35 |
|
| 36 |
ifeq ($(override_conf),t) |
| 37 |
$(installed_conf): FORCE |
| 38 |
$(installed_logins): FORCE |
| 39 |
endif |
| 40 |
|
| 41 |
include ../Makeconf |
| 42 |
|
| 43 |
install: $(DESTDIR)$(sysconfdir) $(DESTDIR)$(sysconfdir)/login \ |
| 44 |
$(addprefix $(DESTDIR),$(installed_conf)) $(addprefix $(DESTDIR),$(installed_logins)) |
| 45 |
|
| 46 |
$(DESTDIR)$(sysconfdir)/login: %: |
| 47 |
mkdir -p $@ |
| 48 |
|
| 49 |
$(addprefix $(DESTDIR),$(installed_logins)): $(DESTDIR)$(sysconfdir)/login/%: login-% |
| 50 |
$(INSTALL_DATA) $< $(DESTDIR)$(sysconfdir)/login/$* |
| 51 |
|
| 52 |
$(addprefix $(DESTDIR),$(installed_conf)): $(DESTDIR)$(sysconfdir)/%: % |
| 53 |
$(INSTALL_DATA) $< $(DESTDIR)$(sysconfdir)/$* |
| 54 |
|
| 55 |
cleantarg += ttys |
| 56 |
ttys: ttys.in |
| 57 |
sed -e 's:@libexecdir@:'$(libexecdir)':g' < $< > $@ |