diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-12-30 09:13:56 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-12-30 09:13:56 +1100 |
| commit | 0f01055777bb39e4744fa3465b0ab14691c7f6df (patch) | |
| tree | d297f2c4b189fe6a4cf9956c1a9845787ac8e6d4 | |
| parent | 79bb590ffd86261202176e7a7df963893a418bb0 (diff) | |
| download | scintilla-mirror-0f01055777bb39e4744fa3465b0ab14691c7f6df.tar.gz | |
Backport: Use pattern rules instead of suffix rules as they are clearer.
Add a .PHONY target to avoid possible failure caused by file with same name.
Backport of changeset 7856:477749c2f095.
| -rw-r--r-- | gtk/makefile | 10 | ||||
| -rw-r--r-- | win32/makefile | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/gtk/makefile b/gtk/makefile index 8a90d76e6..99b2d8053 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -7,6 +7,8 @@ # Builds for GTK+ 2 and 3. GTK 3 requires GTK3=1 on command line. # Also works with ming32-make on Windows. +.PHONY: all clean analyze depend + .SUFFIXES: .cxx .c .o .h .a .list srcdir ?= . @@ -95,9 +97,9 @@ all: $(COMPLIB) clean: $(DEL) *.o $(call normalize,$(COMPLIB)) *.plist -.cxx.o: +%.o: %.cxx $(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $< -.c.o: +%.o: %.c $(CC) $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(BASE_FLAGS) $(CFLAGS) -w -c $< $(LUA_OBJS): %.o: ../lua/src/%.c $(CC) $(LUA_CFLAGS) $(CFLAGS) -c $< @@ -105,9 +107,9 @@ $(LUA_OBJS): %.o: ../lua/src/%.c GLIB_GENMARSHAL = glib-genmarshal GLIB_GENMARSHAL_FLAGS = --prefix=scintilla_marshal -.list.h: +%.h: %.list $(GLIB_GENMARSHAL) --header $(GLIB_GENMARSHAL_FLAGS) $< > $@ -.list.c: +%.c: %.list $(GLIB_GENMARSHAL) --body $(GLIB_GENMARSHAL_FLAGS) $< > $@ analyze: diff --git a/win32/makefile b/win32/makefile index fa3720807..7a24fee91 100644 --- a/win32/makefile +++ b/win32/makefile @@ -4,6 +4,9 @@ # The License.txt file describes the conditions under which this software may be distributed. # This makefile assumes the MinGW32 version of GCC 4.8+ is used and changes will # be needed to use other compilers. +# Clang 3.4+ can be used with CLANG=1 on command line. + +.PHONY: all clean analyze depend .SUFFIXES: .cxx .c .o .h .a @@ -78,7 +81,7 @@ LUAOBJS:=lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o linit.o \ lpcap.o lpcode.o lpprint.o lptree.o lpvm.o endif -.cxx.o: +%.o: %.cxx $(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $< analyze: |
