Segmentation is a core strategy in modern marketing, and age-specific segmentation based on the age of the consumers is very common in practice. Age-specific segmentation enables the change of the segments composition during time and can be studied only by means of dynamic advertising models. Here we assume that a firm wants to optimally promote and sell a single product in an age-segmented market and we model the awareness of this product using an infinite dimensional Nerlove-Arrow goodwill as a state variable. Assuming an infinite time horizon, we use some dynamic programming techniques in infinite dimension to characterize both the optimal advertising effort and the optimal goodwill path in the long run. An interesting feature of the optimal advertising effort is an anticipation effect with respect to the segments considered in the target market, due to time evolution of the segmentation. We analyze this effect in two different scenarios: in the first, the decision makers can choose the advertising flow directed to different age segments at different times, while in the second they can only decide the activation level of an advertising medium with a given age-spectrum.