how do you make a makefile - makefile

I would like to know how to makefile for Unix.

Here's a good Makefile Tutorial (first result on Google after searching "how to create a makefile").

Because (g)make has many non-intuitive aspects, e.g. its backward chaining, I'd highly recommend having a look at Robert Mecklenburg's book Managing Projects with GNU Make.
Or even better is Andrew Talbot's Managing Projects with Make (second edition), which I feel has the better introduction to make. (IMHO naturally).

http://www.opussoftware.com/tutorial/TutMakefile.htm

Run make. ;)
Though you'd be better served by reading the make documentation. Do this by typing 'man make' from the command line. It should be enough to get you started and confused, at which point a Google search will help a lot.

The Gnu make manual would be a good place to look.

I have compiled some notes here: http://ustunozgur.blogspot.com/2008/04/sample-makefile.html

can check out documentation on automake (which most unix-y projects use) as well

Related

Automatic english spell-checking in a CI/CD pipeline

I am looking for a tool to spell-check English markdown documents in a pipeline.
Having seen and heard about the Hunspell project, I am not sure if that is the right tool to use - however looking online I might not use the right search terms or my approach is wrong as I do not find many results at all.
Anyone who has any advice of the direction to go?
Many thanks in beforehand.
Answering myself: this is a task for which the codespell CLI tool can be used.

Portable executable structure explanation

I am learning the structure of a portable executable. I went through the MSDN article but I am a bit confused about it. I have some confusion with their precise stucture and its functionality.
Can anybody help me or please refer me to a nice article for this?
For a more discursive approach than official specs, you should have a look at Matt Pietrek 1994 article Peering inside the PE: A tour of the Win32 Portable Executable File Format. The explanation is more readable than the dry, official style of the specs.
This is the official current PE/COFF spec from MSFT: http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx
You should take a look to the excellent representation of the PE Format at http://www.openrce.org/reference_library/files/reference/PE%20Format.pdf.
Some (64Bits) fields are missing, but it is up to 99% close to the reality.
I used this schema to work on a product to analyze PE Files, which you can be download at www.winitor.com. Hope it helps.

What is the best inline file comparer for Windows?

My Source Safe file comparer (diff) doesn't say where in the line there are differences. Which tool would I use for that?
And before someone tries to move it to SU, please note that we developers rely on these diff tools more than anyone else.
I like SourceGear's free diffmerge. They built it to work with their source control systems, so it's pretty feature-rich.
WinMerge does inline comparison. I don't know about "best", but it is free.
BeyondCompare is excellent, though not free. There is a screenshot of the within-line difference view on their website.
The one included with TortoiseSVN does a decent job.
BeyondCompare is also an excellent choice.
I love using ExamDiff Pro.
Araxis Merge is a good one.
Iam using NotePad++ Compare plugin, there is ultracompare as well.
Tool to Compare Two Files
Google Search for "compare files"
Best Diff Tool?
And the most complete list on wikipedia
BeyondCompare. Specially like their folder comparision option.
I like P4Merge...
http://www.perforce.com/perforce/products/merge.html

Ruby source code analyzer (something like pylint)

