Are these products substitutes or independent? A consumer's preferences are represented by the following utility function:

$$u(x,y,m) = x+y+m$$

where $m$ is money. Are the goods $x,y$ substitute goods or independent goods?

Microeconomic textbooks say that they are perfect substitutes. Why? Because the consumer will always want to spend his entire budget on the cheapest product. So, if $p_x&lt;p_y&lt;1$, the consumer will demand only x, while if $p_x$ increases above $p_y$, the consumer will demand only y. So, the demand of y increases with the price of x.

But consider the following situation: x and y are two kinds of rare items that are sold in an auction. The consumer has enough money to buy all available units. Then, if $p_x&lt;1$ the consumer will want to buy all available units of x regardless of $p_y$, and if $p_y&lt;1$ the consumer will want to buy all available units of y regardless of $p_x$. By definition, this means that x and y are independent goods.

Does this mean that the definition of substitutes vs. independent goods depends not only on the utility function but also on the exact situation?

Are there any references that discuss this issue?
The goods are perfect substitutes because the marginal rate of substition between them is constant for all values of $x$, $y$ and $m$, i.e. there is $c \in \mathbb{R}$ such that
$$
\forall (x,y,m) \in \mathbb{R}_+^3: \ MRS_{x,y}(x,y,m) = - \frac{MU_x(x,y,m)}{MU_y(x,y,m)} = c.
$$
This essentially means that the goods $x$ and $y$ are so much alike that the rate of substitution does not diminish.

The total quantities may be limited, but (I think) perfect substitution has nothing to do with set of feasible allocations or the budget set, only with the preference ordering.

Varian defines perfect substitutes in subchapters 3.4 and 4.3. Neither subchapter considers feasibility.