Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2011
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. APXS=apxs
  2. VERSION := $(shell cat VERSION)
  3. DISTFILES := $(shell cat FILES)
  4. TMPDIR := $(shell mktemp -d /tmp/mod-vhost-ldap.XXXXXXXX)
  5.  
  6. all: mod_vhost_ldap.o
  7.  
  8. install:
  9. $(APXS) -i mod_vhost_ldap.la
  10.  
  11. clean:
  12. rm -f *.o
  13. rm -f *.lo
  14. rm -f *.la
  15. rm -f *.slo
  16. rm -rf .libs
  17. rm -rf mod_vhost_ldap-$(VERSION)
  18. rm -rf mod_vhost_ldap-$(VERSION).tar.gz
  19.  
  20. mod_vhost_ldap.o: mod_vhost_ldap.c
  21. # Try building with per request document root and if it fails, do the normal build (kinda ugly, but should work)
  22. $(APXS) -Wc,-Wall -Wc,-Werror -Wc,-g -Wc,-DDEBUG -Wc,-DMOD_VHOST_LDAP_VERSION=\\\"mod_vhost_ldap/$(VERSION)\\\" -Wc,-DHAS_PER_REQUEST_DOCUMENT_ROOT -c -lldap_r mod_vhost_ldap.c || \
  23. $(APXS) -Wc,-Wall -Wc,-Werror -Wc,-g -Wc,-DDEBUG -Wc,-DMOD_VHOST_LDAP_VERSION=\\\"mod_vhost_ldap/$(VERSION)\\\" -c -lldap_r mod_vhost_ldap.c
  24.  
  25. archive:
  26. git clone $(CURDIR) $(TMPDIR)/mod-vhost-ldap-$(VERSION)
  27. cd $(TMPDIR)/mod-vhost-ldap-$(VERSION) && \
  28. git checkout upstream
  29. cd $(TMPDIR) && \
  30. tar --exclude-vcs --exclude debian/ -czf $(CURDIR)/../mod-vhost-ldap-$(VERSION).tar.gz mod-vhost-ldap-$(VERSION)
  31.  
  32. format:
  33. indent *.c
  34.  
  35. .PHONY: all install clean archive format
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement