diff --git a/first/core.mk b/first/core.mk index d2e32fc68..261a2c30e 100644 --- a/first/core.mk +++ b/first/core.mk @@ -51,7 +51,7 @@ endef # --- Add a raw to the queue -define file +define rawfile $(eval q += $1) endef diff --git a/lang/basic/src/build.mk b/lang/basic/src/build.mk index 00d429107..95019babd 100644 --- a/lang/basic/src/build.mk +++ b/lang/basic/src/build.mk @@ -29,13 +29,13 @@ $g: $D/maketokentab $(OBJDIR)/$D/Lpars.h $(eval $q: $(OBJDIR)/$D/Lpars.h) $(eval $q: $(INCDIR)/print.h) -$(call file, $(LIBEM_MES)) -$(call file, $(LIBEMK)) -$(call file, $(LIBEM_DATA)) -$(call file, $(LIBALLOC)) -$(call file, $(LIBPRINT)) -$(call file, $(LIBSTRING)) -$(call file, $(LIBSYSTEM)) +$(call rawfile, $(LIBEM_MES)) +$(call rawfile, $(LIBEMK)) +$(call rawfile, $(LIBEM_DATA)) +$(call rawfile, $(LIBALLOC)) +$(call rawfile, $(LIBPRINT)) +$(call rawfile, $(LIBSTRING)) +$(call rawfile, $(LIBSYSTEM)) $(call cprogram, $(BINDIR)/em_bem) $(call installto, $(PLATDEP)/em_bem) diff --git a/lang/cem/cemcom.ansi/build.mk b/lang/cem/cemcom.ansi/build.mk index 0e6b45267..1f2b483ec 100644 --- a/lang/cem/cemcom.ansi/build.mk +++ b/lang/cem/cemcom.ansi/build.mk @@ -134,16 +134,16 @@ $(call build-cemcom-ansi-next, \ $(eval $q: $(OBJDIR)/$D/Lpars.h) -$(call file, $(LIBEM_MES)) -$(call file, $(LIBEMK)) -$(call file, $(LIBEM_DATA)) -$(call file, $(LIBINPUT)) -$(call file, $(LIBASSERT)) -$(call file, $(LIBALLOC)) -$(call file, $(LIBFLT_ARITH)) -$(call file, $(LIBPRINT)) -$(call file, $(LIBSYSTEM)) -$(call file, $(LIBSTRING)) +$(call rawfile, $(LIBEM_MES)) +$(call rawfile, $(LIBEMK)) +$(call rawfile, $(LIBEM_DATA)) +$(call rawfile, $(LIBINPUT)) +$(call rawfile, $(LIBASSERT)) +$(call rawfile, $(LIBALLOC)) +$(call rawfile, $(LIBFLT_ARITH)) +$(call rawfile, $(LIBPRINT)) +$(call rawfile, $(LIBSYSTEM)) +$(call rawfile, $(LIBSTRING)) $(call cprogram, $(BINDIR)/cemcom.ansi) $(call installto, $(PLATDEP)/em_cemcom.ansi) $(eval CEMCOMANSI := $o) diff --git a/lang/cem/cpp.ansi/build.mk b/lang/cem/cpp.ansi/build.mk index e102c523b..be03bc958 100644 --- a/lang/cem/cpp.ansi/build.mk +++ b/lang/cem/cpp.ansi/build.mk @@ -71,12 +71,12 @@ define build-cpp-ansi-impl $(call llgen, $(OBJDIR)/$D, $(OBJDIR)/$D/tokenfile.g $D/expression.g) - $(call file, $(LIBINPUT)) - $(call file, $(LIBASSERT)) - $(call file, $(LIBALLOC)) - $(call file, $(LIBPRINT)) - $(call file, $(LIBSYSTEM)) - $(call file, $(LIBSTRING)) + $(call rawfile, $(LIBINPUT)) + $(call rawfile, $(LIBASSERT)) + $(call rawfile, $(LIBALLOC)) + $(call rawfile, $(LIBPRINT)) + $(call rawfile, $(LIBSYSTEM)) + $(call rawfile, $(LIBSTRING)) $(call tabgen, $D/char.tab) diff --git a/lang/m2/comp/build.mk b/lang/m2/comp/build.mk index a3be0ee7a..18ca8b7dd 100644 --- a/lang/m2/comp/build.mk +++ b/lang/m2/comp/build.mk @@ -108,16 +108,16 @@ $(eval $q: $(INCDIR)/em_codeEK.h) $(eval $q: $(INCDIR)/print.h) $(eval $q: $(INCDIR)/system.h) -$(call file, $(LIBEM_MES)) -$(call file, $(LIBEMK)) -$(call file, $(LIBEM_DATA)) -$(call file, $(LIBINPUT)) -$(call file, $(LIBASSERT)) -$(call file, $(LIBALLOC)) -$(call file, $(LIBFLT_ARITH)) -$(call file, $(LIBPRINT)) -$(call file, $(LIBSYSTEM)) -$(call file, $(LIBSTRING)) +$(call rawfile, $(LIBEM_MES)) +$(call rawfile, $(LIBEMK)) +$(call rawfile, $(LIBEM_DATA)) +$(call rawfile, $(LIBINPUT)) +$(call rawfile, $(LIBASSERT)) +$(call rawfile, $(LIBALLOC)) +$(call rawfile, $(LIBFLT_ARITH)) +$(call rawfile, $(LIBPRINT)) +$(call rawfile, $(LIBSYSTEM)) +$(call rawfile, $(LIBSTRING)) $(call cprogram, $(BINDIR)/em_m2) $(call installto, $(PLATDEP)/em_m2) diff --git a/lang/m2/libm2/build.mk b/lang/m2/libm2/build.mk index 7dadeb347..1ebc89cc3 100644 --- a/lang/m2/libm2/build.mk +++ b/lang/m2/libm2/build.mk @@ -95,7 +95,7 @@ $(eval g := \ $(foreach f, $g, \ $(call reset) \ - $(call file, lang/m2/libm2/$f) \ + $(call rawfile, lang/m2/libm2/$f) \ $(call installto, $(PLATIND)/include/modula2/$f)) endef diff --git a/lang/pc/comp/build.mk b/lang/pc/comp/build.mk index 2939c4524..c3b4dd918 100644 --- a/lang/pc/comp/build.mk +++ b/lang/pc/comp/build.mk @@ -111,16 +111,16 @@ $(eval $q: $(INCDIR)/em_codeEK.h) $(eval $q: $(INCDIR)/print.h) $(eval $q: $(INCDIR)/system.h) -$(call file, $(LIBEM_MES)) -$(call file, $(LIBEMK)) -$(call file, $(LIBEM_DATA)) -$(call file, $(LIBINPUT)) -$(call file, $(LIBASSERT)) -$(call file, $(LIBALLOC)) -$(call file, $(LIBFLT_ARITH)) -$(call file, $(LIBPRINT)) -$(call file, $(LIBSYSTEM)) -$(call file, $(LIBSTRING)) +$(call rawfile, $(LIBEM_MES)) +$(call rawfile, $(LIBEMK)) +$(call rawfile, $(LIBEM_DATA)) +$(call rawfile, $(LIBINPUT)) +$(call rawfile, $(LIBASSERT)) +$(call rawfile, $(LIBALLOC)) +$(call rawfile, $(LIBFLT_ARITH)) +$(call rawfile, $(LIBPRINT)) +$(call rawfile, $(LIBSYSTEM)) +$(call rawfile, $(LIBSTRING)) $(call cprogram, $(BINDIR)/em_pc) $(call installto, $(PLATDEP)/em_pc) diff --git a/mach/proto/as/build.mk b/mach/proto/as/build.mk index 64eaab1e9..fce5ec204 100644 --- a/mach/proto/as/build.mk +++ b/mach/proto/as/build.mk @@ -36,7 +36,7 @@ $(OBJDIR)/$D/preprocessed-comm2.y: mach/proto/as/comm2.y $(CPPANSI) \ -Ih \ mach/proto/as/comm2.y > $$@ - $(call file, $(LIBOBJECT)) + $(call rawfile, $(LIBOBJECT)) $(call cprogram, $(BINDIR)/$(PLATFORM)/as) $(call installto, $(PLATDEP)/$(PLATFORM)/as) endef diff --git a/mach/proto/ncg/build.mk b/mach/proto/ncg/build.mk index 1bbda2b49..0056452c1 100644 --- a/mach/proto/ncg/build.mk +++ b/mach/proto/ncg/build.mk @@ -36,8 +36,8 @@ $(call cfile, $(OBJDIR)/$D/tables.c) $(eval $q: $(INCDIR)/flt_arith.h) -$(call file, $(LIBEM_DATA)) -$(call file, $(LIBFLT_ARITH)) +$(call rawfile, $(LIBEM_DATA)) +$(call rawfile, $(LIBFLT_ARITH)) $(call cprogram, $(BINDIR)/$(PLATFORM)/ncg) $(call installto, $(PLATDEP)/$(PLATFORM)/ncg) diff --git a/util/amisc/build.mk b/util/amisc/build.mk index 03f44b5e9..286b8f305 100644 --- a/util/amisc/build.mk +++ b/util/amisc/build.mk @@ -2,7 +2,7 @@ define build-simple-tool-impl $(call reset) $(call cfile, util/amisc/$1.c) - $(call file, $(LIBOBJECT)) + $(call rawfile, $(LIBOBJECT)) $(call cprogram, $(BINDIR)/$1) $(eval INSTALLABLES += $o) $(call installto, $(INSDIR)/bin/$1) diff --git a/util/arch/build.mk b/util/arch/build.mk index 4d283f881..11851f5c9 100644 --- a/util/arch/build.mk +++ b/util/arch/build.mk @@ -6,10 +6,10 @@ define build-aal-impl $(call cfile, $D/archiver.c) - $(call file, $(LIBOBJECT)) - $(call file, $(LIBPRINT)) - $(call file, $(LIBSTRING)) - $(call file, $(LIBSYSTEM)) + $(call rawfile, $(LIBOBJECT)) + $(call rawfile, $(LIBPRINT)) + $(call rawfile, $(LIBSTRING)) + $(call rawfile, $(LIBSYSTEM)) $(call cprogram, $(BINDIR)/aal) $(call installto, $(INSDIR)/bin/aal) diff --git a/util/ego/build.mk b/util/ego/build.mk index ee1e7f865..2fba61ff3 100644 --- a/util/ego/build.mk +++ b/util/ego/build.mk @@ -6,8 +6,8 @@ $(call reset) $(eval cflags += -DVERBOSE -DNOTCOMPACT) $(eval cflags += -I$D/share -I$(OBJDIR)/$D) $(foreach f, $2, $(call cfile, $f)) -$(call file, $(LIBDIR)/libegocore.a) -$(call file, $(LIBEM_DATA)) +$(call rawfile, $(LIBDIR)/libegocore.a) +$(call rawfile, $(LIBEM_DATA)) $(call cprogram, $(BINDIR)/ego/$(strip $1)) $(call installto, $(PLATDEP)/ego/$(strip $1)) $(eval EGO_MODULES += $q) @@ -166,9 +166,9 @@ $(call cfile, $D/em_ego/em_ego.c) $(eval $q: $(INCDIR)/print.h $(INCDIR)/system.h) $(eval $q: $(INCDIR)/em_path.h) -$(call file, $(LIBPRINT)) -$(call file, $(LIBSTRING)) -$(call file, $(LIBSYSTEM)) +$(call rawfile, $(LIBPRINT)) +$(call rawfile, $(LIBSTRING)) +$(call rawfile, $(LIBSYSTEM)) $(call cprogram, $(BINDIR)/em_ego) $(call installto, $(PLATDEP)/em_ego) diff --git a/util/led/build.mk b/util/led/build.mk index d96dd35c6..419948a13 100644 --- a/util/led/build.mk +++ b/util/led/build.mk @@ -16,8 +16,8 @@ define build-led-impl $(call cfile, $D/sym.c) $(call cfile, $D/write.c) - $(call file, $(LIBSTRING)) - $(call file, $(LIBOBJECT)) + $(call rawfile, $(LIBSTRING)) + $(call rawfile, $(LIBOBJECT)) $(call cprogram, $(BINDIR)/em_led) $(call installto, $(PLATDEP)/em_led) diff --git a/util/misc/build.mk b/util/misc/build.mk index dfa8ac7c1..95b6fb2d9 100644 --- a/util/misc/build.mk +++ b/util/misc/build.mk @@ -14,13 +14,13 @@ define build-misc-impl $(eval objdir := encode) $(call cfile, $D/convert.c) $(eval $q: $(INCDIR)/em_comp.h $(INCDIR)/em_codeEK.h) - $(call file, $(LIBREAD_EMEV)) - $(call file, $(LIBEMK)) - $(call file, $(LIBEM_DATA)) - $(call file, $(LIBALLOC)) - $(call file, $(LIBPRINT)) - $(call file, $(LIBSTRING)) - $(call file, $(LIBSYSTEM)) + $(call rawfile, $(LIBREAD_EMEV)) + $(call rawfile, $(LIBEMK)) + $(call rawfile, $(LIBEM_DATA)) + $(call rawfile, $(LIBALLOC)) + $(call rawfile, $(LIBPRINT)) + $(call rawfile, $(LIBSTRING)) + $(call rawfile, $(LIBSYSTEM)) $(call cprogram, $(BINDIR)/em_encode) $(call installto, $(PLATDEP)/em_encode) $(eval EM_ENCODE := $o) @@ -30,13 +30,13 @@ define build-misc-impl $(eval objdir := decode) $(call cfile, $D/convert.c) $(eval $q: $(INCDIR)/em_comp.h $(INCDIR)/em_codeEK.h) - $(call file, $(LIBREAD_EMKV)) - $(call file, $(LIBEME)) - $(call file, $(LIBEM_DATA)) - $(call file, $(LIBALLOC)) - $(call file, $(LIBPRINT)) - $(call file, $(LIBSTRING)) - $(call file, $(LIBSYSTEM)) + $(call rawfile, $(LIBREAD_EMKV)) + $(call rawfile, $(LIBEME)) + $(call rawfile, $(LIBEM_DATA)) + $(call rawfile, $(LIBALLOC)) + $(call rawfile, $(LIBPRINT)) + $(call rawfile, $(LIBSTRING)) + $(call rawfile, $(LIBSYSTEM)) $(call cprogram, $(BINDIR)/em_decode) $(call installto, $(PLATDEP)/em_decode) $(eval EM_DECODE := $o) diff --git a/util/ncgg/build.mk b/util/ncgg/build.mk index c3a7f31fa..b0ee29d21 100644 --- a/util/ncgg/build.mk +++ b/util/ncgg/build.mk @@ -34,7 +34,7 @@ $(call cfile, $(OBJDIR)/$D/enterkeyw.c) $(eval $q: $(INCDIR)/em_spec.h) -$(call file, $(LIBEM_DATA)) +$(call rawfile, $(LIBEM_DATA)) $(call cprogram, $(BINDIR)/ncgg) $(eval NCGG := $o) diff --git a/util/opt/build.mk b/util/opt/build.mk index 39eafe355..75cb92553 100644 --- a/util/opt/build.mk +++ b/util/opt/build.mk @@ -10,12 +10,15 @@ $(call yacc, $(OBJDIR)/$D, $D/mktab.y) $(call flex, $(OBJDIR)/$D, $D/scan.l) $(call dependson, $(OBJDIR)/$D/y.tab.h) -$(call file, $(LIBEM_DATA)) -$(call file, -lfl) +$(call rawfile, $(LIBEM_DATA)) +$(call rawfile, -lfl) $(call cprogram, $(OBJDIR)/$D/mktab) endef +.PHONY: -lfl +-lfl: + define build-opt-impl $(call reset) @@ -53,12 +56,12 @@ $g: $(OBJDIR)/$D/mktab $D/patterns $(BINDIR)/cpp.ansi $(hide) $(BINDIR)/cpp.ansi < $D/patterns | $(OBJDIR)/$D/mktab > $$@ $(call cfile, $g) -$(call file, $(LIBEM_DATA)) -$(call file, $(LIBASSERT)) -$(call file, $(LIBPRINT)) -$(call file, $(LIBALLOC)) -$(call file, $(LIBSYSTEM)) -$(call file, $(LIBSTRING)) +$(call rawfile, $(LIBEM_DATA)) +$(call rawfile, $(LIBASSERT)) +$(call rawfile, $(LIBPRINT)) +$(call rawfile, $(LIBALLOC)) +$(call rawfile, $(LIBSYSTEM)) +$(call rawfile, $(LIBSTRING)) $(eval $q: $(INCDIR)/em_spec.h) @@ -79,4 +82,4 @@ endef $(eval $(build-opt-mktab-impl)) $(eval $(call build-opt-impl, em_opt,)) $(eval $(call build-opt-impl, em_opt2, -DGLOBAL_OPT)) -$(eval $(build-opt-manpage-impl)) \ No newline at end of file +$(eval $(build-opt-manpage-impl)) diff --git a/util/topgen/build.mk b/util/topgen/build.mk index 4ef15c278..9bf48a4d3 100644 --- a/util/topgen/build.mk +++ b/util/topgen/build.mk @@ -15,11 +15,11 @@ define build-topgen-impl $(call llgen, $(OBJDIR)/$D, $D/topgen.g) - $(call file, $(LIBASSERT)) - $(call file, $(LIBPRINT)) - $(call file, $(LIBALLOC)) - $(call file, $(LIBSYSTEM)) - $(call file, $(LIBSTRING)) + $(call rawfile, $(LIBASSERT)) + $(call rawfile, $(LIBPRINT)) + $(call rawfile, $(LIBALLOC)) + $(call rawfile, $(LIBSYSTEM)) + $(call rawfile, $(LIBSTRING)) $(call cprogram, $(BINDIR)/topgen) TOPGEN := $o