aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--init.d.BSD/.gitignore11
-rw-r--r--init.d.NetBSD/.gitignore2
-rw-r--r--init.d/.gitignore9
-rw-r--r--man/Makefile1
-rw-r--r--mk/depend.mk1
-rw-r--r--mk/gitignore.mk15
-rw-r--r--mk/lib.mk3
-rw-r--r--mk/prog.mk5
-rw-r--r--mk/scripts.mk2
-rw-r--r--mk/subdir.mk2
-rw-r--r--runlevels/Makefile1
-rw-r--r--sh/.gitignore3
-rw-r--r--src/.gitignore12
-rw-r--r--src/libeinfo/.gitignore6
-rw-r--r--src/librc/.gitignore14
-rw-r--r--src/rc/.gitignore68
-rw-r--r--src/rc/Makefile6
18 files changed, 145 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index 58ab0987..0f994b21 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ include ${MK}/sys.mk
include ${MK}/os.mk
include ${MK}/subdir.mk
include ${MK}/dist.mk
+include ${MK}/gitignore.mk
_installafter:
${INSTALL} -d ${DESTDIR}/${PREFIX}/${RC_LIB}/init.d
diff --git a/init.d.BSD/.gitignore b/init.d.BSD/.gitignore
new file mode 100644
index 00000000..1b376250
--- /dev/null
+++ b/init.d.BSD/.gitignore
@@ -0,0 +1,11 @@
+hostid
+moused
+newsyslog
+pf
+rarpd
+rc-enabled
+rpcbind
+savecore
+swap-blk
+sysctl
+syslogd
diff --git a/init.d.NetBSD/.gitignore b/init.d.NetBSD/.gitignore
new file mode 100644
index 00000000..43761347
--- /dev/null
+++ b/init.d.NetBSD/.gitignore
@@ -0,0 +1,2 @@
+ttys
+wscons
diff --git a/init.d/.gitignore b/init.d/.gitignore
index 1754324a..32350d4f 100644
--- a/init.d/.gitignore
+++ b/init.d/.gitignore
@@ -1 +1,10 @@
+bootmisc
+fsck
halt.sh
+hostname
+local
+localmount
+netmount
+root
+swap
+urandom
diff --git a/man/Makefile b/man/Makefile
index 38a3c74b..f6ffd699 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -17,6 +17,7 @@ MAKE_LINKS= suffix=$${man\#*.}; \
MK= ../mk
include ${MK}/sys.mk
+include ${MK}/gitignore.mk
all:
diff --git a/mk/depend.mk b/mk/depend.mk
index a4d717ae..3d72cac1 100644
--- a/mk/depend.mk
+++ b/mk/depend.mk
@@ -4,6 +4,7 @@
# Copyright 2008 Roy Marples <roy@marples.name>
CLEANFILES+= .depend
+IGNOREFILES+= .depend
.depend: ${SRCS}
${CC} ${CFLAGS} -MM ${SRCS} > .depend
diff --git a/mk/gitignore.mk b/mk/gitignore.mk
new file mode 100644
index 00000000..34d3539e
--- /dev/null
+++ b/mk/gitignore.mk
@@ -0,0 +1,15 @@
+# rules to make .gitignore files
+# Copyright 2008 Roy Marples <roy@marples.name>
+
+IGNOREFILES+= ${CLEANFILES}
+
+.gitignore:
+ for obj in ${IGNOREFILES}; do \
+ if ! test -r .gitignore; then \
+ echo "$${obj}" > .gitignore || exit $$?; \
+ elif ! grep -q "^$${obj}$$" .gitignore; then \
+ echo "$${obj}" >> .gitignore || exit $$?; \
+ fi; \
+ done
+
+gitignore: .gitignore
diff --git a/mk/lib.mk b/mk/lib.mk
index 825af96d..a649c2ca 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -11,6 +11,8 @@ OBJS+= ${SRCS:.c=.o}
SOBJS+= ${OBJS:.o=.So}
_LIBS= lib${LIB}.a ${SHLIB_NAME}
+CLEANFILES+= ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK}
+
.SUFFIXES: .So
.c.So:
@@ -50,3 +52,4 @@ clean:
include ${MK}/sys.mk
include ${MK}/depend.mk
+include ${MK}/gitignore.mk
diff --git a/mk/prog.mk b/mk/prog.mk
index a52681f2..46bfb56b 100644
--- a/mk/prog.mk
+++ b/mk/prog.mk
@@ -20,12 +20,15 @@ LDFLAGS+= ${_DYNLINK}$(shell ${_DYNLINK_SH})
LDFLAGS+= -Wl,-rpath=${PREFIX}/${LIBNAME} -L${PREFIX}/${LIBNAME}
LDFLAGS+= ${PROGLDFLAGS}
+CLEANFILES+= ${OBJS} ${PROG}
+
all: depend ${PROG}
${PROG}: ${SCRIPTS} ${OBJS}
${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}
clean:
- rm -f ${OBJS} ${PROG} ${CLEANFILES}
+ rm -f ${CLEANFILES}
include ${MK}/depend.mk
+include ${MK}/gitignore.mk
diff --git a/mk/scripts.mk b/mk/scripts.mk
index 34536f85..81fae3d2 100644
--- a/mk/scripts.mk
+++ b/mk/scripts.mk
@@ -41,3 +41,5 @@ install: all realinstall ${INSTALLAFTER}
CLEANFILES+= ${OBJS}
clean:
if test -n "${CLEANFILES}"; then rm -f ${CLEANFILES}; fi
+
+include ${MK}/gitignore.mk
diff --git a/mk/subdir.mk b/mk/subdir.mk
index d3074ca1..6d9031d2 100644
--- a/mk/subdir.mk
+++ b/mk/subdir.mk
@@ -37,3 +37,5 @@ realinstall:
install: realinstall ${INSTALLAFTER}
depend:
${_SUBDIR}
+gitignore:
+ ${_SUBDIR}
diff --git a/runlevels/Makefile b/runlevels/Makefile
index c2cac334..0ede30e2 100644
--- a/runlevels/Makefile
+++ b/runlevels/Makefile
@@ -9,6 +9,7 @@ DEFAULTDIR= ${LEVELDIR}/default
MK= ../mk
include ${MK}/sys.mk
include ${MK}/os.mk
+include ${MK}/gitignore.mk
include Makefile.${OS}
include Makefile.${SUBOS}
diff --git a/sh/.gitignore b/sh/.gitignore
index 805e6c14..e25c5e0f 100644
--- a/sh/.gitignore
+++ b/sh/.gitignore
@@ -1,4 +1,5 @@
functions.sh
-rc-functions.sh
gendepends.sh
+net.sh
+rc-functions.sh
runscript.sh
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index f04dfe20..00000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.depend
-rc
-*.[oa]
-*.lo
-*.so
-*.So
-*.so.*
-version.h
-
-# Experimental stuff
-rc-daemon.c
-rc-daemon.h
diff --git a/src/libeinfo/.gitignore b/src/libeinfo/.gitignore
new file mode 100644
index 00000000..b4fca0e2
--- /dev/null
+++ b/src/libeinfo/.gitignore
@@ -0,0 +1,6 @@
+.depend
+libeinfo.o
+libeinfo.So
+libeinfo.a
+libeinfo.so.1
+libeinfo.so
diff --git a/src/librc/.gitignore b/src/librc/.gitignore
new file mode 100644
index 00000000..8ebb1826
--- /dev/null
+++ b/src/librc/.gitignore
@@ -0,0 +1,14 @@
+.depend
+librc.o
+librc-daemon.o
+librc-depend.o
+librc-misc.o
+librc-strlist.o
+librc.So
+librc-daemon.So
+librc-depend.So
+librc-misc.So
+librc-strlist.So
+librc.a
+librc.so.1
+librc.so
diff --git a/src/rc/.gitignore b/src/rc/.gitignore
new file mode 100644
index 00000000..17d975c1
--- /dev/null
+++ b/src/rc/.gitignore
@@ -0,0 +1,68 @@
+.depend
+version.h
+rc-status
+rc-update
+runscript
+start-stop-daemon
+einfon
+einfo
+ewarnn
+ewarn
+eerrorn
+eerror
+ebegin
+eend
+ewend
+eindent
+eoutdent
+esyslog
+eval_ecolors
+veinfo
+vewarn
+vebegin
+veend
+vewend
+veindent
+veoutdent
+service_starting
+service_started
+service_stopping
+service_stopped
+service_inactive
+service_wasinactive
+service_coldplugged
+service_started_daemon
+checkpath
+fstabinfo
+mountinfo
+rc-depend
+service_get_value
+service_set_value
+get_options
+save_options
+shell_var
+is_newer_than
+is_older_than
+mark_service_starting
+mark_service_started
+mark_service_stopping
+mark_service_stopped
+mark_service_inactive
+mark_service_wasinactive
+mark_service_coldplugged
+mark_service_failed
+rc-abort
+checkpath.o
+fstabinfo.o
+mountinfo.o
+rc-applets.o
+rc-depend.o
+rc-logger.o
+rc-misc.o
+rc-plugin.o
+rc-status.o
+rc-update.o
+rc.o
+runscript.o
+start-stop-daemon.o
+rc
diff --git a/src/rc/Makefile b/src/rc/Makefile
index fea22214..26ee1312 100644
--- a/src/rc/Makefile
+++ b/src/rc/Makefile
@@ -27,6 +27,8 @@ RC_SBINLINKS= mark_service_starting mark_service_started \
mark_service_inactive mark_service_wasinactive \
mark_service_coldplugged mark_service_failed \
rc-abort
+ALL_LINKS= ${BINLINKS} ${SBINLINKS} ${RC_BINLINKS} ${RC_SBINLINKS}
+CLEANFILES+= ${ALL_LINKS}
LDFLAGS+= -L../librc -L../libeinfo
LDADD+= -lutil -lrc -leinfo
@@ -66,7 +68,5 @@ install: all
${INSTALL} -m ${PAMMODE} start-stop-daemon.pam ${DESTDIR}${PAMDIR}/start-stop-daemon; \
fi
-ALL_LINKS = $(BINLINKS) $(SBINLINKS) $(RC_BINLINKS) $(RC_SBINLINKS)
-CLEANFILES += $(ALL_LINKS)
links: rc
- for l in $(ALL_LINKS) ; do ln -sf rc $$l || exit $$? ; done
+ for l in ${ALL_LINKS}; do ln -sf rc $$l || exit $$? ; done