]> git.pld-linux.org Git - projects/setup.git/blame - Makefile
add etc/sub[ug]id
[projects/setup.git] / Makefile
CommitLineData
e040c79e
PG
1# Very basic and very simple Makefile. Maybe it would be nice to make it
2# in ac/am.... but I'm too lazy ;)
09a6c8fd 3#
84c111d1 4VERSION = 2.9.0
e040c79e
PG
5
6CC = gcc
41c11279 7OPT_FLAGS = -Wformat -Werror=format-security -fvar-tracking-assignments -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g2 -Wall
44b817d1 8CFLAGS = $(OPT_FLAGS) -Wall -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
2294cfdb 9INSTALL = install -p
e040c79e
PG
10SBINDIR = /sbin
11ETCDIR = /etc
924d1ea5 12PROFILEDIR = $(ETCDIR)/profile.d
6b9aeb8b 13ENVDIR = $(ETCDIR)/env.d
da90a628 14SHRCDIR = $(ETCDIR)/shrc.d
e040c79e
PG
15#########################################
16
5fe9e87e 17BIN_FILES = joinpasswd update-fstab postshell delpasswd
e040c79e 18DOCS = ChangeLog
eeb7627b 19ETC_FILES = filesystems fstab group host.conf hosts motd \
e040c79e 20 netgroup passwd profile protocols resolv.conf securetty \
2294cfdb 21 services shells suid_profile subgid subuid
268c1d80 22PROFILE_FILES = 00-tmp-dir.csh 00-tmp-dir.sh
df003d76
PG
23ENV_FILES = EDITOR HISTFILESIZE HOME_ETC MAILCHECK MAILPATH \
24 NNTPSERVER ORGANIZATION TMOUT VISUAL
56e0bb15 25SHRC_FILES = 256term.csh 256term.sh
e040c79e 26
5fe9e87e 27SOURCES = joinpasswd.c update-fstab.c postshell.c delpasswd.c
e040c79e
PG
28CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
29
30#########################################
09a6c8fd 31all: $(BIN_FILES)
e040c79e
PG
32
33joinpasswd: joinpasswd.o
09a6c8fd
ER
34update-fstab: update-fstab.o
35postshell: postshell.o
7848385d 36delpasswd: delpasswd.o
e040c79e
PG
37
38.c.o:
39 $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
40
41clean:
42 rm -f $(CLEAN)
43 cd etc; rm -f $(CLEAN)
44 cd etc/profile.d; rm -f $(CLEAN)
45
46install:
47 $(INSTALL) -d $(DESTDIR)/$(SBINDIR)
48 $(INSTALL) -d $(DESTDIR)/$(ETCDIR)
49 $(INSTALL) -d $(DESTDIR)/$(PROFILEDIR)
56e0bb15
JR
50 $(INSTALL) -d $(DESTDIR)/$(ENVDIR)
51 $(INSTALL) -d $(DESTDIR)/$(SHRCDIR)
e040c79e
PG
52 $(INSTALL) $(BIN_FILES) $(DESTDIR)/$(SBINDIR)
53 cd etc; $(INSTALL) $(ETC_FILES) $(DESTDIR)/$(ETCDIR)
eeb7627b 54 ln -sf /proc/self/mounts $(DESTDIR)/$(ETCDIR)/mtab
e040c79e 55 cd etc/profile.d; $(INSTALL) $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR)
6b9aeb8b 56 cd etc/env.d; $(INSTALL) $(ENV_FILES) $(DESTDIR)/$(ENVDIR)
56e0bb15 57 cd etc/shrc.d; $(INSTALL) $(SHRC_FILES) $(DESTDIR)/$(SHRCDIR)
e040c79e 58
2f596ea7 59dist: changelog clean
e040c79e 60 $(INSTALL) -d setup-$(VERSION)/etc/profile.d
42435ea0 61 $(INSTALL) -d setup-$(VERSION)/etc/env.d
da90a628 62 $(INSTALL) -d setup-$(VERSION)/etc/shrc.d
924d1ea5 63 $(INSTALL) $(DOCS) $(SOURCES) Makefile setup-$(VERSION)
e040c79e 64 for file in $(ETC_FILES); do \
2b812558 65 $(INSTALL) -m644 etc/$$file setup-$(VERSION)/etc; \
e040c79e
PG
66 done
67 for file in $(PROFILE_FILES); do \
2b812558 68 $(INSTALL) -m755 etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
e040c79e 69 done
42435ea0 70 for file in $(ENV_FILES); do \
2b812558 71 $(INSTALL) -m644 etc/env.d/$$file setup-$(VERSION)/etc/env.d; \
42435ea0 72 done
177aae6d
JR
73 for file in $(SHRC_FILES); do \
74 $(INSTALL) -m644 etc/shrc.d/$$file setup-$(VERSION)/etc/shrc.d; \
75 done
e040c79e
PG
76 tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
77 rm -rf setup-$(VERSION)
219e523d 78
2f596ea7
ER
79changelog:
80 ./changelog.sh
81
219e523d
ER
82tag:
83 cvs tag setup-$(shell echo $(VERSION) | tr . _)
0eeb79f1
ER
84
85distfiles: dist
86 lftp -c "open dropin; mput setup-$(VERSION).tar.bz2"
This page took 0.346591 seconds and 4 git commands to generate.