From 49d335117520a15adacc5b950c3adfa09be078f4 Mon Sep 17 00:00:00 2001 From: Casper Hornstrup Date: Thu, 20 Jan 2005 22:19:01 +0000 Subject: [PATCH] * Build bin2res, winmm, comctl32, aclui, acledit * Correct dependencies for build tool invocations * Normalize paths in the generated makefile svn path=/branches/xmlbuildsystem/; revision=13168 --- reactos/lib/acledit/acledit.xml | 14 +++ reactos/lib/aclui/aclui.xml | 18 ++++ reactos/lib/comctl32/comctl32.xml | 51 +++++++++ reactos/lib/comctl32/idb_hist_large.bmp | Bin 0 -> 1558 bytes reactos/lib/comctl32/idb_hist_small.bmp | Bin 0 -> 1418 bytes reactos/lib/comctl32/idb_std_large.bmp | Bin 0 -> 2774 bytes reactos/lib/comctl32/idb_std_small.bmp | Bin 0 -> 1824 bytes reactos/lib/comctl32/idb_view_large.bmp | Bin 0 -> 2270 bytes reactos/lib/comctl32/idb_view_small.bmp | Bin 0 -> 4150 bytes reactos/lib/comctl32/idc_copy.cur | Bin 0 -> 326 bytes reactos/lib/comctl32/idc_divider.cur | Bin 0 -> 326 bytes reactos/lib/comctl32/idc_divideropen.cur | Bin 0 -> 326 bytes reactos/lib/comctl32/idc_movebutton.cur | Bin 0 -> 326 bytes reactos/lib/comctl32/idi_dragarrow.ico | Bin 0 -> 326 bytes reactos/lib/comctl32/idi_tt_error_sm.ico | Bin 0 -> 318 bytes reactos/lib/comctl32/idi_tt_info_sm.ico | Bin 0 -> 318 bytes reactos/lib/comctl32/idi_tt_warn_sm.ico | Bin 0 -> 318 bytes reactos/lib/comctl32/idt_check.bmp | Bin 0 -> 398 bytes reactos/lib/directory.xml | 12 +++ reactos/lib/winmm/winmm.xml | 29 ++++++ reactos/tools/bin2res/bin2res.xml | 6 ++ reactos/tools/rbuild/backend/mingw/mingw.cpp | 6 +- .../rbuild/backend/mingw/modulehandler.cpp | 97 ++++++++++++++---- .../rbuild/backend/mingw/modulehandler.h | 9 +- reactos/tools/rbuild/makefile | 1 + reactos/tools/rbuild/module.cpp | 11 +- reactos/tools/rbuild/rbuild.h | 3 + reactos/tools/rbuild/test.h | 7 ++ reactos/tools/rbuild/tests/alltests.cpp | 1 + reactos/tools/rbuild/tests/functiontest.cpp | 9 ++ reactos/tools/tools.xml | 3 + 31 files changed, 249 insertions(+), 28 deletions(-) create mode 100644 reactos/lib/acledit/acledit.xml create mode 100644 reactos/lib/aclui/aclui.xml create mode 100644 reactos/lib/comctl32/comctl32.xml create mode 100644 reactos/lib/comctl32/idb_hist_large.bmp create mode 100644 reactos/lib/comctl32/idb_hist_small.bmp create mode 100644 reactos/lib/comctl32/idb_std_large.bmp create mode 100644 reactos/lib/comctl32/idb_std_small.bmp create mode 100644 reactos/lib/comctl32/idb_view_large.bmp create mode 100644 reactos/lib/comctl32/idb_view_small.bmp create mode 100644 reactos/lib/comctl32/idc_copy.cur create mode 100644 reactos/lib/comctl32/idc_divider.cur create mode 100644 reactos/lib/comctl32/idc_divideropen.cur create mode 100644 reactos/lib/comctl32/idc_movebutton.cur create mode 100644 reactos/lib/comctl32/idi_dragarrow.ico create mode 100644 reactos/lib/comctl32/idi_tt_error_sm.ico create mode 100644 reactos/lib/comctl32/idi_tt_info_sm.ico create mode 100644 reactos/lib/comctl32/idi_tt_warn_sm.ico create mode 100644 reactos/lib/comctl32/idt_check.bmp create mode 100644 reactos/lib/winmm/winmm.xml create mode 100644 reactos/tools/bin2res/bin2res.xml create mode 100644 reactos/tools/rbuild/tests/functiontest.cpp diff --git a/reactos/lib/acledit/acledit.xml b/reactos/lib/acledit/acledit.xml new file mode 100644 index 00000000000..c897cf6f243 --- /dev/null +++ b/reactos/lib/acledit/acledit.xml @@ -0,0 +1,14 @@ + + + . + + + + ntdll + kernel32 + advapi32 + user32 + acledit.c + stubs.c + acledit.rc + diff --git a/reactos/lib/aclui/aclui.xml b/reactos/lib/aclui/aclui.xml new file mode 100644 index 00000000000..ab7a25b825a --- /dev/null +++ b/reactos/lib/aclui/aclui.xml @@ -0,0 +1,18 @@ + + + . + + + + + 0x0500 + 0x501 + 0x0600 + rosrtl + ntdll + kernel32 + user32 + comctl32 + aclui.c + aclui.rc + diff --git a/reactos/lib/comctl32/comctl32.xml b/reactos/lib/comctl32/comctl32.xml new file mode 100644 index 00000000000..beb58470b78 --- /dev/null +++ b/reactos/lib/comctl32/comctl32.xml @@ -0,0 +1,51 @@ + + bin2res + winebuild + + . + include/wine + + + + + 0x600 + 0x501 + 0x501 + wine + ntdll + kernel32 + advapi32 + gdi32 + user32 + winmm + animate.c + comboex.c + comctl32undoc.c + commctrl.c + datetime.c + draglist.c + flatsb.c + header.c + hotkey.c + imagelist.c + ipaddress.c + listview.c + monthcal.c + nativefont.c + pager.c + progress.c + propsheet.c + rebar.c + smoothscroll.c + string.c + status.c + syslink.c + tab.c + toolbar.c + tooltips.c + trackbar.c + treeview.c + updown.c + rsrc.rc + comctl32.spec + diff --git a/reactos/lib/comctl32/idb_hist_large.bmp b/reactos/lib/comctl32/idb_hist_large.bmp new file mode 100644 index 0000000000000000000000000000000000000000..20596fac20a9c493f0c6c3062ba19ded66198c41 GIT binary patch literal 1558 zcmd5*%}T^D5FVxW(u;Ty&z^jYMZzK!Un2y(i^n~b*vIe@awvQ0rEgZhnKXZ0Eh{28 zWTrE1zIppw+G>2sylQ9U9%;jSN;fjh#uu7@gWVv@ NKCyg%0h7J$`%l1%tDFD; literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idb_hist_small.bmp b/reactos/lib/comctl32/idb_hist_small.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3cc2ab4e51ac06c2f164502ce551702f4ad22484 GIT binary patch literal 1418 zcmchW!EM7Z3`N;UH3IZvEA0-MqxS-x!gKhX4Z4j7@J{X{DM2!lz;F+xO-ZEnzrHB> z^Xv91W;fa^{*Cwei=1gOzNa_$4?^{IU1=wKWtwz^YfDc&&od+D=rrb9M{BTgl!d|1 zg42)7A`9d5e_OXPU%g2kl@l(lbp~&8Bw}m3^r0UTPsE4elKJ|SBB^MJNO9HGV&(Ix zIj%tfo1#7MEnh;_kaU5^d|jo0vqr|JU{wiROQ$&!5ISF{`p7r>h^kcOE1_ef6ghyz zHN*H+ANWFGv^Bod2eYlAC3vP!;dgwVa4l9pE0^o*-Ttf(KFsQ;`uqw7jNL>zR==!; zPUWaR3do6syrYBXo3FEqQ8}HQP7-wtoiRS<^Ka#h^U@jyX~j4n5^aX_9r`~Y%wl{k j*GJ9lQt2tSbj|-!r0w)pzm2{fz|Lp8TIG7#ez$;MmwifI literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idb_std_large.bmp b/reactos/lib/comctl32/idb_std_large.bmp new file mode 100644 index 0000000000000000000000000000000000000000..4f0e09e7e2e7af8039fed9b665dfb3cdde2f8b90 GIT binary patch literal 2774 zcma);J8v6D6ou!tJIf`-)hm`CLENS^AO~=eCJ7c`6|hR}0BM|#g^}rE0xGP^K>mrV zG%oC4k-wnMU|}Ez1bFhDS(2h82Z+Sk9q!KDd+xdC-rB{HbyLUX&i(Eb?XU!P=>yf^v-;yyg`97zo%<5!ko^hO} z{nKP)oes>ybZG7+XMEZ>kCN;6858E!&ia6by=3Q;Y-f9E+&@mi+)1|UvW)>7qh!55 z9bv-+|0uBAC(p3mloeCvUnM`YGiF>{JWo@ItllCLDvin3i=B_~_Bd4r&oOSjIn$lm z*xc|qcyi#{^(x$V@aaIW>)_c%zi|KI+vUdC>^|%zH;=}Bkbf}A-#S{~$v=3mMQpn^ zw@SwF29hro^?`8dST-kY@ zrGcRA7fci8;5T;RRfSuo;^jWkxrINS7{9}m|HCKu@-|m(sQ^_2d0lO=`BWdkaqNG@(vW!UoNF|E>CiI^U#R*LiE)EBepNQmJcwjY`hQ7b>#<_(f!W z{3KlBiM*eL)EQ}u!$Dk?Ol-K~oXAzrZa;luBT@8j=AWxJhWwdo_I!4}2Vc`Gblv{t zZFE%RsCl2x<1==4^qDRc{WsEoudXRx{0n7JkqsE}d?Jk8J1UUJLq>x#U0B0zn13MO z&Gf7woMC6J`Qfhb|A)V!m${|-p3j_4*+*Y6#-g-9PITJDPr^7#rs_UjoC`JI3qsYQ zm{VqXW_&E~*2-&&`UfV-Kdh=J4tKO#`oON@>dP@b_cBSctTpz`JvyK^JH`RXuwGQr=2{)9 z3*`6c1~PRsypq)>vM9{BRHX*CxL#cRI@E!~qQ(`fbq8DN7l67vs7st;v!xnffxPJY zEmqaVmH!qM4H*hlQpK*%u?3t3{@|%}>Yfvuxv67*&*@;J)GKzRU^GTu2tzqlN<>mv zw<0r*KQqnv_4u`?7M|d5a~`#2#XaoYMxecL$QdOBIwvBX8J^EUegUrK3BHvfMYQ4J zHU{5K@fhAzMxN14IiK6?y9Zd^_*JgNi|>wz06(GV%iM*TCV6nC<=x`X9mt>JW$%r6 zojF2N-{EJ9AFN=}8BRPbO4A!})WT};=QvUMCBb=$KH`0L5wE#Vw`1nrm1hu@XP{tFE*1qA>A literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idb_std_small.bmp b/reactos/lib/comctl32/idb_std_small.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8318e447fe20535ca17766a719a84e4f88d49bbe GIT binary patch literal 1824 zcmZvc&1xe@5XWnqrrnH%kVObOEn(TilB>acHK7S}$t6!PAk%8_CE%d!QG%gWkV~E; zr#<GKENZF9Y=Q2}g8ADOhU%IQWv4R+C8FGLh zXfE6P)OU)aV;n4Y-s*tkIY#q#>qKA6&2bE}$u9;$d{F!O8XC4k0 zZZ)F@r5Ypg;|*)9AwN0eu9*z0Bj|8YM=cwZShJc#1C@fu@bMmUxYpdcoZOj}e~gK_ zJWwlq>(q!etetUKmbq5k*%w+jz=94ctp_0F!(cAZA0fFPjj?soiG}!)X)%3A7Iea` z#Pj1cT+#WbDt){8e6T7>r~wb?SUeh&7SJkr<3@DLJ*@UsBAx2;*R{_ zFo{XmTU7W>W8JHD+SIwGBI!uB7tYuuoiovex4u3(gBRJJ3<2kZRCDxbhRr3go%QK5UeYMRnyItl4 mgBkv$Vj4I#cyHYDQr(5sG-f;Z|6so>-^2YIb*rU`eDyDj`HhzV literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idb_view_large.bmp b/reactos/lib/comctl32/idb_view_large.bmp new file mode 100644 index 0000000000000000000000000000000000000000..6331b5eb691febbc5f61d0070850cd67f2ccdf00 GIT binary patch literal 2270 zcmaJ@!EW0|5FIZTy9=6-NJ9vX9_pe93M0s&=obXR0s@k>y7$mSkVB6YKy-YHjb38p zOM3L7clwZHz9HYB00ev>5a!J;Nl}t*$y!n(Id9&ZH?w~E`xi&y^$*r_e11A2I>qsb zG$|ba?yuu??{!6lKf1b#2dp@y+uK_lH$-&bQe(dDk{?SJUn=W*ane{ zUW2Wc(4}0oYJ;QAu9ZDyb)2<_QT-C?ggB(Vu-nra8dt(w>a^85;^2GbaILRH&q7&= zcmd6D2BFx_X`jy@u?DE_gK@!nh-=!ENVku2`R$&}L!IxzaGVUdm7C(!YMzElJkEjK zs`JYqCjR{8z>R7x%0ZnMJ;Pn3Rvo7gRtFC2Jp2~@FOCzRMfV<7Xt7tBfO|K^)t<~! z{0&c-z>(aI<=_jcQU>kp=sCq`cx};jO1u%Uha9$Ee|{h8!*b`(|b@Ljkj=o-msv0X8Qcoyb zx-jp=U3A!{caVe&g?X71N}yGqK;_0F9+b3T4^=G^<-+kf*~ti5SOzGJlDR?$S( z=xOUBe|?j0gt}1Lu?T;1e4HQj3}vxc$l}k1eEQ>OX_`jX*4AWweO)#-He_>iQ?|CY zWP5vCc6N5;;NU>^_xELQZ%=l2cjfr|ByZm)`BAPU-ADQT>TkLF_)*^f@+*NHx91Mr zF;5*bhs+^!Doa_#BlpNXa*y02SF?aTAP-Ce@_?L&MC1{9L>>`Dh1@6d=T(=C1C%7k&$EkEwSX$ulaCkU893Bo!6&xN04}*t6 zQ|ICEFnAauu@b$dkU05bZt2zRKt=3;mZh550j5CEK!5;KAa-Ce;3N<`5ZjK!Vk0Mh zAbude9#J5EAU6Sq07D=TdTeCHc8`Q7y&fYuh{TJqMK~hy>}ZvP97H&xaO?xjXn$sh6F=`0oUBfVMs6}7!m-9_z`Cb!-SH@hiC5LNakC0ynHJ^$>HIl9336W z$;pYFo}S9(<)xgTpUd_2wcOm?$nEW|+}+*D!^49-K0eB)f0BHd&v}oJ$*#Tw`oN#f z)UQsHO#d&9ebIC`e5(4JD$**-I(4Q`^os%JI2n6DOX;fUCht&b$0fy@V7?yrl$v)FCNSK zMVrW_3|ey=Jol1x<%0J?{&n6aypnYMibXyz<}}^HZ!LeDe&ZkFEbEu`FYyn};TZ|K z`dP)FcSk?sx5MuE^9j5#|8>JU^3eX)<|^KbMg4z%RLg zK7X$DuQAHra{cHLq+$Mh91Od&81WC)hO<@tX*%Ib{rqdnM)_ABnOpq~&Rf{}RPVMG z{v>n#1w%~USH8E^V)XtFt4WpALH3~hwdsoGe=^Z64EPD&?QPpA#_s z_P@6pT(xO~&8T3=-z!ZUszz&6!}j@~nx`l3ntxR$;qCdDxptkm>ZM&;HPGrGSK2DQ z%-^lB?H}~;==7L)m{s$`m Mby9c#QhQ6@zfUAEi2wiq literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idc_copy.cur b/reactos/lib/comctl32/idc_copy.cur new file mode 100644 index 0000000000000000000000000000000000000000..e4b702162fa5a2356d5d3a43988fe70c58ade033 GIT binary patch literal 326 zcmb8pI}XAy41i&q4vcK5TQYWJWI?Iai!d>FsybA(N9&O|0O0<4NZpWd^u=}@MG-lO ziuaP@q9SLi1|BVxm7=8F?7Nxm%|F%3W$2Psv>hH8@Wi}gLFp&*h#q&eh`}Fz$A@wB hnsdIHeO>krW)rTAYQ)Eq6WJl4oGY^mM=&;rfDO`kb({bI literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idc_divider.cur b/reactos/lib/comctl32/idc_divider.cur new file mode 100644 index 0000000000000000000000000000000000000000..9d679c96b28d4f81b88626cc623bca09fcc32d20 GIT binary patch literal 326 zcmbV{u?<2o3`Ae(SOD=W(tx0203`kfj6|km4l2grxJyTVgRu21`)oNetSHn9Yx}vt z1~?i^%%<35t;c1Mv=o0-%G3MnH`4)5d$?Vi-<&(iqop^_XNUjrm%Vq=$ZL`wTd8sP NVb@ObXz7jfsXwV8bshi! literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idc_divideropen.cur b/reactos/lib/comctl32/idc_divideropen.cur new file mode 100644 index 0000000000000000000000000000000000000000..9adc94547324e419547aaf26d3de343a08607bf7 GIT binary patch literal 326 zcmZQzU}9ioP*7lC-~>VgMg|5k1_lNVAO;FCH~=vt5Q0Dhn8YOh|NoCENTdk!2L=YF z3#eG?8UusYRR#vXI}HpC2OPi{#0H6h?w7!WfnD|6Lw1V$vInC}FsOttm$ ze;mtlfC(JR5|}eL4p;zK6PC~r$4v2)d>Kwv9WG<8cmu}jlc}k71X{8uA;K9a`sI~e zfZ3S~__3+!jXR`xY^!6)R;Y%Bgy+;yHN81Q)l)qr0QLjvNk`AEq-$8W9_xP<5@MU@ M{LQ>qhn*EIzDJ~XXaE2J literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idi_dragarrow.ico b/reactos/lib/comctl32/idi_dragarrow.ico new file mode 100644 index 0000000000000000000000000000000000000000..bba46b2966dbcef847d32363fdeb60f793c6f507 GIT binary patch literal 326 zcmZQzU<5)11tta%Fkob05ChU0K&$}74nPc&2LmVt;ULKW|NkR6)M6z74GLgj;6K5@ wz`+8E!@AWXG}WP0Qrjuf+80UEPe#kyHv zRW`TH*ILZGcbf|%r+_ks-#CqW8hVWV<2-h>pU?XsIg?*k;CUhrd@p;~K$L$6bNmD- MHGvlTGxsjQ8_N4tb^rhX literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idi_tt_info_sm.ico b/reactos/lib/comctl32/idi_tt_info_sm.ico new file mode 100644 index 0000000000000000000000000000000000000000..80bcf36ed9d421b988ed3055560ff6aa7e39b85c GIT binary patch literal 318 zcmZvYu?@m76htoq33o|F3ng2yn#&YOjKC@$z!EED1eYlgpLb4$;M;fSfBycmEe(um zn&h|)($Na+oWY3xz`&_-!FaPJ*Y;UB)jImql4 KY8GnOtMmap;$49N literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idi_tt_warn_sm.ico b/reactos/lib/comctl32/idi_tt_warn_sm.ico new file mode 100644 index 0000000000000000000000000000000000000000..4fab813c4d600d80e9dc5d6aece12b44b28f444d GIT binary patch literal 318 zcmZvXAre9{5JO+5%pfYL!h%Hp86@H#jUMUyH9ZPPKq44E+3f&^v`N}zD+)=g){5hl zVDBz^augFADfG~P(mVrEnZ6!HhGL7E x9QCT@l<-3FShuKEMEvtnYaqrn>93pkLDS!zT?5YBcJRIf=i@N=oWc3J!W*LbJ~RLT literal 0 HcmV?d00001 diff --git a/reactos/lib/comctl32/idt_check.bmp b/reactos/lib/comctl32/idt_check.bmp new file mode 100644 index 0000000000000000000000000000000000000000..7344a646e939a4527d85a2646e161cc2b03f2a90 GIT binary patch literal 398 zcmaKoO%6gK41}iz|41})g12?)8QgmX&%z1Z_cq)Nr|)560+BEj=4(sR$MY>%*Nf+k zTBs`}h)~8mxu>{N7Xw%MZq!;)3g3-(Ydth9#yUG^wM&-auK8q2ra4g?|L+A;>?XOv x0^-D1i&J0NhyQ~8hJV#7oDM{=Ct>YC4y!MafgFvls}r9^%IyF1-e$vD$p>O{KP~_O literal 0 HcmV?d00001 diff --git a/reactos/lib/directory.xml b/reactos/lib/directory.xml index 4700dc1fd78..9309a001c74 100644 --- a/reactos/lib/directory.xml +++ b/reactos/lib/directory.xml @@ -1,9 +1,18 @@ + + + + + + + + + @@ -46,6 +55,9 @@ + + + diff --git a/reactos/lib/winmm/winmm.xml b/reactos/lib/winmm/winmm.xml new file mode 100644 index 00000000000..fb3abae618d --- /dev/null +++ b/reactos/lib/winmm/winmm.xml @@ -0,0 +1,29 @@ + + bin2res + winebuild + + . + include/wine + + + + + 0x600 + 0x501 + 0x501 + wine + ntdll + kernel32 + advapi32 + user32 + driver.c + joystick.c + lolvldrv.c + mci.c + mmio.c + playsound.c + time.c + winmm.c + winmm_res.rc + winmm.spec + diff --git a/reactos/tools/bin2res/bin2res.xml b/reactos/tools/bin2res/bin2res.xml new file mode 100644 index 00000000000..fb64b8d1353 --- /dev/null +++ b/reactos/tools/bin2res/bin2res.xml @@ -0,0 +1,6 @@ + + include/wine + + bin2res.c + mkstemps.c + diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index 1eff40f3c75..a4d0a7141e7 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -184,6 +184,7 @@ MingwBackend::GenerateGlobalVariables () fprintf ( fMakefile, "mkdir = tools%crmkdir\n", CSEP ); fprintf ( fMakefile, "NUL=NUL\n" ); fprintf ( fMakefile, "winebuild = tools" SSEP "winebuild" SSEP "winebuild\n" ); + fprintf ( fMakefile, "bin2res = tools" SSEP "winebuild" SSEP "bin2res\n" ); fprintf ( fMakefile, "\n" ); GenerateGlobalCFlagsAndProperties ( "=", @@ -197,13 +198,12 @@ MingwBackend::GenerateGlobalVariables () fprintf ( fMakefile, "\n" ); fprintf ( fMakefile, ".PHONY: clean\n\n" ); - //fprintf ( fMakefile, "clean:\n\t-@${rm} $(PROJECT_CLEAN)\n\n" ); } void MingwBackend::GenerateAllTarget () { - fprintf ( fMakefile, "all:" ); + fprintf ( fMakefile, "all:" ); for ( size_t i = 0; i < ProjectNode.modules.size (); i++ ) { Module& module = *ProjectNode.modules[i]; @@ -227,5 +227,5 @@ MingwBackend::ProcessModule ( Module& module ) string FixupTargetFilename ( const string& targetFilename ) { - return string("$(ROS_INTERMEDIATE)") + targetFilename; + return string("$(ROS_INTERMEDIATE)") + NormalizeFilename ( targetFilename ); } diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp index 46da3830543..c16173f7a6e 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp @@ -136,6 +136,16 @@ MingwModuleHandler::GetModuleArchiveFilename ( const Module& module ) const ".a" ); } +bool +MingwModuleHandler::IsGeneratedFile ( const File& file ) const +{ + string extension = GetExtension ( file.name ); + if ( extension == ".spec" || extension == "SPEC" ) + return true; + else + return false; +} + string MingwModuleHandler::GetImportLibraryDependencies ( const Module& module ) const { @@ -191,13 +201,17 @@ MingwModuleHandler::GetAllDependencies ( const Module& module ) const } string -MingwModuleHandler::GetSourceFilenames ( const Module& module ) const +MingwModuleHandler::GetSourceFilenames ( const Module& module, + bool includeGeneratedFiles ) const { size_t i; string sourceFilenames ( "" ); for ( i = 0; i < module.files.size (); i++ ) - sourceFilenames += " " + GetActualSourceFilename ( module.files[i]->name ); + { + if ( includeGeneratedFiles || !IsGeneratedFile ( *module.files[i] ) ) + sourceFilenames += " " + GetActualSourceFilename ( module.files[i]->name ); + } vector ifs = module.ifs; for ( i = 0; i < ifs.size(); i++ ) { @@ -206,11 +220,28 @@ MingwModuleHandler::GetSourceFilenames ( const Module& module ) const for ( j = 0; j < rIf.ifs.size(); j++ ) ifs.push_back ( rIf.ifs[j] ); for ( j = 0; j < rIf.files.size(); j++ ) - sourceFilenames += " " + GetActualSourceFilename ( rIf.files[j]->name ); + { + if ( includeGeneratedFiles || !IsGeneratedFile ( *rIf.files[j] ) ) + sourceFilenames += " " + GetActualSourceFilename ( rIf.files[j]->name ); + } } return sourceFilenames; } +string +MingwModuleHandler::GetSourceFilenames ( const Module& module ) const +{ + return GetSourceFilenames ( module, + true ); +} + +string +MingwModuleHandler::GetSourceFilenamesWithoutGeneratedFiles ( const Module& module ) const +{ + return GetSourceFilenames ( module, + false ); +} + string MingwModuleHandler::GetObjectFilename ( const string& sourceFilename ) const { @@ -1009,7 +1040,7 @@ MingwModuleHandler::GetInvocationParameters ( const Invoke& invoke ) const parameters += invokeFile.switches; parameters += " "; } - parameters += invokeFile.name; + parameters += invokeFile.name ; } return parameters; @@ -1033,20 +1064,20 @@ MingwModuleHandler::GenerateInvocations ( const Module& module ) const string invokeTarget = module.GetInvocationTarget ( i ); fprintf ( fMakefile, - "%s: %s\n\n", - invoke.GetTargets ().c_str (), + ".PHONY: %s\n\n", invokeTarget.c_str () ); fprintf ( fMakefile, - "%s: %s\n", + "%s: %s\n\n", invokeTarget.c_str (), + invoke.GetTargets ().c_str () ); + fprintf ( fMakefile, + "%s: %s\n", + invoke.GetTargets ().c_str (), FixupTargetFilename ( invoke.invokeModule->GetPath () ).c_str () ); fprintf ( fMakefile, "\t%s %s\n\n", FixupTargetFilename ( invoke.invokeModule->GetPath () ).c_str (), GetInvocationParameters ( invoke ).c_str () ); - fprintf ( fMakefile, - ".PNONY: %s\n\n", - invokeTarget.c_str () ); } } @@ -1061,7 +1092,7 @@ void MingwModuleHandler::GeneratePreconditionDependencies ( const Module& module ) const { string preconditionDependenciesName = GetPreconditionDependenciesName ( module ); - string sourceFilenames = GetSourceFilenames ( module ); + string sourceFilenames = GetSourceFilenamesWithoutGeneratedFiles ( module ); string dependencies = GetModuleDependencies ( module ); string s = GetInvocationDependencies ( module ); if ( s.length () > 0 ) @@ -1330,10 +1361,10 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ( const Modul } else { - fprintf ( fMakefile, "%s:\n", - target.c_str ()); fprintf ( fMakefile, ".PHONY: %s\n\n", target.c_str ()); + fprintf ( fMakefile, "%s:\n", + target.c_str ()); } } @@ -1385,10 +1416,10 @@ MingwKernelModeDriverModuleHandler::GenerateKernelModeDriverModuleTarget ( const } else { - fprintf ( fMakefile, "%s:\n", - target.c_str () ); fprintf ( fMakefile, ".PHONY: %s\n\n", target.c_str ()); + fprintf ( fMakefile, "%s:\n", + target.c_str () ); } } @@ -1447,10 +1478,10 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( const Module& modul } else { - fprintf ( fMakefile, "%s:\n\n", - target.c_str ()); fprintf ( fMakefile, ".PHONY: %s\n\n", target.c_str ()); + fprintf ( fMakefile, "%s:\n\n", + target.c_str ()); } } @@ -1465,11 +1496,33 @@ MingwWin32DLLModuleHandler::MingwWin32DLLModuleHandler () void MingwWin32DLLModuleHandler::Process ( const Module& module ) { + GenerateExtractWineDLLResourcesTarget ( module ); GeneratePreconditionDependencies ( module ); GenerateWin32DLLModuleTarget ( module ); GenerateInvocations ( module ); } +void +MingwWin32DLLModuleHandler::GenerateExtractWineDLLResourcesTarget ( const Module& module ) +{ + fprintf ( fMakefile, ".PHONY: %s_extractresources\n\n", + module.name.c_str () ); + fprintf ( fMakefile, "%s_extractresources: bin2res\n", + module.name.c_str () ); + for ( size_t i = 0; i < module.files.size (); i++ ) + { + File& file = *module.files[i]; + string extension = GetExtension ( file.name ); + if ( extension == ".rc" || extension == ".RC" ) + { + string resource = FixupTargetFilename ( file.name ); + fprintf ( fMakefile, "\t@echo ${bin2res} -f -x %s\n", + resource.c_str () ); + } + } + fprintf ( fMakefile, "\n"); +} + void MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( const Module& module ) { @@ -1497,10 +1550,10 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( const Module& module } else { - fprintf ( fMakefile, "%s:\n\n", - target.c_str ()); fprintf ( fMakefile, ".PHONY: %s\n\n", - target.c_str ()); + target.c_str () ); + fprintf ( fMakefile, "%s:\n\n", + target.c_str () ); } } @@ -1548,9 +1601,9 @@ MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget ( const Module& module } else { - fprintf ( fMakefile, "%s:\n\n", - target.c_str ()); fprintf ( fMakefile, ".PHONY: %s\n\n", target.c_str ()); + fprintf ( fMakefile, "%s:\n\n", + target.c_str ()); } } diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h index abed79844aa..93c7d3a00d1 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.h +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h @@ -19,7 +19,7 @@ public: void GenerateDirectoryTargets () const; protected: - const std::string &PassThruCacheDirectory ( const std::string &f ) const; + const std::string &PassThruCacheDirectory ( const std::string &f ) const; std::string GetWorkingDirectory () const; std::string GetDirectory (const std::string& filename ) const; std::string GetExtension ( const std::string& filename ) const; @@ -28,10 +28,14 @@ protected: const std::string& newExtension ) const; std::string GetActualSourceFilename ( const std::string& filename ) const; std::string GetModuleArchiveFilename ( const Module& module ) const; + bool IsGeneratedFile ( const File& file ) const; std::string GetImportLibraryDependencies ( const Module& module ) const; std::string GetModuleDependencies ( const Module& module ) const; std::string GetAllDependencies ( const Module& module ) const; + std::string GetSourceFilenames ( const Module& module, + bool includeGeneratedFiles ) const; std::string GetSourceFilenames ( const Module& module ) const; + std::string GetSourceFilenamesWithoutGeneratedFiles ( const Module& module ) const; std::string GetObjectFilename ( const std::string& sourceFilename ) const; std::string GetObjectFilenames ( const Module& module ) const; @@ -54,7 +58,7 @@ protected: std::string GetDefinitionDependencies ( const Module& module ) const; std::string GetLinkingDependencies ( const Module& module ) const; static FILE* fMakefile; - static std::set directory_set; + static std::set directory_set; private: std::string ConcatenatePaths ( const std::string& path1, const std::string& path2 ) const; @@ -202,6 +206,7 @@ public: MingwWin32DLLModuleHandler (); virtual void Process ( const Module& module ); private: + void GenerateExtractWineDLLResourcesTarget ( const Module& module ); void GenerateWin32DLLModuleTarget ( const Module& module ); }; diff --git a/reactos/tools/rbuild/makefile b/reactos/tools/rbuild/makefile index 1bae560b0cb..ff1d057df9d 100644 --- a/reactos/tools/rbuild/makefile +++ b/reactos/tools/rbuild/makefile @@ -30,6 +30,7 @@ OBJECTS = $(BASE_OBJECTS) rbuild.o TESTS = \ tests/definetest.o \ + tests/functiontest.o \ tests/iftest.o \ tests/includetest.o \ tests/invoketest.o \ diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index 29b9af4ef9d..e30dbc24884 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -21,6 +21,15 @@ FixSeparator ( const string& s ) return s2; } +string +NormalizeFilename ( const string& filename ) +{ + Path path; + string normalizedPath = path.Fixup ( filename, true ); + string relativeNormalizedPath = path.RelativeFromWorkingDirectory ( normalizedPath ); + return FixSeparator ( relativeNormalizedPath ); +} + Module::Module ( const Project& project, const XMLElement& moduleNode, const string& modulePath ) @@ -449,7 +458,7 @@ Invoke::GetTargets () const InvokeFile& file = *output[i]; if ( targets.length () > 0 ) targets += " "; - targets += file.name; + targets += NormalizeFilename ( file.name ); } return targets; } diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h index 864a975dcd9..176d0d1350c 100644 --- a/reactos/tools/rbuild/rbuild.h +++ b/reactos/tools/rbuild/rbuild.h @@ -315,4 +315,7 @@ public: extern std::string FixSeparator ( const std::string& s ); +extern std::string +NormalizeFilename ( const std::string& filename ); + #endif /* __RBUILD_H */ diff --git a/reactos/tools/rbuild/test.h b/reactos/tools/rbuild/test.h index 340230da9a4..b25a6fb7f27 100644 --- a/reactos/tools/rbuild/test.h +++ b/reactos/tools/rbuild/test.h @@ -2,6 +2,7 @@ #define __TEST_H #include "rbuild.h" +#include "backend/mingw/mingw.h" class BaseTest { @@ -95,4 +96,10 @@ public: void Run(); }; +class FunctionTest : public BaseTest +{ +public: + void Run(); +}; + #endif /* __TEST_H */ diff --git a/reactos/tools/rbuild/tests/alltests.cpp b/reactos/tools/rbuild/tests/alltests.cpp index c01cbab13c3..1ceeb4d5b67 100644 --- a/reactos/tools/rbuild/tests/alltests.cpp +++ b/reactos/tools/rbuild/tests/alltests.cpp @@ -176,6 +176,7 @@ private: tests.push_back(new InvokeTest()); tests.push_back(new LinkerFlagTest()); tests.push_back(new IfTest()); + tests.push_back(new FunctionTest()); } }; diff --git a/reactos/tools/rbuild/tests/functiontest.cpp b/reactos/tools/rbuild/tests/functiontest.cpp new file mode 100644 index 00000000000..e2b3128e399 --- /dev/null +++ b/reactos/tools/rbuild/tests/functiontest.cpp @@ -0,0 +1,9 @@ +#include "test.h" + +using std::string; + +void FunctionTest::Run () +{ + string fixedupFilename = FixupTargetFilename ( "." SSEP "dir1" SSEP "dir2" SSEP ".." SSEP "filename.txt" ); + ARE_EQUAL ( "$(ROS_INTERMEDIATE)dir1" SSEP "filename.txt", fixedupFilename ); +} diff --git a/reactos/tools/tools.xml b/reactos/tools/tools.xml index a807939c9cb..5d648bebdaa 100644 --- a/reactos/tools/tools.xml +++ b/reactos/tools/tools.xml @@ -1,3 +1,6 @@ + + + . buildno.c