Makefile文件太多
[[email protected] DarwinStreamingSrvr6.0.3-Source]# find -name Makefile.POSIX ./APIModules/QTSSDemoAuthorizationModule.bproj/Makefile.POSIX ./APIModules/QTSSDemoRedirectModule.bproj/Makefile.POSIX ./APIModules/QTSSHomeDirectoryModule/Makefile.POSIX ./APIModules/QTSSRawFileModule.bproj/Makefile.POSIX ./APIModules/QTSSRefMovieModule/Makefile.POSIX ./APIModules/QTSSSpamDefenseModule.bproj/Makefile.POSIX ./CommonUtilitiesLib/Makefile.POSIX ./HTTPUtilitiesLib/Makefile.POSIX ./Makefile.POSIX ./MP3Broadcaster/Makefile.POSIX ./PlaylistBroadcaster.tproj/Makefile.POSIX ./QTFileLib/Makefile.POSIX ./QTFileTools/QTBroadcaster.tproj/Makefile.POSIX ./QTFileTools/QTFileInfo.tproj/Makefile.POSIX ./QTFileTools/QTFileTest.tproj/Makefile.POSIX ./QTFileTools/QTRTPFileTest.tproj/Makefile.POSIX ./QTFileTools/QTRTPGen.tproj/Makefile.POSIX ./QTFileTools/QTSampleLister.tproj/Makefile.POSIX ./QTFileTools/QTSDPGen.tproj/Makefile.POSIX ./QTFileTools/QTTrackInfo.tproj/Makefile.POSIX ./qtpasswd.tproj/Makefile.POSIX ./StreamingLoadTool/Makefile.POSIX ./StreamingProxy.tproj/Makefile.POSIX [[email protected] DarwinStreamingSrvr6.0.3-Source]#
经过查看之后,大多数文件内容格式如下:
.cpp.o: $(C++) -c -o $*.o $(DEFINES) $(C++FLAGS) $*.cpp .c.o: $(CC) -c -o $*.o $(DEFINES) $(CCFLAGS) $*.c
执行批量更换
[[email protected] DarwinStreamingSrvr6.0.3-Source]# find -name Makefile.POSIX | xargs sed -i ‘/.cpp.o/a\\t$(C++) -E -o $*.i $(DEFINES) $(C++FLAGS) $*.cpp‘ [[email protected] DarwinStreamingSrvr6.0.3-Source]# find -name Makefile.POSIX | xargs sed -i ‘/.c.o/a\\t$(CC) -E -o $*.i $(DEFINES) $(CCFLAGS) $*.c‘
批量更换之后:
.cpp.o: $(C++) -E -o $*.i $(DEFINES) $(C++FLAGS) $*.cpp $(C++) -c -o $*.o $(DEFINES) $(C++FLAGS) $*.cpp .c.o: $(CC) -E -o $*.i $(DEFINES) $(CCFLAGS) $*.c $(CC) -c -o $*.o $(DEFINES) $(CCFLAGS) $*.c
时间: 2024-11-08 07:56:07