Opened 14 years ago

Closed 14 years ago

#2 closed change (fixed (in master))

Ease makefiles proliferation

Reported by: takkaria Owned by: takkaria
Milestone: 3.0.8 Keywords:

Description (last modified by takkaria)

There is makefile proliferation, which is hard to manage -- removing or adding a file requires too much effort. We need a makefile template system, and scripts to turn templates into real makefiles.

To fix:

  1. Add template files (in src/tmpl/) where there are strings indicating where:
    • object files should be included
    • source files should be included
    • dependency information should be included
  2. Write scripts to do the search/replace (preferably using sed and sh).

Change History (5)

comment:1 Changed 14 years ago by takkaria

  • Description modified (diff)

comment:2 Changed 14 years ago by takkaria

Take a look at UnAngband?: src/ and Makefiles.osx, Makefile.cyg, Makefile.std, and Makefile.lcc.

Some of the OS-level defines can go in the makefiles, using output of uname to get the OS type for those myriad *NIX systems:

uname = $(shell uname)

ifeq ($(uname),linux)

or in makefile.osx:


comment:3 Changed 14 years ago by takkaria

  • Owner set to takkaria
  • Status changed from new to assigned

comment:4 Changed 14 years ago by takkaria

  • Summary changed from Makefiles should be created from templates to Ease makefiles proliferation

Add "", which contains a set of object file definitions and dependencies which can be shared amongst as many makefiles as possible. (It serves the same purpose as in UnAngband?, but with this name grouped with makefiles when sorting alphabetically.)

I've rewritten Makefile.std to be much more friendly, and made std, osx, con, cyg, dos, ibm, lcc use for definitions. I've also removed gtk and lsl.

Remaining unchanged are: Makefile.ami, Makefile.emx, Makefile.bcc, Makefile.wat, and I plan to remove ami and emx at some point fairly soon (last ports 2003/2001). I doubt win works (it references a file "itsybits.obj" which isn't distributed), leaving bcc and wat. These two should be fairly easy to update manually for now, so no need for complex scripts.

comment:5 Changed 14 years ago by takkaria

  • Resolution set to fixed
  • Status changed from assigned to closed

Closed with [14a3670] (SVN r3).

Note: See TracTickets for help on using tickets.