This image is able to complete, adding and removing file from the Makefile of a project.
336
This program was done to be runned on a container in the background and do all the tasks mentioned below.
If we create a new file in the project structure, it will be noticed by the program.
If the extension of the file is .c it would be follow on the add function to add a new line on the Makefile. If the file hasn't .c extension the program will continue to listen the folders.
If we remove a file in the project structure, and the file has the .c extension, the line containing the filename on the Makefile will be removed.
If we move a file in the project structure, it will find the Makefile at the root of the project structure where it was and erase the line. After doing this it will add a new line to the Makefile at the root of the project structure where it is now.
This project consist on a program that will be running in background and will complete your project Makefile.
This program is based on my Makefile model:
SRC\t= variableSRC_DIR and in the line it would be: \t$(SRC_DIR)/\t\src/TESTS\t= variableTEST_SRC a d in the line it would be: \t$(TEST_SRC)\t\tests/SRC\t=\t\tmy/| Folder in project structure | Varaible containing realpath | Variable containing files | Line exemple file.c | |
|---|---|---|---|---|
| Source files | src/ | SRC_DIR | SRC\t= | SRC\t=\t$(SRC_DIR)/file.c\t\ |
| Test files | tests/ | TEST_SRC | TESTS\t= | TESTS\t=\t$(TEST_SRC)/file.c\t\ |
| Lib files | my/ | The files are in the root with the Makefile | SRC\t= | SRC\t=\tfile.c\t\ |
To use the program you are not requiered to clone the repository. If you have a Makefile that is similar to the ones on the testing/ folder. You can pull the docker image of the program:
docker pull colcolt/makefile_completer
And run it with the following command:
docker run --name MakefileCompleter -d -v "$PWD:/home" --restart=always colcolt/makefile_completer
Once you have run your docker it will be running for ever on the background, even if you restart your computer.
Therefore there is a script in the repository that can create the apropiate Makefile for the program
If you clone the repository, there is a Makefile to make everything easier for you.
If we enter make on the command line it would build and run our docker.
For the other rules enter make <rule> in the command line.
The rules are:
REMEMBER TO RUN THE MAKE THERE WHERE YOU WANT TO THE PROGRAM LISTEN. IT COULD NOT LISTEN ON ALL YOUR FILES, SO DO IT ONLY ON THE PARENT FOLDER OF YOUR PROJECTS.
If you want to contribute to the project, you need to fork this repository, add all your features and then make a pull request to the develop branch of this repository. I will review your PR as soon as possible and see if we can add the feature.
Therefore if you have an idea or a bug to report you can create a new issue and describe all in it.
Content type
Image
Digest
Size
343.2 MB
Last updated
over 7 years ago
docker pull colcolt/makefile_completer