मैं एक सॉफ्टवेयर ढेर है कि निर्माण प्रक्रिया के एक भाग के रूप में कुछ मध्यवर्ती फ़ाइलें बनाता है पूर्ववत कैसे करें। कुछ समस्या आती है और निर्माण टूट जाता है। मैं उन मध्यवर्ती जेनरेट की गई फाइलों पर एक नज़र रखना चाहता हूं। मेरी आश्चर्य के लिए उन फ़ाइलों को निर्माण प्रक्रिया के हिस्से के रूप में हटाया जा रहा है।मध्यवर्ती फ़ाइल हटाने की
Removing intermediate files...
rm fact_test_without_proxies.c fact_test_main.c fact_test_without_proxies.o
मैं मेकफ़ाइल के माध्यम से गया, मुझे उन्हें हटाने के किसी भी स्पष्ट नियम नहीं दिख रहे हैं। मध्यवर्ती फ़ाइलों को हटाने के लिए कोई निहित नियम हो सकते हैं। यदि हां, तो मैं उन निहित नियमों को कैसे अक्षम कर सकता हूं?
मैं विकल्प के साथ निष्पादित होने पर केवल Removing intermediate files...
प्रिंट देखता हूं।
[email protected]:~/coding/factorial/ut$ make --debug
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
Reading makefiles...
Updating goal targets....
File `check' does not exist.
File `test_dept_run' does not exist.
File `fact_test' does not exist.
File `fact_using_proxies.o' does not exist.
File `fact_test_without_proxies' does not exist.
File `fact_test_without_proxies.o' does not exist.
File `fact_test_without_proxies.c' does not exist.
File `fact_test_main.c' does not exist.
Must remake target `fact_test_main.c'.
nm -p fact_test.o | build_main_from_symbols >fact_test_main.c
Successfully remade target file `fact_test_main.c'.
Must remake target `fact_test_without_proxies.c'.
cp fact_test_main.c fact_test_without_proxies.c
Successfully remade target file `fact_test_without_proxies.c'.
Must remake target `fact_test_without_proxies.o'.
gcc -I../src -c -o fact_test_without_proxies.o fact_test_without_proxies.c
Successfully remade target file `fact_test_without_proxies.o'.
Must remake target `fact_test_without_proxies'.
gcc fact_test_without_proxies.o fact.o fact_test.o -o fact_test_without_proxies
fact.o: In function `unknown':
fact.c:(.text+0x67): undefined reference to `do_update'
collect2: ld returned 1 exit status
make: *** [fact_test_without_proxies] Error 1
Removing intermediate files...
rm fact_test_without_proxies.c fact_test_main.c fact_test_without_proxies.o
धन्यवाद यह वास्तव में मदद करता है :) – Kamath
न केवल इसका उपयोग करके। PRREIOUS इसका अर्थ यह है कि इन फ़ाइलों को हटाया नहीं जाएगा भले ही सफलतापूर्वक पूर्ण हो (यानी, मारे गए या बाधित नहीं हैं)। "इसके अलावा, अगर लक्ष्य एक मध्यवर्ती फ़ाइल है, यह यह अब की जरूरत है के बाद, के रूप में सामान्य रूप से किया जाता है को हटाया नहीं जाएगा। [...] इस बाद सम्मान यह .SECONDARY विशेष लक्ष्य के साथ ओवरलैप हो में।" - https://www.gnu.org/software/make/manual/make.html – PonyEars
+1: विपरीत '.SECONDARY', इस POSIX है: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ make.html –