mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 07:26:29 -04:00
During the build process there is one case when parts (source files) are located in different directories and then linked together. Dependencies are specified seemingly correctly, but the problem is that the build rule `$(CC) $(CFLAGS) -c $*.c' loses information about source file path due to how `$*' is expanded ("no suffix or preceding directory components") and does not specify output object path. Change it to more robust and correct `$(CC) $(CFLAGS) -o $@ -c $<' as a remedy. Since this is BSD syntax, remove `gmake' from USES. Tested by: marino (looks good, but not a complete guarantee)
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
--- cgi-src/Makefile.in.orig Tue Apr 24 19:44:12 2001
|
|
+++ cgi-src/Makefile.in Tue Apr 24 19:44:25 2001
|
|
@@ -31,7 +31,7 @@
|
|
MANDIR = @mandir@
|
|
|
|
CC = @CC@
|
|
-CCOPT = @V_CCOPT@
|
|
+CCOPT = @CFLAGS@
|
|
DEFS = @DEFS@
|
|
INCLS = -I..
|
|
CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
|
|
@@ -46,7 +46,7 @@
|
|
|
|
.c.o:
|
|
@rm -f $@
|
|
- $(CC) $(CFLAGS) -c $*.c
|
|
+ $(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
all: redirect ssi phf
|
|
|
|
@@ -67,17 +67,17 @@
|
|
cd .. ; $(MAKE) $(MFLAGS) strerror.o
|
|
|
|
install: all
|
|
- -mkdir -p $(CGIBINDIR)
|
|
- rm -f $(CGIBINDIR)/redirect
|
|
- cp redirect $(CGIBINDIR)/redirect
|
|
- rm -f $(MANDIR)/man8/redirect.8
|
|
- cp redirect.8 $(MANDIR)/man8/redirect.8
|
|
- rm -f $(CGIBINDIR)/ssi
|
|
- cp ssi $(CGIBINDIR)/ssi
|
|
- rm -f $(MANDIR)/man8/ssi.8
|
|
- cp ssi.8 $(MANDIR)/man8/ssi.8
|
|
- rm -f $(CGIBINDIR)/phf
|
|
- cp phf $(CGIBINDIR)/phf
|
|
+ -mkdir -p $(DESTDIR)$(CGIBINDIR)
|
|
+ rm -f $(DESTDIR)$(CGIBINDIR)/redirect
|
|
+ $(INSTALL) -s -m 555 redirect $(DESTDIR)$(CGIBINDIR)/redirect
|
|
+ rm -f $(DESTDIR)$(MANDIR)/man8/redirect.8
|
|
+ $(INSTALL) -m 444 redirect.8 $(DESTDIR)$(MANDIR)/man8/redirect.8
|
|
+ rm -f $(DESTDIR)$(CGIBINDIR)/ssi
|
|
+ $(INSTALL) -s -m 555 ssi $(DESTDIR)$(CGIBINDIR)/ssi
|
|
+ rm -f $(DESTDIR)$(MANDIR)/man8/ssi.8
|
|
+ $(INSTALL) -m 444 ssi.8 $(DESTDIR)$(MANDIR)/man8/ssi.8
|
|
+ rm -f $(DESTDIR)$(CGIBINDIR)/phf
|
|
+ $(INSTALL) -s -m 555 phf $(DESTDIR)$(CGIBINDIR)/phf
|
|
|
|
clean:
|
|
rm -f $(CLEANFILES)
|