1 # Very basic and very simple Makefile. Maybe it would be nice to make it
2 # in ac/am.... but I'm too lazy ;)
8 CFLAGS = $(OPT_FLAGS) -Wall
12 PROFILEDIR = $(ETCDIR)/profile.d
13 ENVDIR = $(ETCDIR)/env.d
14 SHRCDIR = $(ETCDIR)/shrc.d
15 #########################################
17 BIN_FILES = joinpasswd update-fstab postshell
19 ETC_FILES = filesystems fstab group host.conf hosts motd mtab \
20 netgroup passwd profile protocols resolv.conf securetty \
21 services shells suid_profile
22 PROFILE_FILES = tmp-dir.csh tmp-dir.sh
23 ENV_FILES = EDITOR HISTFILESIZE HOME_ETC MAILCHECK MAILPATH \
24 NNTPSERVER ORGANIZATION TMOUT VISUAL
26 SOURCES = joinpasswd.c update-fstab.c postshell.c
27 CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
29 #########################################
32 joinpasswd: joinpasswd.o
33 update-fstab: update-fstab.o
34 postshell: postshell.o
37 $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
41 cd etc; rm -f $(CLEAN)
42 cd etc/profile.d; rm -f $(CLEAN)
45 $(INSTALL) -d $(DESTDIR)/$(SBINDIR)
46 $(INSTALL) -d $(DESTDIR)/$(ETCDIR)
47 $(INSTALL) -d $(DESTDIR)/$(PROFILEDIR)
48 $(INSTALL) -d $(DESTDIR)/$(ENVDIR)
49 $(INSTALL) $(BIN_FILES) $(DESTDIR)/$(SBINDIR)
50 cd etc; $(INSTALL) $(ETC_FILES) $(DESTDIR)/$(ETCDIR)
51 cd etc/profile.d; $(INSTALL) $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR)
52 cd etc/env.d; $(INSTALL) $(ENV_FILES) $(DESTDIR)/$(ENVDIR)
55 $(INSTALL) -d setup-$(VERSION)/etc/profile.d
56 $(INSTALL) -d setup-$(VERSION)/etc/env.d
57 $(INSTALL) -d setup-$(VERSION)/etc/shrc.d
58 $(INSTALL) $(DOCS) $(SOURCES) Makefile setup-$(VERSION)
59 for file in $(ETC_FILES); do \
60 $(INSTALL) -m644 etc/$$file setup-$(VERSION)/etc; \
62 for file in $(PROFILE_FILES); do \
63 $(INSTALL) -m755 etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
65 for file in $(ENV_FILES); do \
66 $(INSTALL) -m644 etc/env.d/$$file setup-$(VERSION)/etc/env.d; \
68 tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
69 rm -rf setup-$(VERSION)
75 cvs tag setup-$(shell echo $(VERSION) | tr . _)
78 lftp -c "open dropin; mput setup-$(VERSION).tar.bz2"