Though tensions in Iraq flared over the weekend, stocks still managed to finish with small gains today, as M&A deals helped give the market a lift. By the end of the day, the Dow Jones Industrial Average (DJINDICES:^DJI) had inched up 5 points or 0.03%, while the S&P 500 gained 0.1% and the Nasdaq moved up 0.2%. 

Oil prices rose on the Iraq news, as the U.S. said it would consider air strikes on Iraq and discuss containment strategies for the Sunni insurgency with Iran. Regarding the merger activity, consolidation in the health-care sector continued as medical-device maker Medtronic purchased Covidien for $42.9 billion, allowing it to shift its headquarters to Dublin, where Covidien is based, so it can take advantage of Ireland's much lower corporate tax rates. Medtronic shares fell 1.4% while Covidien jumped 20.6%. Elsewhere, Williams Companies jumped 18.7% as the pipeline operator acquired Access Midstream Partners for $5.99 billion.

The day's macroeconomic news was also positive, as an index measuring manufacturing activity in the New York state region increased from 19.0 last month to 19.3 in June, easily beating estimates at 12.8. Any reading above 0 indicates expansion, so this was the second month in a row of robust growth. Industrial production figures for May also came in slightly above expectations, rising 0.6% after a 0.3% drop in April, and finally, a housing index from the National Association of Home Builders rose to 49 from 45 last month, just shy of 50, which indicates a neutral outlook for the housing market.

Source: Fool Flickr.

After hours, General Motors (NYSE:GM) announced that it will recall another 3.16 million vehicles for ignition switch issues. The move brings the charge for the recalls this year to over $2 billion, and $700 million in the current quarter for the carmaker. The decision also comes as CEO Mary Barra is set to testify again before Congress about her company's failure to recall the vehicles in a timely manner. Shares hardly moved, falling just 0.3% after a 1.2% gain in regular trading, as the market seems to have priced in the costs for the recall debacle, but the announcement forces investors to question how many more vehicles will be recalled before GM can put this embarrassing chapter behind it.

Also after hours, Amira Nature Foods (NYSE:ANFI) shares were skyrocketing, climbing 29% on a blowout earnings report. The Indian natural-foods supplier had gotten knocked back recently on fraud accusations but today sped past estimates, posting a profit of $0.47 per share against expectations of $0.33. Revenue increased 33% to $186 million, cruising past the consensus at $162.2 million, and the increase came from an expanding market in its home market of India and through acquisitions abroad such as Basmati Rice GmbH. Guidance for fiscal 2015 was also better than expected, as the company expects revenue to increase more than 20%.