Entrepreneurs base their production decisions on their anticipations of the array of prices of outputs and inputs that will occur over the period of production and sale of their output. They expand lines of production in which they anticipate profit and contract lines of production in which they anticipate losses.
So, not every case of increased demand driving up the price of some good right now will lead entrepreneurs to choose to expand its production. They might anticipate that other lines will generate more profit in the future from as yet unrealized increases in their demand. Also, as you imply, the economy is a lattice work of integrated production processes and therefore, prices are interrelated. Entrepreneurs might anticipate that other entrepreneurs bidding more heavily for inputs will drive their prices up and make unprofitable what would otherwise appear to be a profitable line of production. Another example how one must consider the integration of all economic activity is the specificity of capital goods used in production. If there is a highly specific capital good used as an input in the production of a good, then an increase in the price of the good from greater demand will dramatically increase the price of the specific capital good which raises the costs of production of the output. Entrepreneurs would then shift production toward the capital good which would moderate its price and bring the costs of production of the output down. The final effect on production of the output from an increase in its demand, therefore, may differ from the initial effect.