Does Ruby have any tools along the lines of pylint for analyzing source code for errors and simple coding standards?
It would be nice if it could be integrated with cruisecontrolrb for continuous integration.
Or does everyone write such good tests that they don't need source code checkers!
I reviewed a bunch of Ruby tools that are available here
http://devver.wordpress.com/2008/10/03/ruby-tools-roundup/
most of the tools were mentioned by webmat, but if you want more information I go pretty in depth with examples.
I also highly recommend using Metric-Fu it gives you a on gem/plugin install of 3 of the more popular tools and is built with cruisecontrolrb integration in mind.
The creator has a great post that should help get you up and running in no time.
http://jakescruggs.blogspot.com/2008/04/dead-simple-rails-metrics-with-metricfu.html
There has been a lot of activity in Ruby tools lately which I think is a good sign of a growing and maturing language.
Check these out:
on Ruby Inside, an article presenting Towelie, Flay and Simian, all tools to find code duplication
Towelie
flay
Simian (a more general tool that supports Ruby among other languages)
reek: a code smell detector for Ruby
Roodi: checks the style of your Ruby code
flog: a code complexity analyzer
rcov: will give you a C0 (if I remember correctly) code coverage analysis. But be careful though. 100% coverage is very costly and doesn't mean perfect code.
heckle: changes your code in subtle manners and runs your test suite to see if it catches it. Brutal :-)
Since they're all command-line tools they can all be integrated simply as cc.rb tasks. Just whip out your regex skillz to pick the important part of the output.
I recommend you first try them out by hand to see if they play well with your codebase and if you like the info they give you. Once you find a few that give you value, then spend time integrating them in your cc.
One recently-updated interesting-looking tool is Ruby Object Oriented Design Inferometer - roodi for short. It's at v1.3.0, so I'm guessing it's fairly mature.
I haven't tried it myself, because my code is of course already beyond reproach (hah).
As for test coverage (oh dear, I haven't tried this one either) there's rcov
Also (look, I am definitely going to try some of these today. One at least) you might care to take a look at flog and flay for another style checker and a refactoring candidate finder.
There's also the built-in warnings you can enable with a quick:
ruby -w
Or setting the global variable $VERBOSE to true at any point.
Code metrics on ruby toolbox website.
Rubocop is a widely-used static code analyzer.
I just released Excellent which implements several checks on Ruby code. It combines roodi, reek and flog and also adds some Rails specific checks:
gem sources -a http://gems.github.com
sudo gem install simplabs-excellent
May be helpful...

.Net XML comment into API Documentation

Is there an easy way to produce MSDN-style documentation from the Visual Studio XML output?
I'm not patient enough to set up a good xslt for it because I know I'm not the first person to cross this bridge.
Also, I tried setting up sandcastle recently, but it really made my eyes cross. Either I was missing something important in the process or it is just way too involved.
I know somebody out there has a really nice dead-simple solution.
I'm reiterating here because I think my formatting made that paragraph non-inviting to read:
I gave sandcastle a try but had a really hard time getting it set up.
What I really have in mind is something much simpler.
That is, unless I just don't understand the sandcastle process. It seemed like an awful lot of extra baggage to me just to produce something nice for the testers to work with.
You're looking for Sandcastle
Project Page: Sandcastle Releases
Blog: Sandcastle Blog
NDoc Code Documentation Generator for .NET used to be the tool of choice, but support has all but stopped.
Have a look at Sandcastle, which does exactly that. It's also one of the more simpler solutions out there, and it's more or less the tool of choice, so in the long run, maybe we could help you to set up Sandcastle if you specify what issues you encountered during setup?
You should also use the Sandcastle Help File Builder. It provides you with a ndoc like GUI for generating help files so you don't have to do anything from a command prompt.
Welcome to the Sandcastle Help File Builder Project
I've just set up Sandcastle again. Try installing it (the May 2008 release) and search for SandcastleGui.exe or something similar (it's in the examples folder or so).
Click Add Assembly and add your Assembly or Assemblies, add any .xml Documentation files (the ones generated by the compiler if you enabled that option) and then Build.
It will take some time, but the result will be worth the effort. It will actually look up stuff from MSDN, so your resulting documentation will also have the Class Inheritance all the way down to System.Object with links to MSDN and stuff.
Sandcastle seems a bit complicated at first, especially when you want to use it in an automated build, but I am absolutely sure it will be worth the effort.
Also have a look at Sandcastle Help File Builder, this is a somewhat more advanced GUI for it.
Follow this simple 5 step article and you are pretty much done. As a bonus you can use H2Viewer to view Html Help 2.x files.
I use NDoc3

Resources