hi,
i'm writing a makefile and i want to create directories in the install option.
i've tried using mkdir to no avail.
i read about using install() to do this but i cannot find any examples.
any ideas?
TIA, rotis23
hi,
i'm writing a makefile and i want to create directories in the install option.
i've tried using mkdir to no avail.
i read about using install() to do this but i cannot find any examples.
any ideas?
TIA, rotis23
mkdir to no avail? That seems a bit odd to me... what kind of errors is it giving you when you try using this? My first thought is to check your permissions to make sure that if you are creating directories in a root-owned directory, make sure you are running as root.
But mkdir does work in makefiles, I promise (Well, in GNU make anyway).
starX
www.axisoftime.com
sorry, i'll eat my hat!
I rewrote this section and it seems to work now!
i think it was a tab error - unexpected end of file etc
hey starx,
look at this makefile code:
if i only have two mkdirs, 'make install' works.Code:install: myprog @if [ -d $(INSTDIR) ]; \ then \ cp myprog $(INSTDIR);\ chmod a+x $(INSTDIR)/myprog;\ chmod og-w $(INSTDIR)/myprog;\ cp myprog.conf $(INSTDIR);\ mkdir $(INSTDIR)/DNS;\ mkdir $(INSTDIR)/ICMP;\ mkdir $(INSTDIR/SNMP;\ chown -R user1.user1 $(INSTDIR);\ echo "Installed in $(INSTDIR)";\ else \ echo "Sorry, $(INSTDIR) does not exist";\ fi
if i add the third, as in this example, i get:
syntax error: unexpected end of file
i have tabs and not spaces!!!
any ideas?
shouldn't this be:mkdir $(INSTDIR/SNMP;\
?Code:mkdir $(INSTDIR)/SNMP;\
starX
www.axisoftime.com
yeah, obviously.....
...it was just a test.
honestly!