Changes in make infrastructure

Max Okumoto okumoto at ucsd.edu
Tue Apr 12 16:01:00 PDT 2005


Hi,

I plan to commit a few patches that change the behavoir of make
sometime next week.  And I would like some feed back before I do
this.  This is work that harti has done.
	1. Make the parser more strict for directives for example
		.if, .else, .elif, .endif, etc.
	   Right now the parser accepts things like
		.undefFOO
		.elseif (other condition)
	
	    the first case is equivilant to .undef FOO which isn't
	    bad, but the second case is really bad since you would
	    never know that it was treat the other condition as a
	    comment.
	    The new parser requires a space after the directive token.
	    and warns about non-comments after .else and .endif
	    This however, causes make to emit warnings for some of our
	    makefiles.  patch-3.0 puts a # after the directives to
	    silence the warnings.  (Its a standard diff since the unfied
	    diff is much bigger.)
	    .if defined(FOOBAR)
	    .else defined(FOOBAR)
	    .endif !defined(FOOBAR)
	     will become

	     .if defined(FOOBAR)
	     .else # defined(FOOBAR)
	     .endif # !defined(FOOBAR)
	      Which makes it clear that the defined(FOOBAR) on the
	      later lines are just comments.
	2. change the .makenev directive to a special target.
	   .EXPORT: this is more posix compliant.
	   This will also require some minor edits to our make files
	   in /src/share/mk/bsd.*
Does anyone see any problems with these changes?

						Max
Index: sys/conf/kmod.mk
===================================================================
RCS file: /cvs/src/sys/conf/kmod.mk,v
retrieving revision 1.18
diff -r1.18 kmod.mk
197c197
< .endif !target(realinstall)
---
> .endif # !target(realinstall)
206c206
< .endif !target(install)
---
> .endif # !target(install)
Index: share/mk/bsd.files.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.files.mk,v
retrieving revision 1.2
diff -r1.2 bsd.files.mk
64c64
< .endif defined(${group}) && !empty(${group})
---
> .endif # defined(${group}) && !empty(${group})
67c67
< .endif !target(installfiles)
---
> .endif # !target(installfiles)
Index: share/mk/bsd.incs.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.incs.mk,v
retrieving revision 1.4
diff -r1.4 bsd.incs.mk
63c63
< .endif defined(${group}) && !empty(${group})
---
> .endif # defined(${group}) && !empty(${group})
78c78
< .endif !target(installincludes)
---
> .endif # !target(installincludes)
Index: share/mk/bsd.init.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.init.mk,v
retrieving revision 1.6
diff -r1.6 bsd.init.mk
19c19
< .endif !target(__<bsd.init.mk>__)
---
> .endif # !target(__<bsd.init.mk>__)
Index: share/mk/bsd.lib.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.lib.mk,v
retrieving revision 1.9
diff -r1.9 bsd.lib.mk
268c268
< .endif !defined(INTERNALLIB)
---
> .endif # !defined(INTERNALLIB)
322c322
< .endif !defined(INTERNALLIB)
---
> .endif # !defined(INTERNALLIB)
Index: share/mk/bsd.nls.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.nls.mk,v
retrieving revision 1.1
diff -r1.1 bsd.nls.mk
76c76
< .endif defined(NLS) && !empty(NLS) && !defined(NO_NLS)
---
> .endif # defined(NLS) && !empty(NLS) && !defined(NO_NLS)
Index: share/mk/bsd.obj.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.obj.mk,v
retrieving revision 1.2
diff -r1.2 bsd.obj.mk
102c102
< .endif !defined(NOOBJ)
---
> .endif # !defined(NOOBJ)
134c134
< .endif !target(__<bsd.obj.mk>__)
---
> .endif # !target(__<bsd.obj.mk>__)
Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.own.mk,v
retrieving revision 1.13
diff -r1.13 bsd.own.mk
213c213
< .endif !target(__<bsd.own.mk>__)
---
> .endif # !target(__<bsd.own.mk>__)
Index: share/mk/bsd.prog.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.prog.mk,v
retrieving revision 1.7
diff -r1.7 bsd.prog.mk
46c46
< .else !defined(SRCS)
---
> .else # !defined(SRCS)
126c126
< .endif !target(realinstall)
---
> .endif # !target(realinstall)




More information about the Submit mailing list