Programming :: Get A List Of File Install Locations With Make It?
Dec 21, 2010
I have a bit of a problem and the only solution I can think of at the moment is a very tedious one, so I was hoping there would be a better way. What I am trying to do is cross compile the PPPD program so that I can install it on an embedded system (this system does not have make/gcc on it). It was easy to cross compile it, but I can not run "make install" since I'm compiling on a secondary machine. I don't want to install PPPD on this secondary machine (I couldn't anyway, because it was compiled for a different architecture) and I can't run make install on the target machine because there is no make/build system for it.
So it seems like what I would have to do is to manually copy over each compiled file from the build machine to the appropriate location of the target machine. And the only way (that I know of) to figure out how to do this is to manually examine the Makefiles (yes, there are several for PPPD) and figure out which file should go where on the target system. This isn't trivial because it uses a hierarchy of makefiles and the probability of human error for this method is high.
Is it possible that I could run another command that would give me a list of all the commands that make install would perform? Or a list of all files and their target location for "make install"? Or possibly some other solution that I am completely unaware of that would make this task not so painful and error prone?
Is there any method to add a location to the list in the gnome weather applet/clock ? [EDIT] To be more precise: my location is not there, how to extend the list with my location so I could have weather displayed for my city
I need to, through a bash script, go through a given directory (given as argument 1) to list out the relative path in this directory (including $1) for eact subdirectory which contains files. Directories which only contain . .. and eventually only subdirectories SHALL NOT be listed. It is this last requirement that makes it difficult for me.
I have been using the tree command for now, but I have not found a way to ignore paths to directories which only contains other subdirs or nothing at all in any easy way. I may offcourse test each directory after they are listed but this gives an extra loop to go through and I beleive it should be possible to do it directly when creatring the list. I guess by using find or ls in conjuntion with the tree command or by itself it should be possible but I am not to conversant of nested script commands.
I want to make a program that maintains a list of tags that can be attached to a set of files. Store the tags in the files. The main problem is that there is no way to get a list of all the tags without reading each and every file. And also what if you have an unused tag? Have a file that contains tag "keys" and file list "values". This seems like it would be fast and effective, but what if one of the files gets renamed?
I have a script from which i want to disable unwanted services. I wanted to have the list of unwanted services in the same script file. I tried the following, but it is not working...How do I mention list of services in the same file and still make the script work ?
Code: #/bin/bash #List of services, modify list between SERVICES tag service_list=$(cat <<SERVICES acpid apmd avahi-daemon
I'd like to turn the output of "yum list installed" into a file list I can use to setup other machines? Something similar to "yum -y install < listofinstalled.txt" or something?
I have a file with 5000 lines. it is a list of books authors, series and titles. all lines start with the author names, than there is a dash (-) than the series name, a dash again and the title of the book.
The problem I encounter is that sometime there is a series, sometime not, and as I try to enter this list in a database, I wanted to create a cvs file to import into mysql.
ex:
The best would be to be able to add in the second line, a "space dash space" just after the author name, but how to make sure it does not do it to the first line as well.
If I could separate all line with 2 dash, (grep ?) then I would be able to do a simple replace, and change the single dash into two.
I am sitting here at my computer at 2:30am on a saturday morning with no idea what the hell im doing. But here's my goal I have a KML File for Google Earth. This file is generated with the GPS locations of certain sites.
I have a text file with extra information about certain sites. What i'm trying to figure out how to do is by using perl I want to open the text file grab the first location on line one and search for it in the KML file. When that line is found I want to edit the Description field in that KML file and add something to the description and change the placemark from Yellow to Blue.
Can anyone give me advice on the best way to handle this and where I can start. I can understand if nobody wants to give me the answer directly but I would like to be pointed in the right direction
Im looking to use PHP to list a directory. When I click on a filename, I'd like it to automatically remove the first 16 characters off of the filename and save it to the filesystem.
I am trying to compare a list of patterns from one file and grep them against another file and print out only the unique patterns. Unfortunately these files are so large that they have yet to run to completion. Here's the command that I used:
Code: grep -L -f file_one.txt file_two.txt > output.output Here's some example data:
Initially I thought - use a for loop with ls in it:
Code:
However this causes lots of problems (folders have extensions, I have duplicate folders, the names with spaces create a folder for each element of the name).
The contents of the folder is basically movies (some with subtitles). Some of the names have things like (original) or CD1 CD2 in them.
I'm trying to use zenity in a bash script to display a .csv file using '--list' to allow the user to edit some of the values.I can display it fine but i'm unsure how to edit the data? all i can get is whichever line is highlited when hitting ok on the zenity dialog to print.the data in the csv is arranged:
I am completely new to compiling the kernel. Trying to compile on an old Dell C610 laptop that has Debian 6.01 installed and working. Here is what I have done so far:
Downloaded linux-3.0.tar.bz2 to home directory Also downloaded patch-3.0-git13 to home directory tar xjfv linux-3.0.tar.bz2 which uncompressed the tar ball in the created the linux-3.0 directory in my home directory
Is there a way to set Firefox to place downloaded files in different folders based on the file type?e.g. in my Downloads folder place all .doc files in a sub-folder called ".doc", all .jpgs in a sub-folder called ".jpg"I'd assume there's probably a rule, or a script that can be used to accomplish this, but being a graduate student, I don't have alot of free time to poke around and figure it out myself
suppose i have two file with same name fstab one file is located in /etc and the other is located in /root/ If i make a change in /etc/fstab file the changes has to reflect in /root/fstab . Is there any command to do this?
I need to use wget (or curl or aget etc) to download a file to two different download destinations by downloading it in two halves:
First: 0 to 490000 bytes of file Second: 490001 to 1000000 bytes of file.
I will be downloading this to separate download destinations and will merge them back to speed up the download. The file is really large and my ISP is really slow, so I need to get help from friends to download this in parts (actually in multiple parts)
The question below is similar but not the same as my need: How to download parts of same file from different sources with curl/wget?
aget
aget seems to download in parts but I have no way of controlling precisely which part (either in percentage or in bytes) that I wish to download.
Extra Info
Just to be clear I do not wish to download from multiple locations, I want to download to multiple locations. I also do not want to download multiple files (it is just a single file). I want to download parts of the same file, and I want to specify the parts that I need to download.
I have written a small script from that iam appending the output to a file.If multiple users invoke the same script or if i invoke the same script n number of times (using &), the output file(ZZ/OUT) contains messup information.
I recently viewed a few .mpg s from the Internet by selecting to open them in movie player. Those videos are listed in the recently opened files list under the 'Movie' menu. I was trying locate these files on my computer since I can still play them by clicking on them in the 'Movie' menu, but I can't figure out where they are. I tried using 'locate' on the command line and it isn't bringing anything up. Can anyone tell me how to find the location of these files?
I have several albums in my Rhythmbox library that I originally ripped in 128kbps and have listened to many times. I'd quite like to reimport the songs in higher quality now but don't want to lose the playcounts associated with them.Is there any way to transfer the playcount over to the new file as it were, or to manually edit the playcount or file location?
How would I list 4 users ID numbered 10, 11, 12 and 13 from my users list and output them to a file busers where their names are numbered by ascending order? How would I accomplish that on a one line command?
I am trying to get this script to work. The purpose is to download a list of modules from the slax.org the list consist of a list of module numbers. What I am trying to do is Download the file or the file name corresponding to the number in the list.the list is comma delimited. this is what I have done so far and I am a stand still.
#!/bin/sh # Wget script to retrieve modules from slax.org modules # # ----Begin of user defined values ----- # Path to wget
I have an environment where i have recursive make files (that is one main and in each directory of a project a file.mk with rules for that directory).Since i'm not the one who wrote it i'm not familiar with it. I would like to explore when i run certain targets how the rules work, which files cause dependency rules to work and why. Also i would like to know ALL the targets that are available to me. i couldn't find any way to 'debug' makefiles or to put it in such debug mode that i see all the information i need when i run a certain target.
I am trying to compile a C++ source file into a static library using make with root privileges (i.e., using "sudo"). However, I "sometimes" get the following compilation error:
Code: g++ -Wall -g -fPIC -W -c /home/project/ether/src/packet-ethernet.cc ar -cvq libether.a /home/project/ether/src/packet-ethernet.o ar: /home/project/ether/src/packet-ethernet.o: No such file or directory make: *** [libether.a] Error 1
I checked /home/project/ether/src folder to see if packet-ethernet.o in fact does not exist, and saw that it is actually located there, but its owner is "root", which is different from the current user. If I change the owner of packet_ethernet.o from root to the current user using "chown" command and execute make again with sudo, everything seems to be fine.
It may be a coincidence that I recently migrated to 64-bit platform from 32-bit, and then installed libboost-filesystem1.40-dev. After that, I began to experience such errors. I have "never" come across such a compilation error before. Even though I completely removed libboost-filesystem1.40-dev afterwards to see if it causes the problem, nothing changed.
After migrating to 64-bit and installing libboost-filesystem1.40-dev, my application exhibited another "weird" behaviour such that it produced "hidden" files using mkdir() system call, which were previously created as regular ones on the filesystem. Can compiler options that I use cause such problems? Is it possible that libboost-filesystem1.40-dev overwrote some system libraries so that I am getting such errors ?
My assessment is making a tree from a text file as follows: -reading a file line by line
-making a binary tree from it - traverse by level the binary tree - posting the traversal result to the same file without overwriting the text file- it is required to be append to the bottom of the text file (i have to do this in 4 languages: c#,PHP from Xampp,java, python)
i read the file with this script in java: public class FileToStringArray { privateString strLine; privateString[] stringArray; privateFileInputStream in;