The "make -n install" reports locations that would be invalid for real install. The FHS does not know /pentest root directory. Please install the files in standard locations known to FHS http://www.pathname.com/fhs/.
That is:
Also
echo "Building binary..."
/usr/bin/gcc -Wall -lm -pthread -std=c99 crunch.c -o crunch
echo ""
echo "Creating directories..."
/usr/bin/install -d -m 755 -o root -g root /pentest/passwords//crunch
/usr/bin/install -d -m 755 -o root -g root /usr/local/share/man/man1
echo "Copying binary..."
/usr/bin/install crunch -m 755 -o root -g root /pentest/passwords//crunch
echo "Copying charset.lst..."
/usr/bin/install charset.lst -m 644 -o root -g root /pentest/passwords//crunch
echo "Copying GPL.TXT..."
/usr/bin/install GPL.TXT -m 644 -o root -g root /pentest/passwords//crunch
echo "Installing man page..."
/usr/bin/install crunch.1 -m 644 -o root -g root /usr/local/share/man/man1
echo ""
The program is written with the intention of use in the BackTrack Linux distribution. /pentest/passwords/crunch is the path for that distribution. I could add a BT specific option and put all of the BT specific things there. i.e. make would be /usr/bin
make bt would be /pentest/passwords
I will change the path for the man page.
I don't have documentation so no need for that.
I did add a $(INSTALL_OPTIONS) variable and I set it to -g root -o root
I am sorry but I don't understand what you mean by double slashes. Can you please clarify?
See the output:
This is some small glitch in the way variables are used in Makefile, so the output does look "clean". Yes, the Linux would convert "//" into plain "/", but still it would be much better if this would be taken cared of.
The problem is with the variables. See:
It is better to not add trailing slashes. Usually the PREFIX is named DESTDIR in makefiles.
I'm attaching my Makefile template that should give you ideas what are the most common variables used in Makefiles. See attachment, You can use it as you want as it's GPL.
Thank you for the changes.
Last edit: Jari Aalto 2013-05-30
Makefile template
updated Makefile
Here is an updated Makefile. I think it addresses all of your issues.
The 3.4 "geninstall" needs still a little work to be correct (e.g. *.lst does not belong to /usr/bin etc). The FSF address also is preferably referred via URL. See corrected Makefile in attachment.
Please forget the above attached file and use Git to receive the latest updates. The instructions are in message https://sourceforge.net/p/crunch-wordlist/bugs/16/
The last two versions should have fixed this issue. Please reopen if the issue still exists.