From kde-devel Thu Dec 30 17:00:34 2004 From: Zack Rusin Date: Thu, 30 Dec 2004 17:00:34 +0000 To: kde-devel Subject: Re: kdepim (CVS HEAD): "/usr/bin/install" is being called while Message-Id: <200412301200.34764.zack () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=110450255424476 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_yQD1BDAtr++K3WO" --Boundary-00=_yQD1BDAtr++K3WO Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thursday 30 December 2004 11:40, Michael Pyne wrote: > Maybe there is a way to add the $(all_includes) thingy to Benjamin's > KDE linting scripts? Doesn't sound that hard to achieve. The > following shell code seems to work for me (run in your source dir): > > for i in `find . -name 'Makefile.am'`; do > grep -l '^\(INCLUDES\|AM_CPPFLAGS\).*\$(all_includes) \+.' $i > done > > When I ran it in kdepim (just as an example) it came back with this, > I looked at the Makefile and I'm not really sure if it's actually a > problem or not though. > > ./kpilot/lib/Makefile.am 1) yes this is an error 2) personally i use the attached script Zack -- Earth is full. Go home. --Boundary-00=_yQD1BDAtr++K3WO Content-Type: application/x-ruby; name="all_includes_check.rb" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="all_includes_check.rb" #!/usr/bin/env ruby require 'find' def check_makefile(file) fh = File.new(file, "r") line = "" while (line = fh.gets) line.chomp! if(line =~ /^INCLUDES/ || line =~ /^AM_CPPFLAGS/) while(line =~ /\\\s*$/) num = line =~ /\\\s*$/ if(nextline = fh.gets) nextline.chomp! line += nextline end end #only complain if AM_CPPFLAGS actually contains includes! if(line =~ /-I/ && !(line =~ /\$\(all_includes\)/)) print "Error in \"#{file}\"\n" print "\t $(all_includes) has to go last on INCLUDES and AM_CPPFLAGS lines!\n" end end end end argv = ARGV.empty? ? %w{.} : ARGV Find.find(*argv) do |file| if(file =~ /Makefile\.am$/) check_makefile(file) end end --Boundary-00=_yQD1BDAtr++K3WO Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --Boundary-00=_yQD1BDAtr++K3WO--