Ctags: tags file for SystemVerilog incorrect - ctags

I'm trying to generate a tags file for a directory with .sv files. The tags file didn't work as intended and anytime I go to an instance declaration it send me to some random place. Looking at the ctags -h command it doesn't include systemverilog as supported language which makes me think I have the wrong installation but I'm not sure. I install this version of ctags (universal ctags). Online documentation hasn't helped. Can anyone share how they generate tags for .sv files?

Turns out I had an installation of an older ctags. Once I used the correct one /path/to/ctags it worked.

Related

Pass Arguments to Package Maker Contents Install Destination from Command line (Terminal)

I am using Mac 10.8 and latest version of Package Maker. My product destination path (Install Location) contains our Product version.
Eg. Test/1.1.0.1/Sample.
We have planned to automate the process. We will increase the build number in each automation. So I need to change the Version number in destination path in every automation. I am using below command to make the Packages using Terminal.
PackageMaker –v –d Test.pmdoc –o TestSample.pkg
Is there any option to pass the version number from this argument? Shall we implement this using a preinstall script? Please provide same samples if any option from Preinstall Scripts, since I am new to shell scripts. Please help me to solve this issue.
Personally I found it much easier to do this:
copy the package folder from a common location (ie /project-redist-master)
modify package contents as desired (see below)
create package
If you need more personalization, for example the version number somewhere inside the package, I found it most convenient to simple search & replace strings. For example you could write ___PROJECTVERSION___ to any text or resource file (ie pmdoc) where the version number is used. Then, before creating the package, run a little tool (bash script, personally I prefer writing Cocoa command line tools) that searches and replaces such placeholder strings. That tool would also get the version string from somewhere, for example a version.h header or the changelist number from source control.
PackageMaker always was buggy has hell, and got deprecated with Mac OS X 10.6 Snow Leopard.
I recommend to use pkgbuild together with productbuild.

how to add to PATH variable in OSX

I'm going to try building a custom language extension for Komodo Edit.
In order to build an xpi file, I need to add something to the PATH variable.
I'm not really familiar with the command line, so I'm not 100% sure how to do this.
I started by created an empty .profile file in my user directory.
Can I add modify that in a text editor to do what I need to do?
Here's the instructions I'm trying to follow.
http://community.activestate.com/forum/introduction-building-komodo-extension
Here is how packing up the Mako UDL into a Komodo extension works. Komodo includes a SDK in its install tree. On Linux and Windows this is found at "installdir/lib/sdk", and for a Mac it's found at "komodo.app/Contents/SharedSupport/sdk". That SDK includes a koext helper tool in the /lib/sdk/bin directory:
Put the SDK bin dir on your PATH and you should be able to run koext at the command line. Similar to tools like cvs or svn, these are tools with multiple sub-commands.
Something like that should be helpful
http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
export PATH=/ANYTHING_YOU_ARE_WORKIN_ON/bin:/opt/local/bin:/opt/local/sbin:$PATH export

Using Google's ProtoBuf (and a .proto file) to create a Python API Library

I have the .proto file used in the open-source Android API (http://code.google.com/p/android-market-api/), and am having some trouble compiling the file to generate the .py.
I'm trying to follow the instructions here, https://developers.google.com/protocol-buffers/docs/pythontutorial , and am on the steps that are under the header "Compiling Your Protocol Buffers".
I've downloaded the compiler, protoc.exe. The readme says "To install, simply place this binary somewhere in your PATH," which I'm not understanding. I'm messed around with it for a while now, but can't think of how to proceed.
I'm quite the novice programmer, so please tell me if something isn't clear, or if I'm having some sort of fundamental misunderstanding... about anything. I'm on Windows 7 by the way.
Thanks!
if protoc.exe is not in the same directory you're calling it from, you need to add it to your PATH environment variable to be accessible from the calling directory when you're in the shell. open up a command shell and execute:
set PATH=%PATH%c:\directory\to\proto\executable;
then change directories over to where your source code is and execute the compilation line as instructed from the google page.
I had the same problem because it is not written that clear in the README.txt. What they mean is to:
1. take the protoc.exe and put it in the same folder with the other files of your project.
2. open the cmd to that directory and run: protoc --cpp_out=. myfile.proto
=> This will create the 2 new files in the folder with the files of your project, and then you can add them normally to your program.
This helped me: http://www.scriptol.com/programming/protocol-buffers-tutorial.php
This is for c++, but I guess it will be something similar for python; I guess you just have to change the command you are using in the cmd :)

Configuring Bison to compile an input file under Visual C 6

I'm trying to get Bison to do it's thing in VC6. I'm sure this must be a problem with my configuration. At the moment I have a Custom Build step as follows.
<Commands>
echo Start parser generation
"C:\GnuWin32\bin\bison.exe" $(InputPath)
echo Finish parser generation
<Outputs>
$(ProjDir)\$(InputName).c
$(ProjDir)\$(InputName).h
The error I get is "C:\GnuWin32\bin\bison.exe: m4: No such file or directory", which makes me think the m4.exe doesn't exist or isn't on the path, but I can run the exact same command from CMD in the same directory with no errors.
This thought process makes me think it's a problem with the output options, but I've tried various configurations with no luck.
Any help would be great, thanks in advance.
Edit: I've added some more visual studio versions to the tag list to try to get some more exposure for the question. Hopefully someone will have done this in a later version and I can work backwards.
Okay, I've managed to slove this in a very round-about way but I will try my best to document it here.
It seems that VC6 Custom build options will only look in the project directory for the m4.exe, even when you specify where the calling exe (bison) is explicitly. To solve this I did a bit of a hack and did a full cd command in the custom build window to get to the gnuwin32 directory (where both bison and m4 live) before trying to call the parser generator.
This works fine but is a bit of a hassle for trying to distribute it to other people when they may have installed GNU tools to a different location.

Add include directory to scons

I have a project which has been checked out of Subversion and uses Scons for building. However, I have a library installed on my computer which Scons doesn't detect - it just says that the include file can't be found. Is there any way that I can direct Scons to the library location without altering the Sconscript file at all (because I don't want to have to deal with conflicts every time I update) - e.g. add a command line option that it will detect before searching for the include file? I can't even see all the available options because it doesn't respond to the --help option before it searches for the include files.
Okay, after some more googling, I found that there is a way to do it. gcc has a number of default directories that it searches (which I already knew - I just didn't know what they were defined as). The simplest way to do what I was after is to add the directories to these environment variables. The one that I needed was
$CPATH
This sets the path where gcc searches for its include files. Setting this to the directory I needed solved my problem.
you can set env["CPPPATH"], but I hope there's an easier way...
SCons has a concept of repositories - directories to look for source and target files. These can be specified on command line.
-Y REPOSITORY, --repository=REPOSITORY, --srcdir=REPOSITORY
Search REPOSITORY for source and target files.
To get to help of SCons itself, use -H option.
no you can't, unless the developer of the scons script explicitly adds support for it.

Resources