Mobile Factory

Factory "A place of building, the act of creation forging whatever. A Place where raw materials enter one door and exit as a finished product (or in a more modern sense a component for another "finished" product)."

Mobile "Ambulatory, the ability to move, requiring coordination, actors (such as muscles), power, and sometimes a direction."

Combining the two creates a object that could do neither function very well but perhaps well enough to justify the cost. In fiction at least, real-life seems a little slow on the uptake. Most often seen as military machines they are also quite handy in colonization efforts or anything really that needs stuff and is willing to put-up with a wandering stuff maker.

Watch out though if Von Neumann is to believed this would be a handy way to travel the stars without FTL and in fiction this probably means very large particles of Grey Goo.

This one particular vehicle is usually seen as a Military Mashup Machine or Mook Maker Starship. However other varieties exist.

General

 * Asteroid Miners are known to use this type of ship to process their asteroids into stuff.
 * Real Time Strategy games love these things.

Anime and Manga

 * Ghost in The Shell 2: Innocence features this type of vessel for making Gynoids but is actually producing Sex Slaves although one implies the other.
 * The Macross/Robotech franchise group featured a number of these. Some big enough to mass produce warships more than a mile long. The Macross itself recycles Humongous Mecha.
 * The Raflessia in Gundam F 91 could make Bugs, which were tiny chainsaw drones.

Comic Books

 * World Devastators from the Dark Empire series.

Literature

 * In Dune, harvester factories sucked up spice-laden sands, separated out the spice with a centrifuge and stored it. It's also a film.
 * Steward Cowley's Spacecraft 2000 to 2100 A.D.. The PC1 191 Gourmet was a giant insect-like spaceship that melted asteroid ore and separated out the metal residue for storage. The AC3 Stag Beetle used a "disassembler" field to do the same thing.
 * In The Culture novels the largest spacecraft, called General Systems Vehicles, are capable of building entire fleets of starships inside themselves if they're so inclined. In fact it's said that a single GSV would be able to rebuild the entire Culture by itself if necessary.

Live Action Television

 * Battlestar Galactica: the Tylium refining ship
 * The Sand Miner from the Doctor Who serial "The Robots of Death".
 * Red Dwarf is a mining ship, although it's not usually seen doing any actual mining.
 * The ramscoop at the front collects all the hydrogen it needs for fuel, and considering the disaster there's no real reason for them to care if they have a full load or ore or not.
 * The Andromeda Ascendant is capable of harvesting raw resources from asteroids and rebuilding her supply of drones and missiles.

Real Life

 * Russia is developing Nuclear Power Station Barges for heat, power, and/or desalination. Assuming that electricity and fresh water count for factory production.
 * Factory ships take fish from whole fleets of fishing boats and prepare it for sale.

Tabletop RPG

 * In Palladium Games' Robotech II: The Sentinels RPG, the SDF-3 is noted to have a complete mecha factory located deep in it's bowels.

Video Games

 * Star Ruler allows for mobile shipyards to be built. Give them a mining laser, some storage, some refineries, and a construction bay, and they will be able to mine asteroids to produce the material for its ships. It's easy to create Von Neumann ships using this - order a ship to mine an asteroid, with 10 ships in its build queue. Keep repeating the order with every ship it builds, and after an hour there will be several hundred ships.
 * The Recycler in both of the Battlezone 1998 RTS + FPS games is a floating (or tracked, in the sequel) mobile factory. In the first game, it will land on a geyser, and unfold its construction bay, allowing it to build units - the more advanced Factory and Armory mobile factories are built from the Recycler. If the base is attacked, the factories can pack up, lift off, and drive away. Battlezone 2's Recycler is less mobile, as once it deploys, it cannot be undeployed (in the vanilla game - some mods allow it to undeploy).
 * The classic PC RPG Albion contains a partial example; the starship you start out on is a mining-ship, designed for strip-mining an entirely planet - but it's not as mobile as it seems. By design, it's supposed to simply fly to its destination, land, and then convert itself into a self-perpetuating factory-complex capable of turning an entire, resource-rich world into a dry ball of slag, while shipping the finished and refined resources home to Earth.
 * The Mobile Construction Vehicle from Dune II was imported to the Command and Conquer series. The Expansion Pack for the second game also added a Mobile War Factory to both factions. This was finally taken to a conclusion in Command & Conquer IV, where the entire base became a mobile factory.
 * Starcraft: most of the Terran buildings and a few of the Protoss ones.
 * In Homeworld II, the mothership, shipyard, and carrier classes are able to manufacture smaller vessels, and battlecruisers can repair fighters. There are also mobile refineries, which convert matter into energy.
 * Sonic 3 and Knuckles: the Flying Battery Zone
 * The United Earth Federation in the Supreme Commander series is big on this trope. While most experimental units are gigantic assault machines or gun platforms the UEF invests in flying, crawling or seaborne factories instead. There are non-UEF mobile factories as well but the UEF alone has more than other factions combined.
 * Dawn of War has the Necron Monolith. It's slow, but well armed, very tough, and capable of building every other necron unit in the game.
 * The Xtended Terran Conflict mod for X3 Terran Conflict has the T0 Mobile Production Ship(s). There are 5 variants of it, each of which produces a different type of ware; energy cells, food, technology (microchips, drones, etc), ore / silicon refinement, and military tech production (weapons, shields, missiles). All the of the ships are highly modular and can be configured to make different types of wares in seconds.
 * Universe At War has the Hierarchy faction. Almost all their units are produced by giant, heavily armed walkers.