diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | init.d.BSD/.gitignore | 11 | ||||
-rw-r--r-- | init.d.NetBSD/.gitignore | 2 | ||||
-rw-r--r-- | init.d/.gitignore | 9 | ||||
-rw-r--r-- | man/Makefile | 1 | ||||
-rw-r--r-- | mk/depend.mk | 1 | ||||
-rw-r--r-- | mk/gitignore.mk | 15 | ||||
-rw-r--r-- | mk/lib.mk | 3 | ||||
-rw-r--r-- | mk/prog.mk | 5 | ||||
-rw-r--r-- | mk/scripts.mk | 2 | ||||
-rw-r--r-- | mk/subdir.mk | 2 | ||||
-rw-r--r-- | runlevels/Makefile | 1 | ||||
-rw-r--r-- | sh/.gitignore | 3 | ||||
-rw-r--r-- | src/.gitignore | 12 | ||||
-rw-r--r-- | src/libeinfo/.gitignore | 6 | ||||
-rw-r--r-- | src/librc/.gitignore | 14 | ||||
-rw-r--r-- | src/rc/.gitignore | 68 | ||||
-rw-r--r-- | src/rc/Makefile | 6 |
18 files changed, 145 insertions, 17 deletions
@@ -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 @@ -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 @@ -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 |