]> git.pld-linux.org Git - projects/setup.git/blame_incremental - Makefile
- add tag target
[projects/setup.git] / Makefile
... / ...
CommitLineData
1# Very basic and very simple Makefile. Maybe it would be nice to make it
2# in ac/am.... but I'm too lazy ;)
3#
4VERSION = 2.5.6
5
6CC = gcc
7OPT_FLAGS = -O2 -g
8CFLAGS = $(OPT_FLAGS) -Wall
9INSTALL = install
10SBINDIR = /sbin
11ETCDIR = /etc
12PROFILEDIR = $(ETCDIR)/profile.d
13ENVDIR = $(ETCDIR)/env.d
14SHRCDIR = $(ETCDIR)/shrc.d
15#########################################
16
17BIN_FILES = joinpasswd update-fstab postshell
18DOCS = ChangeLog
19ETC_FILES = filesystems fstab group host.conf hosts motd mtab \
20 netgroup passwd profile protocols resolv.conf securetty \
21 services shells suid_profile
22PROFILE_FILES = tmp-dir.csh tmp-dir.sh
23ENV_FILES = EDITOR HISTFILESIZE HOME_ETC MAILCHECK MAILPATH \
24 NNTPSERVER ORGANIZATION TMOUT VISUAL
25
26SOURCES = joinpasswd.c update-fstab.c postshell.c
27CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
28
29#########################################
30all: $(BIN_FILES)
31
32joinpasswd: joinpasswd.o
33update-fstab: update-fstab.o
34postshell: postshell.o
35
36.c.o:
37 $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
38
39clean:
40 rm -f $(CLEAN)
41 cd etc; rm -f $(CLEAN)
42 cd etc/profile.d; rm -f $(CLEAN)
43
44install:
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)
53
54dist: clean
55
56 $(INSTALL) -d setup-$(VERSION)/etc/profile.d
57 $(INSTALL) -d setup-$(VERSION)/etc/env.d
58 $(INSTALL) -d setup-$(VERSION)/etc/shrc.d
59 $(INSTALL) $(DOCS) $(SOURCES) Makefile setup-$(VERSION)
60 for file in $(ETC_FILES); do \
61 $(INSTALL) -m644 etc/$$file setup-$(VERSION)/etc; \
62 done
63 for file in $(PROFILE_FILES); do \
64 $(INSTALL) -m755 etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
65 done
66 for file in $(ENV_FILES); do \
67 $(INSTALL) -m644 etc/env.d/$$file setup-$(VERSION)/etc/env.d; \
68 done
69 tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
70 rm -rf setup-$(VERSION)
71
72tag:
73 cvs tag setup-$(shell echo $(VERSION) | tr . _)
This page took 0.056895 seconds and 4 git commands to generate.