magic/database
Darryl L. Miles 1bdc3fa12a build: put the generated header under include/ for relocated builds
Previously the generated database/database.h was written to the build
top and exposed with -I${MAGICDIR}.  Out-of-tree that placed the raw
build directory on the compiler's include search path.

Introduce ${GENINC}, the single include dir for generated headers:
  * in-tree  (build top == source top): ${MAGICDIR}, so the header stays
    at $(builddir)/database/database.h and -I${GENINC} is exactly the old
    -I${MAGICDIR} -- behaviour is unchanged.
  * relocated (out-of-tree): ${MAGICDIR}/include, so the header is written
    to $(builddir)/include/database/database.h and only that clean
    include/ dir is on the search path; the raw build top never is.

* scripts/defs.mak.in: derive GENINC from BUILD_TOP vs MAGICSRC; add
  DATABASE_H = ${GENINC}/database/database.h; CPPFLAGS uses -I${GENINC}.
* Makefile.in: the makedbh rule targets ${DATABASE_H} (mkdir its dir);
  every prereq and the distclean use ${DATABASE_H}.
* database/Makefile: the fallback delegate targets ${DATABASE_H}.

Verified: relocated `make modules` builds all 33 module libraries with
the header at build/include/database/database.h and no raw build-top on
any -I line; in-tree the header stays at database/database.h and the
-I set is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-26 14:54:11 -04:00
..
DBbound.c Revised the code of PR #487 (previous merge) to follow the 2026-06-09 16:17:57 -04:00
DBcell.c Corrected an error from a recent commit: An attempt to add array 2025-11-25 12:57:46 -05:00
DBcellbox.c A number of things in one commit: 2025-11-07 11:00:22 -05:00
DBcellcopy.c Reworked the method from the previous set of commits, which creates 2026-03-10 14:25:02 -04:00
DBcellname.c Another correction to one function call that was not updated for 2026-02-19 10:27:03 -05:00
DBcellsel.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
DBcellsrch.c Solved three issues: 2026-04-01 21:17:54 -04:00
DBcellsubr.c freeMagic1() idiom insertion at all sites reported by static code analysis 2025-12-19 09:31:58 -05:00
DBconnect.c Fixed an issue with the connectivity stack which does not change 2026-06-03 11:34:41 -04:00
DBcount.c DBcount.c: DBTreeCountPaint() unify return type of hiercount() callback 2024-12-26 13:13:14 -05:00
DBexpand.c Fixed the mess that is the "expand"/"unexpand" command set. This 2026-04-04 20:47:04 -04:00
DBio.c codebase-wide: use flexible arrays where appropriate 2026-07-01 12:37:44 -04:00
DBlabel.c codebase-wide: use flexible arrays where appropriate 2026-07-01 12:37:44 -04:00
DBlabel2.c 36 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
DBpaint.c Committing changes to date, which includes a number of fixes, 2026-01-09 12:05:03 -05:00
DBpaint2.c First cut of pulling the TT_SIDE bit out of the tile database 2026-01-09 12:05:03 -05:00
DBprop.c Reworked the method from the previous set of commits, which creates 2026-03-10 14:25:02 -04:00
DBtcontact.c Corrected an error with the bloat-all CIF operator in which 2024-12-16 21:52:11 -05:00
DBtech.c database/DBtech.c: Incorrect return-value check for a 'scanf'-like function 2024-10-01 12:36:12 -04:00
DBtechname.c database: DBPlaneShortName() return const char * 2025-10-04 20:50:31 -04:00
DBtechtype.c freeMagic1() idiom insertion at all sites reported by static code analysis 2025-12-19 09:31:58 -05:00
DBtiles.c More updates. . . Got it to the point were gpio_ovtv2 is LVS 2026-01-17 20:49:52 -05:00
DBtimestmp.c Annotate ClientData callbacks: /*ARGSUSED*/ + /* UNUSED */ markers 2026-05-11 14:20:47 -04:00
DBtpaint.c Lookup() constify call-site 2024-12-26 15:20:58 -05:00
DBtpaint2.c Corrected code in DBtpaint2.c handling the setup of paint/erase 2024-12-26 16:28:43 -05:00
DBundo.c codebase-wide: use flexible arrays where appropriate 2026-07-01 12:37:44 -04:00
Makefile build: put the generated header under include/ for relocated builds 2026-07-26 14:54:11 -04:00
arrayinfo.h database.h: refactor struct ArrayInfo defn into it arrayinfo.h 2025-08-06 22:58:30 +01:00
database.h.in hack: make flexible union members work on gcc≤14 2026-07-01 12:37:44 -04:00
databaseInt.h A number of things in one commit: 2025-11-07 11:00:22 -05:00
fonts.h header file #endif guard middle program once style consistency 2025-07-29 10:50:32 -04:00