Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have this bash script. When I enter make tar, it creates the tar archive however it includes all of filetype .cc and .h. I
I have this bash script. When I enter "make tar", it creates the tar archive however it includes all of filetype .cc and .h. I want to exclude a certain file (named test.cc) from the tar process. How do I do that? (In addition, please include a way to exclude multiple files if later I need to exclude multiple files from the tar process).
CXXFLAGs-Wall-Wextra -Wpedantic -Werror -Wfatal-errors assignment-hw6 lib-$(assignment).a $(lib): Alpha.o PGM.o Image.o $(AR)-rcs $@ $? Alpha.o:Alpha.cc Alpha.h Image.h PGM.o:: PGM.cc PGM.h Image.h Image.o::Image.cc Image.h tar: tar -cv $(MAKEFILE_LIST)*.cc*.h>$(assignment).tar test: $(lib) $(CXX) $(CXXFLAGS) test.cc $(lib) ./a.out clean: rm -f $(assignment) $(assignment).fa,tar*.o*.gch a.out CXXFLAGs-Wall-Wextra -Wpedantic -Werror -Wfatal-errors assignment-hw6 lib-$(assignment).a $(lib): Alpha.o PGM.o Image.o $(AR)-rcs $@ $? Alpha.o:Alpha.cc Alpha.h Image.h PGM.o:: PGM.cc PGM.h Image.h Image.o::Image.cc Image.h tar: tar -cv $(MAKEFILE_LIST)*.cc*.h>$(assignment).tar test: $(lib) $(CXX) $(CXXFLAGS) test.cc $(lib) ./a.out clean: rm -f $(assignment) $(assignment).fa,tar*.o*.gch a.out
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started