Add a gitignore make target.
This commit is contained in:
		
							
								
								
									
										1
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								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 | ||||
|   | ||||
							
								
								
									
										11
									
								
								init.d.BSD/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								init.d.BSD/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| hostid | ||||
| moused | ||||
| newsyslog | ||||
| pf | ||||
| rarpd | ||||
| rc-enabled | ||||
| rpcbind | ||||
| savecore | ||||
| swap-blk | ||||
| sysctl | ||||
| syslogd | ||||
							
								
								
									
										2
									
								
								init.d.NetBSD/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d.NetBSD/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| ttys | ||||
| wscons | ||||
							
								
								
									
										9
									
								
								init.d/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								init.d/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +1,10 @@ | ||||
| bootmisc | ||||
| fsck | ||||
| halt.sh | ||||
| hostname | ||||
| local | ||||
| localmount | ||||
| netmount | ||||
| root | ||||
| swap | ||||
| urandom | ||||
|   | ||||
| @@ -17,6 +17,7 @@ MAKE_LINKS=	suffix=$${man\#*.}; \ | ||||
|  | ||||
| MK=		../mk | ||||
| include ${MK}/sys.mk | ||||
| include ${MK}/gitignore.mk | ||||
|  | ||||
| all: | ||||
|  | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
| # Copyright 2008 Roy Marples <roy@marples.name> | ||||
|  | ||||
| CLEANFILES+=	.depend | ||||
| IGNOREFILES+=	.depend | ||||
|  | ||||
| .depend: ${SRCS} | ||||
| 	${CC} ${CFLAGS} -MM ${SRCS} > .depend | ||||
|   | ||||
							
								
								
									
										15
									
								
								mk/gitignore.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								mk/gitignore.mk
									
									
									
									
									
										Normal file
									
								
							| @@ -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 | ||||
|   | ||||
| @@ -41,3 +41,5 @@ install: all realinstall ${INSTALLAFTER} | ||||
| CLEANFILES+=	${OBJS} | ||||
| clean: | ||||
| 	if test -n "${CLEANFILES}"; then rm -f ${CLEANFILES}; fi  | ||||
|  | ||||
| include ${MK}/gitignore.mk | ||||
|   | ||||
| @@ -37,3 +37,5 @@ realinstall: | ||||
| install: realinstall ${INSTALLAFTER} | ||||
| depend: | ||||
| 	${_SUBDIR} | ||||
| gitignore: | ||||
| 	${_SUBDIR} | ||||
|   | ||||
| @@ -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} | ||||
|  | ||||
|   | ||||
							
								
								
									
										3
									
								
								sh/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								sh/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,4 +1,5 @@ | ||||
| functions.sh | ||||
| rc-functions.sh | ||||
| gendepends.sh | ||||
| net.sh | ||||
| rc-functions.sh | ||||
| runscript.sh | ||||
|   | ||||
							
								
								
									
										12
									
								
								src/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								src/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,12 +0,0 @@ | ||||
| .depend | ||||
| rc | ||||
| *.[oa] | ||||
| *.lo | ||||
| *.so | ||||
| *.So | ||||
| *.so.* | ||||
| version.h | ||||
|  | ||||
| # Experimental stuff | ||||
| rc-daemon.c | ||||
| rc-daemon.h | ||||
							
								
								
									
										6
									
								
								src/libeinfo/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/libeinfo/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| .depend | ||||
| libeinfo.o | ||||
| libeinfo.So | ||||
| libeinfo.a | ||||
| libeinfo.so.1 | ||||
| libeinfo.so | ||||
							
								
								
									
										14
									
								
								src/librc/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/librc/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -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 | ||||
							
								
								
									
										68
									
								
								src/rc/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								src/rc/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -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 | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user