Ticket #2 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

Ease makefiles proliferation

Reported by: takkaria Assigned to: takkaria
Milestone: 3.0.8 Keywords:
Cc:

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).

Attachments

Change History

03/18/07 20:34:31 changed by takkaria

  • description changed.

03/21/07 18:25:56 changed by takkaria

Take a look at UnAngband?: src/commondefs.inc 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)
 OSFLAGS = -DLINUX
endif

or in makefile.osx:

OSFLAGS=-DMACH_O_CARBON 

03/22/07 16:31:02 changed by takkaria

  • owner set to takkaria.
  • status changed from new to assigned.

03/23/07 20:48:17 changed by takkaria

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

Add "Makefile.inc", 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 commondefs.inc 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 Makefile.inc for definitions. I've also removed gtk and lsl.

Remaining unchanged are: Makefile.ami, Makefile.emx, Makefile.bcc, Makefile.wat, and Makefile.win. 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.

03/23/07 21:02:39 changed by takkaria

  • status changed from assigned to closed.
  • resolution set to fixed.

Closed with [3].


Add/Change #2 (Ease makefiles proliferation)




Action