freebsd-ports/sysutils/snowlog/files/patch-Makefile
Dmitry Marakasov e0b5b6f545 - Add LICENSE
- Switch to options helpers
- Regenerate patches with `make makepatch`
2016-02-17 19:12:50 +00:00

71 lines
2.5 KiB
Text

--- Makefile.orig 2005-07-20 18:13:17 UTC
+++ Makefile
@@ -1,13 +1,10 @@
-CC= gcc
-MAKE= make
INSTALL= install
-PREFIX= /usr/local
DATAPATH= $(PREFIX)/share
LOCALEPATH= $(DATAPATH)/locale
DOCPATH= $(DATAPATH)/doc
-CFLAGS= -Wall -O2 -I/usr/local/include -DDATAPATH="\"$(DATAPATH)\"" -DVERSION=\"$(VERSION)\"
-LDFLAGS= -L/usr/local/lib -lncurses -lpcre
+CFLAGS+= -Wall -O2 -I$(LOCALBASE)/include -DDATAPATH="\"$(DATAPATH)\"" -DVERSION=\"$(VERSION)\"
+LDFLAGS= -L$(LOCALBASE)/lib -lncurses -lpcre
OBJFILES= main.o loadlog.o internals.o interface.o snowtk.o regexp.o filters.o setup.o
@@ -27,35 +24,35 @@ man:
sed s#DATAPATH#$(DATAPATH)# | sed s#VERSION#$(VERSION)# \
> doc/man/snowlog.1
-install: install-bin install-data install-man install-doc
+install: install-bin install-man
install-bin: snowlog
- if [ ! -d "$(PREFIX)/bin" ]; then \
- mkdir -p $(PREFIX)/bin; \
+ if [ ! -d "$(DESTDIR)$(PREFIX)/bin" ]; then \
+ mkdir -p $(DESTDIR)$(PREFIX)/bin; \
fi
- $(INSTALL) -s src/snowlog $(PREFIX)/bin
+ $(INSTALL) -s src/snowlog $(DESTDIR)$(PREFIX)/bin
install-data:
- if [ ! -d "$(DATAPATH)/snowlog" ]; then \
- mkdir -p $(DATAPATH)/snowlog; \
+ if [ ! -d "$(DESTDIR)$(DATAPATH)/snowlog" ]; then \
+ mkdir -p $(DESTDIR)$(DATAPATH)/snowlog; \
fi
- $(INSTALL) -m 0644 share/referers.regexp $(DATAPATH)/snowlog
- $(INSTALL) -m 0644 share/useragents.regexp $(DATAPATH)/snowlog
+ $(INSTALL) -m 0644 share/referers.regexp $(DESTDIR)$(DATAPATH)/snowlog
+ $(INSTALL) -m 0644 share/useragents.regexp $(DESTDIR)$(DATAPATH)/snowlog
install-man: man
- if [ ! -d "$(PREFIX)/man/man1" ]; then \
- mkdir -p $(PREFIX)/man/man1; \
+ if [ ! -d "$(DESTDIR)$(PREFIX)/man/man1" ]; then \
+ mkdir -p $(DESTDIR)$(PREFIX)/man/man1; \
fi
- $(INSTALL) -m 0644 doc/man/snowlog.1 $(PREFIX)/man/man1
+ $(INSTALL) -m 0644 doc/man/snowlog.1 $(DESTDIR)$(PREFIX)/man/man1
install-doc:
- if [ ! -d "$(DOCPATH)/snowlog" ]; then \
- mkdir -p $(DOCPATH)/snowlog; \
+ if [ ! -d "$(DESTDIR)$(DOCPATH)/snowlog" ]; then \
+ mkdir -p $(DESTDIR)$(DOCPATH)/snowlog; \
fi
- $(INSTALL) -m 0644 INSTALLATION $(DOCPATH)/snowlog
- $(INSTALL) -m 0644 doc/README $(DOCPATH)/snowlog
- $(INSTALL) -m 0644 doc/filters.example $(DOCPATH)/snowlog
- $(INSTALL) -m 0644 Changelog $(DOCPATH)/snowlog
+ $(INSTALL) -m 0644 INSTALLATION $(DESTDIR)$(DOCPATH)/snowlog
+ $(INSTALL) -m 0644 doc/README $(DESTDIR)$(DOCPATH)/snowlog
+ $(INSTALL) -m 0644 doc/filters.example $(DESTDIR)$(DOCPATH)/snowlog
+ $(INSTALL) -m 0644 Changelog $(DESTDIR)$(DOCPATH)/snowlog
clean: clean-bin clean-man