Allow depend creation again. This doesn't work on GNU make, but does on all others.
This commit is contained in:
		| @@ -23,3 +23,4 @@ CFLAGS += -pedantic -std=c99 \ | ||||
| 		  $(call check_gcc, -Wdeclaration-after-statement) \ | ||||
| 		  $(call check_gcc, -Wsequence-point) \ | ||||
| 		  $(call check_gcc, -Wextra) $(WEXTRA) | ||||
|  | ||||
|   | ||||
							
								
								
									
										10
									
								
								src/depend.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/depend.mk
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| # This only works for make implementations that always include a .depend if | ||||
| # it exists. Only GNU make does not do this. | ||||
|  | ||||
| .depend: ${SCRIPTS} ${SRCS} | ||||
| 	$(CC) $(CFLAGS) -MM ${SRCS} > .depend | ||||
|  | ||||
| depend: .depend | ||||
|  | ||||
| clean-depend: | ||||
| 	rm -f .depend | ||||
| @@ -32,7 +32,7 @@ LIBMODE?=		0444 | ||||
| .c.So: | ||||
| 	${CC} ${PICFLAG} -DPIC ${CFLAGS} -c $< -o $@ | ||||
|  | ||||
| all: ${_LIBS} | ||||
| all: depend ${_LIBS} | ||||
|  | ||||
| lib${LIB}.a:	${OBJS} ${STATICOBJS} | ||||
| 	@${ECHO} building static library $@ | ||||
| @@ -59,5 +59,7 @@ install: all | ||||
| 	${INSTALL} -d ${DESTDIR}${INCDIR} | ||||
| 	for x in ${INCS}; do ${INSTALL} -m ${INCMODE} $$x ${DESTDIR}${INCDIR}; done | ||||
|  | ||||
| clean: | ||||
| clean: clean-depend | ||||
| 	rm -f ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK} | ||||
|  | ||||
| include $(TOPDIR)/depend.mk | ||||
|   | ||||
| @@ -9,6 +9,8 @@ VERSION_MAP=	einfo.map | ||||
|  | ||||
| SHLIBDIR=		/${LIBNAME} | ||||
|  | ||||
| CFLAGS+=		-I$(TOPDIR) | ||||
|  | ||||
| include $(TOPDIR)/cc.mk | ||||
| include $(TOPDIR)/lib.mk | ||||
| include $(TOPDIR)/$(TERMCAP).mk | ||||
|   | ||||
| @@ -50,7 +50,7 @@ const char libeinfo_copyright[] = "Copyright (c) 2007-2008 Roy Marples"; | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include "einfo.h" | ||||
| #include "../hidden-visibility.h" | ||||
| #include "hidden-visibility.h" | ||||
| hidden_proto(ecolor) | ||||
| hidden_proto(ebegin) | ||||
| hidden_proto(ebeginv) | ||||
|   | ||||
| @@ -11,6 +11,8 @@ VERSION_MAP=	rc.map | ||||
| CFLAGS+=	-DLIB=\"${LIBNAME}\" | ||||
| LDADD+=		${LIBKVM} | ||||
|  | ||||
| CFLAGS+=	-I$(TOPDIR) | ||||
|  | ||||
| SHLIBDIR=	/${LIBNAME} | ||||
|  | ||||
| include $(TOPDIR)/cc.mk | ||||
|   | ||||
| @@ -65,10 +65,10 @@ | ||||
|  | ||||
| #include "librc-depend.h" | ||||
| #include "rc.h" | ||||
| #include "../rc-misc.h" | ||||
| #include "../strlist.h" | ||||
| #include "rc-misc.h" | ||||
| #include "strlist.h" | ||||
|  | ||||
| #include "../hidden-visibility.h" | ||||
| #include "hidden-visibility.h" | ||||
| #define librc_hidden_proto(x) hidden_proto(x) | ||||
| #define librc_hidden_def(x) hidden_def(x) | ||||
|  | ||||
|   | ||||
| @@ -8,10 +8,12 @@ OBJS+=			${SRCS:.c=.o} | ||||
|  | ||||
| INSTALL?=		install | ||||
|  | ||||
| all: ${PROG} | ||||
| all: depend ${PROG} | ||||
|  | ||||
| ${PROG}: ${SCRIPTS} ${OBJS} | ||||
| 	${CC} ${CFLAGS} ${LDFLAGS} ${PROGLDFLAGS} -o $@ ${OBJS} ${LDADD} | ||||
|  | ||||
| clean: | ||||
| clean: clean-depend | ||||
| 	rm -f ${OBJS} ${PROG} ${CLEANFILES} | ||||
|  | ||||
| include $(TOPDIR)/depend.mk | ||||
|   | ||||
| @@ -39,10 +39,10 @@ | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include "builtins.h" | ||||
| #include "../libeinfo/einfo.h" | ||||
| #include "einfo.h" | ||||
| #include "rc.h" | ||||
| #include "../rc-misc.h" | ||||
| #include "../strlist.h" | ||||
| #include "rc-misc.h" | ||||
| #include "strlist.h" | ||||
|  | ||||
| static const char *applet = NULL; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user