Say I have a list of files with mixed suffixes, e.g. .cpp and .c, and I want to make a list where each .cpp and each .c extension is changed to .o. I realize I could sequentially process my list multiple times, one for each extension of interest. But is there a way to use a variable substitution to do it in one step?
Can a Gnu Make variable substitution expression match more than one pattern?
136 Views Asked by Michael57 At
2
There are 2 best solutions below
Related Questions in MAKEFILE
- How to refer to the filepath of test data in test sourcecode?
- Can't connect to postgres with Adminer using Docker on MacOS
- Flint installation error: make: *** [build/generic_files/memory_manager.lo] Error 1
- How to compile the Linux kernel with -O0 for more detailed debug?
- Makefile:7: *** missing separator. Stop (HELP NEEDED)
- Trying to compile GCC returns a bunch of errors
- cmake and g++ cross compilation looking for library in host sysroot path instead of target sysroot
- Turn a makefile into a list of build commands
- make test error with Golang: make: *** [Makefile:47: manifests] Error 126
- Passing optional arguments from makefile to shell script
- GNU make file pairwise combinations of files in folder
- make Error 2, The system cannot find the file specified
- Why do I get a make: *** No target specified and no makefile error?
- why does Make give error while compiling?
- CMake always rebuilding included file even if it didn't change
Related Questions in GNU
- Library problem in an executable with Raspberry Pi5 (No such file or directory problem)
- Why is the last file not recompiled?
- Handling Empty Sections in Linker Script Causes Hard Fault on STM32H7
- Gnu screen - how do I move focus to a region by number?
- How to stop a wget mirror?
- I got a Assembler error while compile mt19937
- Build gcc with a different name
- Not able to install and build the riscv-gnu-toolchain
- Make : make[2]: *** No rule to make target '<path/to/.so>', needed by '<target>'. Stop
- MinGW c compiler not working (cc1.exe application error)
- Command to find ARM GCC Port
- RISC-V toolchain + googletest: undefined reference to `getcwd', `mkdir`
- Clang tidy problem with _Float32, _Float64, _Float128
- How to resolve C printf %b format warnings
- Querying the Target of a Linker Script?
Related Questions in VARIABLE-SUBSTITUTION
- File-transform-task in Azure DevOps release-pipeline not substituting variables
- Solved: How do i loop through arrays using variable expansion on strings in batch?
- Makefile: Substituting suffix of variable before evaluation
- Variable substitution: How to update values in a json file and then save the output of the now substituted file
- Can a Gnu Make variable substitution expression match more than one pattern?
- Editing TXT file content using a wildcard
- Environment variables substitution in C
- Excel Summing Un-Formatted Numbers
- Call a .NET method with part of the method name replaced by a variable
- How to add variables in a call to Start-Process
- Azure DevOps Pipeline Json Variable Substitution - Ocelot.json
- Passing variables from bash script into Oracle SQL*Plus
- Embedded parameter substitution
- Getting a count of rows inserted in a Snowflake procedure
- Substituting variable in a dataframe row based on other row's value
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You could always just remove any suffix, like this: