diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-09-30 09:45:51 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-09-30 09:45:51 +0000 |
commit | e4d5b387d9376dbca2ac620ae3c7833e94c133d8 (patch) | |
tree | f0b5a38bc8af08bcb1426895a7988eaf14fa500a | |
parent | bedacc2bc2e3f6e4e00bcbd489bc5d87b931c552 (diff) |
"Pluggable custom makefile"
A custom plugin (not yet to be released to the public) can be added to Makefile.nmake easily. But this has a drawback:
The modified Makefile.nmake appears as a modified file in the commit list and in generated patches (this annoyed me for years).
To solve this I've added a plugin like mechanism which calls a Custom.nmake file for each target (if the file is existing). I've also added a Custom.nmake.example for a quick start.
I don't know how to do this for the Makefile.am, so I leave this as an exercise for the interested reader ;-)
svn path=/trunk/; revision=19377
-rw-r--r-- | plugins/Custom.nmake.example | 48 | ||||
-rw-r--r-- | plugins/Makefile.nmake | 8 |
2 files changed, 56 insertions, 0 deletions
diff --git a/plugins/Custom.nmake.example b/plugins/Custom.nmake.example new file mode 100644 index 0000000000..2732365f84 --- /dev/null +++ b/plugins/Custom.nmake.example @@ -0,0 +1,48 @@ +# +# $Id$ +# + +include ..\config.nmake + +# +# Custom plugin build template. +# +# If you need to develop a custom plugin (a plugin not yet released to the +# public) this file is for you. +# +# To generate a custom plugin: +# +# 1. Create the new plugin directory and implement the plugin (at least to be +# ready for a first build try). The easiest way to do this is to copy an +# existing plugin and modify the contents. +# 2. Rename this file to Custom.nmake +# 3. Replace every appearance of foo in this file with your plugin dir name +# 4. Build Wireshark as usual +# + +all: foo + +foo:: + cd foo + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake + cd .. + +clean: + cd ../foo + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean + cd .. + +distclean: clean + cd ../foo + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean + cd .. + +maintainer-clean: distclean + cd ../foo + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean + cd .. + +install-plugins: +!IFDEF ENABLE_LIBWIRESHARK + xcopy foo\*.dll $(VERSION) /d +!ENDIF diff --git a/plugins/Makefile.nmake b/plugins/Makefile.nmake index 44408405db..d18c5a51e9 100644 --- a/plugins/Makefile.nmake +++ b/plugins/Makefile.nmake @@ -12,6 +12,7 @@ all: \ artnet \ asn1 \ ciscosm \ + custom \ docsis \ enttec \ giop \ @@ -59,6 +60,9 @@ ciscosm:: $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake cd .. +custom:: + if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake + docsis:: cd docsis $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake @@ -221,6 +225,7 @@ clean: cd ../v5ua $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean cd .. + if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake clean distclean: clean cd acn @@ -276,6 +281,7 @@ distclean: clean cd ../v5ua $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean cd .. + if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake distclean maintainer-clean: distclean cd acn @@ -329,6 +335,7 @@ maintainer-clean: distclean cd ../v5ua $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean cd .. + if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake maintainer-clean ################################################################################ # copy all plugins to /plugins/$(VERSION), so Wireshark will load them, when @@ -367,6 +374,7 @@ install-plugins: xcopy sbus\*.dll $(VERSION) /d xcopy stats_tree\*.dll $(VERSION) /d xcopy v5ua\*.dll $(VERSION) /d + if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake install-plugins !ENDIF clean-deps: |