فرق اين دوتا( build با make) چيه ؟ جفتشون يك سري فايل مشترك ميسازند.
Printable View
فرق اين دوتا( build با make) چيه ؟ جفتشون يك سري فايل مشترك ميسازند.
سلام
سوالتون یکم نامفهومه، ولی اگه به کامپایل برنامه ها ربط داره به این صورته
Build رو عموما در IDE ها میبینیم که میزنیم برنامه کامپایل میشه (اینو که همه میدونیم:31:)، در این مورد زیاد درگیر جزئیات نمیشیم
make هم برای کامپایل هست با این تفاوت که تمام روند کامپایل درون فایلی بنام makefile قرار میگیره برای خودکار سازی عمل کامپایل
اینکه چه سورس فایلهایی با آبجکت فایل یا کتابخانه ایی در ساخت برنامه دخلین و ...
بیشتر پروژه هایی که بصورت خط فرمانی کامپایل میشن از این روش استفاده میکنند
:11:
من اينو تويه borland c++ ديدم . چرا جفت اينا رو گذاشته ؟
مگه build چي كار ميكنه كه make نميكنه , يا برعكس ؟
در ضمن make file رو هم پيدا نكردم !
exe رو تويه make file ميسازه ؟
در این مورد چون این که گفتین مربوط به کامپایلر برلند میشه بهتره به مستنداتش رجوع کرد
مثلا من نسخه 5.02 رو دارم این توضیحاتی هست که در این کامپایلر آمده
Make All
Build Allکد:This command makes the targets of the current project.Project | Make All
If you choose Make All, the project tree MAKEs all targets. It checks file dates and times to see if they
have been updated. If so, the project tree rebuilds those files, then moves up the project tree and
checks the next nodes' file dates and times. The project manger checks all the nodes in a project and
builds all of the out-of-date files.
The .EXE file name is fully spelled out in the project tree for target names. If no project is loaded,
the .EXE name is derived from the name of the file in the Edit window.
The Make All command rebuilds only the files that are not current. If you choose Make All after a failed
Build All command, Make All rebuilds from the point of failure.
همونطور که میبینید make all فقط فایلهایی که تغییر داده شدن رو کامپایل میکنهکد:
The Build all command rebuilds all the files in the current project, regardless of whether they are out
of date.
This option is similar to Project|Make All, except that Build All rebuilds all the files in the project
whether or not they are current.
Build All builds the project using the Default Project Options Style Sheet unless you have attached a
different Style Sheet to a node or overridden the options locally.
For example, if you have a project with an .EXE target that is dependent on a .CPP file, and the .CPP
is dependent on two .H files, the project tree checks the dependencies for the two .H files first, then
it compiles the .CPP file to an .OBJ, and finally, the project uses the new .OBJ file to link the .EXE.
Build All:
1. Deletes the appropriate precompiled header (.CSM) file, if it exists.
2. Deletes any cached autodependency information in the project.
3. Does a rebuild of the node.
If you abort a Build command by pressing Esc or choosing Cancel, or if you get errors that stop the
build, you must explicitly select the nodes to be rebuilt.
ولی build all کل فایلها رو چه تغییر داده شده یا نشده دوباره کامپایل میکنه
وقتی از IDE استفاده میکنید این فایل ساخته نمیشهنقل قول:
در ضمن make file رو هم پيدا نكردم !
البته کامپایلر ها احتمالا یه بخشی دارن که این فایل رو براتون میسازه
و در حالتی که ide در کار نباشه یا ندارین باید خودتون این فایل رو بسازین
نه exe جدا ساخته میشه، makefile یک فایل متنی هست ربطی به فایل exe ندارهنقل قول:
exe رو تويه make file ميسازه ؟