#----------------------------------------------------------------------------- # File : vhdlTags.pl # Author : Ryan Herbst, ryan@amaroq.com # Created : 07/28/2004 #----------------------------------------------------------------------------- # Description: # Generate a tags files in the current directory using the VHDL source # files present in that directory. #----------------------------------------------------------------------------- # Copyright (c) 2004 by Ryan Herbst. All rights reserved. #----------------------------------------------------------------------------- # Modification history: # 07/28/2004: created. #----------------------------------------------------------------------------- # Open directory opendir(DIR,"."); # Get list of files @DirList = readdir(DIR); # Close the directory and return class list closedir(DIR); # Open the destination file open(DAT, ">tags") || die("Count not open file: tags\n"); # Go through each file foreach $Listing ( @DirList ) { # Skip the dot files if ( $Listing !~ /^\.|^\.\./ ) { # If file is a vhdl file then process it if ( $Listing =~ /\.vhd$/ ) { $Listing =~ s/\.vhd//; # Add the entry to the tags file print DAT "$Listing\t$Listing.vhd\t1\n"; } } } # Close File close(DAT);