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?
135 Views Asked by Michael57 At
2
There are 2 best solutions below
Related Questions in MAKEFILE
- Error trying to generate Makefile for glBinding
- Eclipse Makefile: Make Variables are skipped
- Errors in makefile for qemu 0.14.1 in ubuntu 15.04 64 bit
- C++ Struct prototyping in separate header file
- Reuse jquery plugin without conflict
- How do I a conditional build through a make file?
- basic makefile ifeq how to
- (automake, libtool) build fails in automake when using same source file name in different directory
- Makefile pattern rules differences
- Errors while trying to run make on source code
- Git tag name as version in Go via Travis-CI
- gcc make -properly sort out the sequence of making object files
- AOSP ROM for Samsung Grand duos GT-i9082 Error loading kernel
- How to address multiple definition compiler error
- How does MAKE remember the file timestamps
Related Questions in GNU
- How can I compile *without* various instruction sets enabled?
- Copy directory in GnuParallel
- Gnu Parallel - decrypt and send file content to a Python script
- in Makefiles, how to test for gcc's --with-ld option?
- How does GNU make's "file" function work?
- How we can get time of individual test cases in DejaGnu
- Error: gsl/gsl_file.h : No such file or directory found
- How to generate Label debug info in GreenHills assembler?
- Comparing timespec values
- Using find command to search for files in one directory which are not in the other, then move them
- How to address the error has both : and :: entries while using gnu make
- How to build a './configure && make && make install' software against a custom library which I also build?
- Compile coretuils as shared objects?
- Unknown symbol in module
- Where can I get the source and header files for the gnu.org Simple Makefile?
Related Questions in VARIABLE-SUBSTITUTION
- Does R support indirect variable expansion or variable substitution?
- Bash: Insert variable content into command substitution as arguments - how to quote correctly?
- Dotnet framework - Nlog configuration change using variable substitution in TFS cd pipeline
- How to avoid variable substitution in Perl regex?
- $_SESSION[] inside of Double quotation
- Django variable substitution in the include template tag
- Azure DevOps Pipeline Json Variable Substitution - Ocelot.json
- Substituting variable in a dataframe row based on other row's value
- Getting a count of rows inserted in a Snowflake procedure
- Ruby variable subsitution in method call
- Azure DevOps Pipeline Json Variable Substitution - Microsoft.Hosting.Lifetime
- ##[error]Error: NO JSON file matched with specific pattern: **/appsettings.json
- Embedded parameter substitution
- Xml Transformation and Variable substitution doesn't work when both selected in Azure DevOps
- How can I have Octopus do variable substitution during or after applying a configuration transform?
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 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: